Cassandra_调整占用内存大小
来源:互联网 发布:mac adb 工具下载 编辑:程序博客网 时间:2024/05/08 05:11
Cassandra 下面的运行环境基于Java , 可以调整Cassandra 的占用的资源大小
主要依据于以下两个参数:
MAX_HEAP_SIZE
HEAP_NEWSIZE
这两个参数位于 cassandra-env.sh 文件内
Determining the heap size
You might be tempted to set the Java heap to consume the majority of the computer's RAM. However, this can interfere with the operation of the OS page cache. Recent operating systems maintain the OS page cache for frequently accessed data and are very good at keeping this data in memory. Properly tuning the OS page cache usually results in better performance than increasing the Cassandra row cache.
max(min(1/2 ram, 1024MB), min(1/4 ram, 8GB)
- Heap size is usually between ¼ and ½ of system memory.
- Do not devote all memory to heap because it is also used for offheap cache and file system cache.
- Always enable GC logging when adjusting GC.
- Adjust settings gradually and test each incremental change.
- Enable parallel processing for GC, particularly when using DSE Search.
- Cassandra's GCInspector class logs information about any garbage collection that takes longer than 200 ms. Garbage collections that occur frequently and take a moderate length of time (seconds) to complete, indicate excessive garbage collection pressure on the JVM. In addition to adjusting the garbage collection options, other remedies include adding nodes, and lowering cache sizes.
MAX_HEAP_SIZE
- Set the maximum heap size in the cassandra-env.sh file to a high arbitrary value on a single node. For example:
MAX_HEAP_SIZE="12G"
- Enable GC logging.
- Check the logs to view the heap used by that node and use that value for setting the heap size in the cluster:
If you don't see improved performance, contact the DataStax Services team for additional help.
HEAP_NEWSIZE
- 100 times the number of cores
- ¼ of MAX_HEAP_SIZE
HEAP_NEWSIZE="800M"
A larger HEAP_NEWSIZE leads to longer GC pause times. For a smaller HEAP_NEWSIZE, GC pauses are shorter but usually more expensive,
原文地址:
http://docs.datastax.com/en/cassandra/2.1/cassandra/operations/ops_tune_jvm_c.html#opsTuneJVM__tuning-the-java-heap
- Cassandra_调整占用内存大小
- YUV数据占用内存大小
- bitmap占用内存大小
- Java对象占用内存大小
- Java对象占用内存大小
- 基本类型占用内存大小
- bitmap占用内存大小总结
- 类的占用内存大小
- 计算bitmap占用内存大小
- TOMCAT内存大小调整
- TOMCAT内存大小调整
- TOMCAT内存大小调整
- 如何调整weblogic内存大小
- TOMCAT内存大小调整
- 调整JVM内存大小
- tomcat内存大小调整
- 调整JVM内存大小
- jvm 调整内存大小
- python聚类算法以及图像显示结果--python学习笔记23
- prop 和 attr的区别
- Java中如何高效的判断数组中是否包含某个元素
- Android App的设计架构 MVC,MVP,MVVM与架构
- 支付宝集成过程详解——运行DEMO
- Cassandra_调整占用内存大小
- Blocked Finalizer Thread
- 数据结构--树
- proxy-target-class="true" 与proxy-target-class="false"的区别
- Sam后缀自动机模板
- iOS加急审核
- [转]设置元素透明度,div内子元素不透明opacity
- Android studio build.gradle 重要属性值解析
- ElasticSearch学习22_百姓网 Elasticsearch 2.x 升级之路