Recommended Production Settings for Cassandra on CentOS 6
If you’ve already followed the tutorial on How To Install Cassandra on CentOS 6, then you’re ready for another step!
- 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.
For 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.conf
Add the following line to the bottom of the file, using i to insert:
* - nproc 32768
Your 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.conf
Add the following line to the bottom of the file, using i to insert:
# Recommended Production Setting for Cassandra
vm.max_map_count = 131072
Your 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 -p
Now we’re going to turn-off swap. This can be done with the following command:
swapoff --all
Then, we’ll entirely disable swap by removing all swap entries from /etc/fstab:
vim /etc/fstab
If 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 0
Your file should now look very similar to this before removing the above line:
Exit and save the file with the command :wq . Done!
Related Articles:
About the Author: J. Mays
As a previous contributor, JMays shares his insight with our Knowledge Base center. In our Knowledge Base, you'll be able to find how-to articles on Ubuntu, CentOS, Fedora and much more!
Our Sales and Support teams are available 24 hours by phone or e-mail to assist.
Latest Articles
How to Clone a Drupal Site to Another Domain
Read ArticleTop Eight Virtualization Security Issues and Risks
Read ArticleAccessing Man Pages on Ubuntu 16.04 LTS
Read ArticlePremium Business Email Pricing FAQ
Read ArticleMicrosoft Exchange Server Security Update
Read Article