Managing memory
How to manage available memory when using DSE In-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.
DSE In-Memory retains the durability guarantees of the database.
Recommended limits
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, and read performance will degrade 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%