Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h2>Some performance optimization tips/best practices:</h2> <p>Larger the number of nodes, better the distribution and C* performs better</p> <p>64-bit JVMs perform better than 32-bit (Use Oracle JVM 1.6 at least u22)</p> <p>physical environments, minimum is 8GB, but anything between 16-32 GB, 8-core processors</p> <p><strong>at least two disks, one for the commit log and the other for the data directories</strong></p> <p><strong>Commit Log + data directory on same volumes – avoid this.</strong> The biggest performance gain for write is to put commit log in a separate disk drive. Commit log is 100% sequential, while data reads are random from data directories. I/O contention between commit log &amp; SSTables may deteriorate commit log writes and SSTable reads. But this does not apply to SSDs or EC2.</p> <p>JVM parameters tuning (on a 8GB RAM system)</p> <p><strong>Heap tuning</strong></p> <p>-Xms${MAX_HEAP_SIZE} -Xmx${MAX_HEAP_SIZE} – default to 40-50% of available physical memory – 4 GB -Xmn${HEAP_NEWSIZE} - default to 25% of java heap – 1GB</p> <p><strong>GC tuning</strong></p> <p>-XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseParallelGC -XX:SurvivorRatio=4 -XX:MaxTenuringThreshold=0</p> <p><strong>Synch the clocks on all nodes</strong> – As C* adds timestamp t each coumn value, it is must to synch clocks across the ring using NTP daemon or script. NTP known to drift the clocks across datacenters.</p> <p><strong>Use Key cache sparingly</strong>, as it has highest possible performance gains with least memory footprint, as it stores only the key and data location. Saves one file I/O seek. update column family my_column_family with keys_cached=50000;</p> <h2><strong>Use RF=3</strong>, it’s a best practice, Write/Read <strong>consistency level = QUORUM</strong> is a best practice</h2> <p>on Linux, you can locate cassandra.sh, which is used to start the Cassandra process. This is where we add the GC params as well as the JVM memory settings. (backup the file first) i assume, you have 4GB allocated to cassandra process. Assuming you have a 8GB system memory, allocate -Xmx4096m to Cassandra process.</p> <p><a href="https://github.com/apache/cassandra/blob/trunk/conf/cassandra-env.sh?source=cc" rel="nofollow">https://github.com/apache/cassandra/blob/trunk/conf/cassandra-env.sh?source=cc</a></p> <p>you can tuning options coded in section "# GC tuning options"</p> <p>key_cache_size_in_mb - this setting can be found in the cassandra.yaml file and will applicable to all column families in your keyspace or else set at CF level. You need to know approx size of your rows and work out the calculations. e.g. for 1 million rows to be cached with avg row size of 100 bytes with 25 columns each of 4 bytes, you need to set it as 100 mb (1 mn * 100 bytes)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload