它使用堆内存还是剩余服务器内存?
我有一台 RAM 为 32 GB 的服务器,我使用 25 GB MAX_HEAP_SIZE 初始化了 Cassandra,并指定了 20 GB 的行缓存容量。
我是否正确地假设行缓存使用我初始化进程所用的堆内存?或者我的配置是否期望服务器至少有 45 GB 的 RAM?
最佳答案
This row key documentation声明有 2 个实际的 row_cache_provider 实现:
SerializingCacheProvider: Serializes the contents of the row and stores it in native memory, that is, off the JVM Heap
和
ConcurrentLinkedHashCacheProvider: Rows are cached using the JVM heap, providing the same row cache behavior as Cassandra versions prior to 0.8.
默认值为SerializingCacheProvider,因此如果您不更改它,行缓存将不使用 JVM 堆内存。
关于java - Cassandra 使用哪些内存作为行缓存?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17884314/