0

our project use rocksdb with rocksdbjni that is nice and easy to use. but, some problems give me a headaches. when i close the rocksdb the momery in used doesn't properly reclaimed. It seems to depending on OS.

so i did some test with this code in macos and centos. test is simple, just compare memory changes when multiple rocksdb are opened & closed. the result is below.

memory not reclaimed on centos. if you know anything about this, please give me some advice.

  • macos(pm)

image

  • centos(vm)

image

kospi
  • 355
  • 5
  • 14
  • without any code - there is no way to tell if your bench marking is correct. You are running this in a jvm? and printing out how much jvm memory is being used after all the rocksdb instances are closed? – Asad Awadia Apr 11 '23 at 01:59
  • @AsadAwadia you can bench marking test code in here https://github.com/donggyu04/rocksdb-m-reclaim-test/blob/main/src/main/kotlin/org/rocksdb/example/RocksDbProcessor.kt I ran this code on jvm, It doesn't seem to use much jvm heap but much of native memory was used – kospi Apr 12 '23 at 07:35
  • The memory left is what is being used by the jvm to run your code – Asad Awadia Apr 12 '23 at 11:31

0 Answers0