Chapter 1. Environment Prepare:
0. Environment Description:
Hardware:7 Commercial machine with processors, 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.
sudo yum-y install jdk-8u101-linux-x64.rpm |
I used a RPM package installment, it can save your time from the configuration java_home and so on.
If you use the OPENJDK, you'll get a warn message as follows:
OpenJDK is not recommended. Upgrade to the newest Oracle Java release
2. Install Jemalloc
sudo yum-y install jemalloc.x86_64 |
If you miss the software, you'll get a warn message as follows:
Jemalloc shared library could not being 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
Included in the file/etc/security/limits.conf: # set for Cassandra Limits Coupang-memlock Unlimited Coupang-nofile 10 0000 Coupang-nproc 32768 Coupang-as Unlimited for all installations, add the following line To/etc/sysctl.conf:v M.max_map_count = 1048575 Disable swap files in the operations system sudo swapoff--all Manent, remove all swap file entries from/etc/fstab. Check the Java hugepages setting echo Never | sudo tee/sys/kernel/mm/transparent_hugepage/defrag |
If not does this and then you'll get warn messages as follows:
Unable to lock JVM memory (ENOMEM). This can result in the "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