Chapter 1. Environment Prepare:
0. Environment description:
hardware: 7 commercial machine with 24 processors, 128 megabytes memory, 103G system disk + 3.6T*10 data disk os: Red Hat 4.4.7-16 ip: 192.168.1.11~17 cassandra: datastax-ddc-3.7.0 user: cassandra with sudo previlege.
1. Install JDK, recommend oracle JDK 8.
I used a rpm package installment, it can save you time from configuration java_home and so on.
if you use openjdk, you will get a warn message as follows:
OpenJDK is not recommended. Please upgrade to the newest Oracle Java release
2. Install jemalloc
if you miss the software, you will get a warn message as follows:
jemalloc shared library could not be preloaded to speed up memory allocations
3. Disable swap files and optimize system configuration
details, please see: https://docs.datastax.com/en/landing_page/doc/landing_page/recommendedSettingsLinux.html
if not do this, then you will get warn messages as follows:
Unable to lock JVM memory (ENOMEM). This can result in part of the JVM being swapped out, especially with mmapped I/O enabled. Increase RLIMIT_MEMLOCK or run Cassandra as root.
Cassandra server running in degraded mode. Is swap disabled? : false, Address space adequate? : true, nofile limit adequate? : true, nproc limit adequate? : true
4. Update OHC
update ohc from 0.4.3 to 0.4.5, including jars:
if not, you will get a warn message as follows:
Failed to load Java8 implementation ohc-core-j8 : java.lang.NoSuchMethodException: org.caffinitas.ohc.linked.UnsExt8.<init>(java.lang.Class)
Chapter 2. Cassandra Configuration files
cassandra.yaml
this is the primary configuration for cassandra.
jvm.options
configuration for java virtual machine. the machine has 24 processors and 128 M memory, so we use 32G heap and 15 ParallelGCThreads.