Cassandra: How to insert a new wide row with good performance using CQL

前端 未结 3 1777
醉梦人生
醉梦人生 2020-12-14 13:11

I am evaluating cassandra. I am using the datastax driver and CQL.

I would like to store some data with the following internal structure, where the names are differ

3条回答
  •  执念已碎
    2020-12-14 13:46

    Some things you can try... In your cassandra.yaml (this is Cassandra 1.2.x, maybe the params are called somewhat differently in 2.x):

    • Disable the row cache (row_cache_size_in_mb: 0)
    • Increase the memory limit before in-memory rows spill over to disk (min_memory_compaction_limit_in_mb), only do this if you see some log output that sais that spilling does happen
    • Make sure num_tokens / initial_token values are configured properly so rows get distributed across your nodes

    Other things you can try:

    • Provide all node IPs in your cluster to the client, not just one
    • Provide more RAM to each Cassandra node
    • Try to run your test multi-threaded
    • Make sure you have JNA installed and in use if you run Cassandra on Linux

    Things to clarify:

    • Have you confirmed via nodetool that the 3 nodes have found each other?
    • What does nodetool say about the load distribution of your 3 nodes?
    • What does the physical host of your virtual cluster say about CPU and I/O usage? Maybe it has simply maxed out?

提交回复
热议问题