- These instructions are intended for Cassandra 2 on a single CentOS 6 server.
- I’ll be working from a Liquid Web Core Managed CentOS 6.4 server, and I’ll be logged in as root.
A Bit of Cassandra OptimizationFor a refresher on editing files with vim see: New User Tutorial: Overview of the Vim Text Editor Set nproc limits:
vim /etc/security/limits.d/90-nproc.confAdd the following line to the bottom of the file, using i to insert:
* - nproc 32768Your file should now look very similar to this: You can either match the spacing of the 90-nproc.conf , or simply enter the above line exactly as it appears. Then exit and save the file with the command :wq . Next, we’ll edit the sysctl.conf :
vim /etc/sysctl.confAdd the following line to the bottom of the file, using i to insert:
# Recommended Production Setting for Cassandra vm.max_map_count = 131072Your file should now look very similar to this: Then exit and save the file with the command :wq . So the changes take effect, issue the following command or reboot the server:
sysctl -pNow we’re going to turn-off swap. This can be done with the following command:
swapoff --allThen, we’ll entirely disable swap by removing all swap entries from /etc/fstab:
vim /etc/fstabIf you’re using a Liquid Web CentOS 6 Core Managed image then you’ll remove this line using dd :
LABEL=SWAP-vda2 swap swap defaults 0 0Your file should now look very similar to this before removing the above line: Exit and save the file with the command :wq . Done!