Re: read operation is slow

2010-06-18 Thread Simon Reavely
I will try the optimized query next week. But maybe you still have to face the case that each time a client just wants to query one key from db. From: Dop Sun [mailto:su...@dopsun.com] Sent: Friday, June 11, 2010 6:05 PM To: user@cassandra.apache.org Subject: RE: read operation is slow An

RE: read operation is slow

2010-06-15 Thread caribbean410
: Tuesday, June 15, 2010 9:16 AM To: user@cassandra.apache.org Subject: Re: read operation is slow Now I read 100 records each time, and the total time to read 200k records (1M each) reduce to 10s. Looks good. But I am still curious how to handle the case that users read one record each time, On Fri

RE: read operation is slow

2010-06-15 Thread Dop Sun
15, 2010 9:16 AM To: user@cassandra.apache.org Subject: Re: read operation is slow Now I read 100 records each time, and the total time to read 200k records (1M each) reduce to 10s. Looks good. But I am still curious how to handle the case that users read one record each time, On Fri, Jun 11

Re: read operation is slow

2010-06-14 Thread Caribbean410
t; keys into a single query), and to reduce the number of calls. > > > > *From:* Dop Sun [mailto:su...@dopsun.com] > *Sent:* Saturday, June 12, 2010 8:57 AM > > *To:* user@cassandra.apache.org > *Subject:* RE: read operation is slow > > > > You mean after you “I rem

RE: read operation is slow

2010-06-13 Thread aaron
gt; > > > Then, if you have 200k keys, you have 200k Thrift calls. If this is the > case, you may need to optimize the way you do the query (to combine > multiple > keys into a single query), and to reduce the number of calls. > > > > From: Dop Sun [mailto:su...@dop

Re: read operation is slow

2010-06-11 Thread Jonathan Ellis
sounds like most of the latency is in your client code, or waiting for the network On Fri, Jun 11, 2010 at 6:02 PM, Caribbean410 wrote: > Hi, previously it is 438s. Now it is 399s. Still large. > > On Fri, Jun 11, 2010 at 5:56 PM, Dop Sun wrote: >> >> You mean after you “I remove some unnecessar

RE: read operation is slow

2010-06-11 Thread caribbean410
client just wants to query one key from db. From: Dop Sun [mailto:su...@dopsun.com] Sent: Friday, June 11, 2010 6:05 PM To: user@cassandra.apache.org Subject: RE: read operation is slow And also, you are only select 1 key and 10 columns? criteria.keyList(Lists.newArrayList(userName

RE: read operation is slow

2010-06-11 Thread Dop Sun
keys into a single query), and to reduce the number of calls. From: Dop Sun [mailto:su...@dopsun.com] Sent: Saturday, June 12, 2010 8:57 AM To: user@cassandra.apache.org Subject: RE: read operation is slow You mean after you "I remove some unnecessary column family and change the si

Re: read operation is slow

2010-06-11 Thread Caribbean410
*200k=18s.”, it still takes 400 seconds to > returning? > > > > *From:* Caribbean410 [mailto:caribbean...@gmail.com] > *Sent:* Saturday, June 12, 2010 8:48 AM > > *To:* user@cassandra.apache.org > *Subject:* Re: read operation is slow > > > > Hi, do you mean this on

RE: read operation is slow

2010-06-11 Thread Dop Sun
: Saturday, June 12, 2010 8:48 AM To: user@cassandra.apache.org Subject: Re: read operation is slow Hi, do you mean this one should not introduce much extra delay? To read a record, I need select here, not sure where the extra delay comes from. On Fri, Jun 11, 2010 at 5:29 PM, Dop Sun wrote: Ja

Re: read operation is slow

2010-06-11 Thread Caribbean410
; The select here basically is a call to Thrift API: get_range_slices > > > > > > *From:* Caribbean410 [mailto:caribbean...@gmail.com] > *Sent:* Saturday, June 12, 2010 8:00 AM > > *To:* user@cassandra.apache.org > *Subject:* Re: read operation is slow > >

RE: read operation is slow

2010-06-11 Thread Dop Sun
Jassandra is used here: Map> map = criteria.select(); The select here basically is a call to Thrift API: get_range_slices From: Caribbean410 [mailto:caribbean...@gmail.com] Sent: Saturday, June 12, 2010 8:00 AM To: user@cassandra.apache.org Subject: Re: read operation is slow

Re: read operation is slow

2010-06-11 Thread Caribbean410
I remove some unnecessary column family and change the size of rowcache and keycache, now the latency changes from 0.25ms to 0.09ms. In essence 0.09ms*200k=18s. I don't know why it takes more than 400s total. Here is the client code and cfstats. There are not many operations here, why is the extra

Re: read operation is slow

2010-06-11 Thread Caribbean410
This is the cfstats. Right now I use three thread to read 200k records. I only use Keyspace1 and Column family Standard2. For other unused column families, do I need to comment them out in storage configure file? The latency is 0.2576ms per records, is this a regular number (we are reading from ssd

Re: read operation is slow

2010-06-11 Thread Jonathan Ellis
you need to look at cfstats to see what the latency is internal to cassandra, vs what your client is introducing then you should probably read the comments in the configuration file about caching On Fri, Jun 11, 2010 at 9:38 AM, Caribbean410 wrote: > > Thanks Riyad. > > Right now I am just testi

Re: read operation is slow

2010-06-11 Thread Caribbean410
Thanks Riyad. Right now I am just testing Cassandra on single node. The server and client are running on the same machine. I tried the read test again on two machines, on one machine the cpu usage is around 30% most of the time and another is 90%. Pelops is one way to access Cassandra, there are

Re: read operation is slow

2010-06-11 Thread Riyad Kalla
Caribbean410, This comes up on the Redis list alot as well -- what you are actually measuring is the client sending a network connection to the Cas server and it replying -- so the performance numbers you are getting can easily be 70% network wait time and not necessarily hardcore read/write serve