incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yiming Sun <yiming....@gmail.com>
Subject Re: need some help with row cache
Date Wed, 28 Nov 2012 14:36:25 GMT
Does replica placement play a role in row cache hits?

I happen to notice that the 3 nodes on "rack 2" are the ones with no recent
hit rates, even when I specify only one node from rack2 as the host to
Hector.

The cluster uses PropertyFileSnitch, and the nodes are alternating between
rac1 and rac2 in a single Data Center clockwise on the ring.  This
particular column family uses NetworkTopologyStrategy, with replication
factor of 2.   So the idea is it can place the replica on the next node in
the ring without having to walk all the around.   But it seems cache hits
tend to only happen on rack 1?


Address         DC          Rack        Status State   Load
Effective-Ownership Token

141784319550391026443072753096570088105
x.x.x.1    DC1         r1          Up     Normal  587.46 GB
33.33%              0
x.x.x.2    DC1         r2          Up     Normal  591.21 GB
33.33%              28356863910078205288614550619314017621
x.x.x.3    DC1         r1          Up     Normal  594.97 GB
33.33%              56713727820156410577229101238628035242
x.x.x.4    DC1         r2          Up     Normal  587.15 GB
33.33%              85070591730234615865843651857942052863
x.x.x.5    DC1         r1          Up     Normal  590.26 GB
33.33%              113427455640312821154458202477256070484
x.x.x.6    DC1         r2          Up     Normal  583.21 GB
33.33%              141784319550391026443072753096570088105


On Wed, Nov 28, 2012 at 9:09 AM, Yiming Sun <yiming.sun@gmail.com> wrote:

> Thanks guys.  However, after I ran the client code several times (same set
> of 5000 entries),  still 2 of the 6 nodes show 0 hits on row cache, despite
> each node has 1GB capacity for row cache and the caches are full.   Since I
> always request the same entries over and over again, shouldn't there be
> some hits?
>
>
> [user@node]$ ./checkinfo.sh
> Token            : 85070591730234615865843651857942052863
> Gossip active    : true
> Thrift active    : true
> Load             : 587.15 GB
> Generation No    : 1354074048
> Uptime (seconds) : 36957
> Heap Memory (MB) : 2027.29 / 3948.00
> Data Center      : DC1
> Rack             : r2
> Exceptions       : 0
>
> Key Cache        : size 0 (bytes), capacity 0 (bytes), 0 hits, 0 requests,
> NaN recent hit rate, 14400 save period in seconds
> Row Cache        : size 1072651974 (bytes), capacity 1073741824 (bytes), 0
> hits, 2576 requests, NaN recent hit rate, 0 save period in seconds
>
> Token            : 141784319550391026443072753096570088105
> Gossip active    : true
> Thrift active    : true
> Load             : 583.21 GB
> Generation No    : 1354074461
> Uptime (seconds) : 36535
> Heap Memory (MB) : 828.71 / 3948.00
> Data Center      : DC1
> Rack             : r2
> Exceptions       : 0
>
> Key Cache        : size 0 (bytes), capacity 0 (bytes), 0 hits, 0 requests,
> NaN recent hit rate, 14400 save period in seconds
> Row Cache        : size 1072602906 (bytes), capacity 1073741824 (bytes), 0
> hits, 3194 requests, NaN recent hit rate, 0 save period in seconds
>
>
> On Wed, Nov 28, 2012 at 4:26 AM, Bryan Talbot <btalbot@aeriagames.com>wrote:
>
>> The row cache itself is global and the size is set with
>> row_cache_size_in_mb.  It must be enabled per CF using the proper
>> settings.  CQL3 isn't complete yet in C* 1.1 so if the cache settings
>> aren't shown there, then you'll probably need to use cassandra-cli.
>>
>> -Bryan
>>
>>
>> On Tue, Nov 27, 2012 at 10:41 PM, Wz1975 <wz1975@yahoo.com> wrote:
>> > Use cassandracli.
>> >
>> >
>> > Thanks.
>> > -Wei
>> >
>> > Sent from my Samsung smartphone on AT&T
>> >
>> >
>> > -------- Original message --------
>> > Subject: Re: need some help with row cache
>> > From: Yiming Sun <yiming.sun@gmail.com>
>> > To: user@cassandra.apache.org
>> > CC:
>> >
>> >
>> > Also, what command can I used to see the "caching" setting?  "DESC TABLE
>> > <cf>" doesn't list caching at all.  Thanks.
>> >
>> > -- Y.
>> >
>> >
>> > On Wed, Nov 28, 2012 at 12:15 AM, Yiming Sun <yiming.sun@gmail.com>
>> wrote:
>> >>
>> >> Hi Bryan,
>> >>
>> >> Thank you very much for this information.  So in other words, the
>> settings
>> >> such as row_cache_size_in_mb in YAML alone are not enough, and I must
>> also
>> >> specify the caching attribute on a per column family basis?
>> >>
>> >> -- Y.
>> >>
>> >>
>> >> On Tue, Nov 27, 2012 at 11:57 PM, Bryan Talbot <btalbot@aeriagames.com
>> >
>> >> wrote:
>> >>>
>> >>> On Tue, Nov 27, 2012 at 8:16 PM, Yiming Sun <yiming.sun@gmail.com>
>> wrote:
>> >>> > Hello,
>> >>> >
>> >>> > but it is not clear to me where this setting belongs to, because
>> even
>> >>> > in the
>> >>> > v1.1.6 conf/cassandra.yaml,  there is no such property, and
>> apparently
>> >>> > adding this property to the yaml causes a fatal configuration error
>> >>> > upon
>> >>> > server startup,
>> >>> >
>> >>>
>> >>> It's a per column family setting that can be applied using the CLI or
>> >>> CQL.
>> >>>
>> >>> With CQL3 it would be
>> >>>
>> >>> ALTER TABLE <cf> WITH caching = 'rows_only';
>> >>>
>> >>> to enable the row cache but no key cache for that CF.
>> >>>
>> >>> -Bryan
>> >>
>> >>
>> >
>>
>
>

Mime
View raw message