Managing memory

Because DataStax Enterprise runs in a distributed environment, you can inadvertently add excessive data that exceeds the available memory.

When using DSE In-Memory, you must monitor and carefully manage available memory.

You can use OpsCenter to monitor in-memory usage.

DSE In-Memory retains the durability guarantees of the database.

To prevent exceeding the RAM capacity, DataStax recommends that in-memory objects consume no more than 45% of a node’s free memory.

Managing available memory

If the maximum memory capacity is exceeded, locking some of the data into memory is stopped, read performance degrades, and a warning message is displayed.

The warning message looks something like this:

WARN  [main] 2015-03-27 09:34:00,050  MemoryOnlyStrategy.java:252 - File
MmappedSegmentedFile(path='/data/ks/test-f590c150b95911e4b66d85e0b6fd73a5/ks-test-ka-94-Data.db',
length=43629650) buffer address: 140394485092352 length: 43629650 could not be locked.
Sizelimit (1048576) reached. After locking size would be: 43630592

Checking available memory

Use the dsetool inmemorystatus command to check the amount of data that is currently in memory. When the data size exceeds the specified Max Memory to Lock value, or some other problem exists, the Couldn’t Lock column displays its value. The system.log file provides useful information for problem resolution.

dsetool inmemorystatus
Max Memory to Lock:                             1MB
Current Total Memory Locked:                    0MB
Current Total Memory Not Able To Lock:         46MB
Keyspace              ColumnFamily                   Size     Couldn't Lock   Usage
mos_ks                testmemory                      0MB              46MB      0%
mos_ks                testmemory2                     0MB               0MB      0%
mos_ks                testmemory4                     0MB               0MB      0%
mos_ks                testmemory3                     0MB               0MB      0%

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com