Initial optimization of performance

Source: Internet
Author: User
Tags cassandra

According to the official documentation, the installation of JNA can improve the memory usage performance of Cassandra, and on Linux it does not need to put JVM memory on the swap partition to prevent related performance issues.

Cassandra 2.0.9 requires JNA 3.2.7 or more, it is recommended to download the installation directly without Yum.

1. Download Jna.jar wget Https://maven.java.net/content/repositories/releases/net/java/dev/jna/jna/4.1.0/jna-4.1.0.jar

2, put Jna.jar to Classpath

3, modify the/etc/security/limits.conf

123 vi /etc/security/limits. confCassandra soft memlock Unlimited Cassandra hard memlock unlimited

Note: Cassandra This user name is the one we use later to start Cassandra. If none of the above statements will prompt such a warning:

1 WARN 21st:16:33,064 UnableTo LockJvmMemory (Enomem). This AaResultInch Partof the JVM being swapped out, especially with mmapped i/o Enabled. increase rlimit_memlock or run cassandra as< Span class= "crayon-h" > root

4, verify whether the installation is successful through our installation in the "Cassandra 2.x Chinese Course (2): Perform simple CQL operation" article installed in the environment can be seen, if you do not install JNA, then start with such a hint

1 INFO :827 JNA not found. Native methods'll be disabled.

After installing JNA, this is a hint.

1 INFO :076 JNA mlockall successful

5, for the production environment of the configuration of the official recommendations are as follows

12345678910111213141516 vi /etc/security/limits. conf Cassandra - memlock Unlimited Cassandra - nofile 100000 Cassandra - nproc 32768 Cassandra -as Unlimited vi /etc/security/limits. D/+-nproc. conf Cassandra - nproc 32768 vi /etc/sysctl. conf VMs. Max_map_count = 131072 sysctl -p Swapoff -- All

Important!!! Sync time

Reference: Cassandra2.0 official documentation.

Initial optimization of performance

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.