Having performance issues with Datastax cassandra

若如初见. 提交于 2019-12-02 03:31:35

I did a Benchmarking and tuning activity on Cassandra some time ago. Found some useful settings which are mentioned below,

  1. In Cassandra data division is based of strategies. Default is a combination of round robin and token aware policy which works best in almost all cases. If you want to customize data distribution then it is possible to write a new data distribution strategy in Cassandra i.e. distribute the data based on a location, based on an attribute etc. which can be best for customized requirement.

  2. Cassandra uses Bloom filters to determine whether an SSTable has data for a particular row. We used bloom filter value is 0.1 to maintain balance between efficiency and overhead

  3. Consistency level is key parameter in NoSQL databases. Try with Quorum or one.

  4. Other options in JVM tuning like, heap memory size, survivor ratio should be optimal to achieve maximum performance

  5. If large memory is available then memTable size can be increased and that can fit into memory and it will improve performance. Flushing memTables to disk interval should be high enough so that it shouldn’t perform unnecessary IO operations

  6. Concurrency settings in Cassandra are important to scale. Based on our tests and observations we found that Cassandra performs better when concurrency is set to no. of cores*5 and native_transport_max_threads set to 256

  7. Follow additional tuning settings recommended by Cassandra like; disable swap, ulimit settings, and compaction settings

  8. Replication factor in Cassandra should be equal to no. of nodes in cluster to achieve maximum throughput of system.

These are mostly for insertion with a little bit of impact of read. I hope this will help you :)

Are you using async writes?

Try running cassandra-stress, that way you can isolate client issues.

Another option is Brian's cassandra-loader:

https://github.com/brianmhess/cassandra-loader

Since you are writing in Java, use Brian's code as a best practice example.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!