I am new to NoSQL and Cassandra. I am experimenting with settings to acheive an in memory cache only solution. I am processing by reading line by line from a 100000 lines file and using Hector to insert to Cassandra. I am noticing a very low throughput of around 6000 inserts per second. The whole write operation about 20.5 seconds which is unacceptable to our application. We need something like 100000 inserts per second. I am testing on a Windows 7 computer with 4GB RAM.
I am doing an insert only test.
Kindly let me know where I am going wrong. Kindly suggest on how I can improve the inserts per second.
Keyspace: Keyspace1
Read Count: 0
Read Latency: NaN ms.
Write Count: 177042
Write Latency: 0.003106884242157228 ms.
Pending Tasks: 0
Column Family: user
SSTable count: 3
Space used (live): 17691
Space used (total): 17691
Number of Keys (estimate): 384
Memtable Columns Count: 100000
Memtable Data Size: 96082090
Memtable Switch Count: 1
Read Count: 0
Read Latency: NaN ms.
Write Count: 177042
Write Latency: NaN ms.
Pending Tasks: 0
Key cache capacity: 150000
Key cache size: 0
Key cache hit rate: NaN
Row cache capacity: 150000
Row cache size: 0
Row cache hit rate: NaN
Compacted row minimum size: 73
Compacted row maximum size: 924
Compacted row mean size: 784
I have tried couple of methods for setting row cache and key cache:
Through Cassandra CLI
Through NodeCmd: java org.apache.cassandra.tools.NodeCmd -p 7199 setcachecapacity Keyspace1 user 150000 150000