libkestrel icon indicating copy to clipboard operation
libkestrel copied to clipboard

Use of MappedByteBuffer can deal to (practically) unbounded virtual memory usage

Open eric opened this issue 11 years ago • 1 comments
trafficstars

With a high volume of messages I've seen 20 or more deleted journal files still mapped according to /proc/<pid>/maps.

It looks like the JVM is expected to just unmmap() those when the MappedByteBuffer is GC'd, but I've seen that it can take a surprisingly long amount of time for them to be cleaned up.

Has anyone else experienced this?

eric avatar Nov 24 '13 04:11 eric

It appears this is the solution to unmmap()-ing:

https://github.com/apache/cassandra/blob/f69e043ce4a4c8ecba6682fcd7ddf771a773afea/src/java/org/apache/cassandra/io/util/FileUtils.java#L52-L68 https://github.com/apache/cassandra/blob/f69e043ce4a4c8ecba6682fcd7ddf771a773afea/src/java/org/apache/cassandra/io/util/FileUtils.java#L272-L291

eric avatar Nov 25 '13 04:11 eric