Hi All,

I had allocated 2 GB each for Key, Row, Counter & Chunk cache and performed 
below steps. Please note it is test box not others users are connected to it.

Output 1 shows 0 hits and 0 requests - After clean startup of cassandra
Output 2 shows 0 hits and 1 requests - Executed a select query with returns 1 
row (Json format)
Output 3 shows 1 hits and 2 requests - Reexecuted the same select query in 
step2.

My questions are 
 
1) Is there any way to preload all the rows to row cache without executing the 
select statements. 
2) Regarding Key cache I only selected col2 i.e value but requests increased by 
4 i.e to 102 from 98.

Can any one explain on the above.

cqlsh:> desc table

CREATE TABLE table (
    Col1 text PRIMARY KEY,
    Col2 text. — (Json format)
) WITH bloom_filter_fp_chance = 0.01
    AND caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'}
    AND comment = ''
    AND compaction = {'class': 
'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 
'max_threshold': '32', 'min_threshold': '4'}
    AND compression = {'chunk_length_in_kb': '64', 'class': 
'org.apache.cassandra.io.compress.LZ4Compressor'}
    AND crc_check_chance = 1.0
    AND dclocal_read_repair_chance = 0.1
    AND default_time_to_live = 0
    AND gc_grace_seconds = 864000
    AND max_index_interval = 2048
    AND memtable_flush_period_in_ms = 0
    AND min_index_interval = 128
    AND read_repair_chance = 0.0
    AND speculative_retry = '99PERCENTILE';

Output1:

Hostname:/Users/> nodetool info
ID                     : 9b10a667-b668-44c4-8deb-2e0ad317f287
Gossip active          : true
Thrift active          : false
Native Transport active: true
Load                   : 488.54 MiB
Generation No          : 1533931780
Uptime (seconds)       : 20
Heap Memory (MB)       : 572.35 / 12208.00
Off Heap Memory (MB)   : 0.20
Data Center            : datacenter1
Rack                   : rack1
Exceptions             : 0
Key Cache              : entries 26, size 2.3 KiB, capacity 2 GiB, 62 hits, 98 
requests, 0.633 recent hit rate, 60 save period in seconds
Row Cache              : entries 0, size 0 bytes, capacity 2 GiB, 0 hits, 0 
requests, NaN recent hit rate, 60 save period in seconds
Counter Cache          : entries 0, size 0 bytes, capacity 2 GiB, 0 hits, 0 
requests, NaN recent hit rate, 60 save period in seconds
Chunk Cache            : entries 19, size 1.19 MiB, capacity 1.97 GiB, 62 
misses, 186 requests, 0.667 recent hit rate, 233.240 microseconds miss latency
Percent Repaired       : 0.0%
Token                  : (invoke with -T/--tokens to see all 256 tokens)
rkommineni-mac.local:/Users/rkommineni >

Select col2 from table where col1=key;

Output2:

Hostname:/Users/> nodetool info
ID                     : 9b10a667-b668-44c4-8deb-2e0ad317f287
Gossip active          : true
Thrift active          : false
Native Transport active: true
Load                   : 488.54 MiB
Generation No          : 1533931780
Uptime (seconds)       : 68
Heap Memory (MB)       : 627.20 / 12208.00
Off Heap Memory (MB)   : 0.20
Data Center            : datacenter1
Rack                   : rack1
Exceptions             : 0
Key Cache              : entries 28, size 2.5 KiB, capacity 2 GiB, 64 hits, 102 
requests, 0.627 recent hit rate, 60 save period in seconds
Row Cache              : entries 1, size 40.07 KiB, capacity 2 GiB, 0 hits, 1 
requests, 0.000 recent hit rate, 60 save period in seconds
Counter Cache          : entries 0, size 0 bytes, capacity 2 GiB, 0 hits, 0 
requests, NaN recent hit rate, 60 save period in seconds
Chunk Cache            : entries 24, size 1.5 MiB, capacity 1.97 GiB, 67 
misses, 225 requests, 0.702 recent hit rate, 285.506 microseconds miss latency
Percent Repaired       : 0.0%
Token                  : (invoke with -T/--tokens to see all 256 tokens)

Select col2 from table where col1=key;  - Reran the same query

Output3:

Hostname:/Users/> nodetool info
ID                     : 9b10a667-b668-44c4-8deb-2e0ad317f287
Gossip active          : true
Thrift active          : false
Native Transport active: true
Load                   : 488.54 MiB
Generation No          : 1533931780
Uptime (seconds)       : 78
Heap Memory (MB)       : 651.93 / 12208.00
Off Heap Memory (MB)   : 0.20
Data Center            : datacenter1
Rack                   : rack1
Exceptions             : 0
Key Cache              : entries 28, size 2.5 KiB, capacity 2 GiB, 64 hits, 102 
requests, 0.627 recent hit rate, 60 save period in seconds
Row Cache              : entries 1, size 40.07 KiB, capacity 2 GiB, 1 hits, 2 
requests, 0.500 recent hit rate, 60 save period in seconds
Counter Cache          : entries 0, size 0 bytes, capacity 2 GiB, 0 hits, 0 
requests, NaN recent hit rate, 60 save period in seconds
Chunk Cache            : entries 24, size 1.5 MiB, capacity 1.97 GiB, 67 
misses, 225 requests, 0.702 recent hit rate, 208.327 microseconds miss latency
Percent Repaired       : 0.0%
Token                  : (invoke with -T/--tokens to see all 256 tokens)

Thanks,


Reply via email to