-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
off-heap memory used by oakMap can not be released #192
Comments
private final OakMapBuilder<Long, AckData> oakMapBuilder;
|
Oak has a cached memory pool. It reuses the memory for other Oak instances. |
I create 100 OakMap. One thread keeps calling oakMap.putIfAbsent(key, value), and the other thread keeps calling oakMap.get(key) and oakMap.remove(key). During this period, no new OakMap will be created. A few days later, I found that my process is down due to outOfMemroy |
Yes, I will not create new Oak Instances and need to release the memory back to the OS |
Hi @fujian-zfj , Thanks for your interest in Oak and sorry for late reply. The issue that you see is because currently keys in the OakMap are not released and with the time going keys are consuming the memory. It was written that way because until now OakMap was used for relatively short periods of time and keys are usually not big. However, we already have PR#188 where we are adding the new memory manager and the ability to release keys to OakMap. So it is mater of a week or so. If you need it really urgently, may be you would like to try OakHash (not ordered) instead of OakMap (ordered). In OakHash keys are released in time of the mapping remove. Are you using public release or current master? |
I use current master. And what I need is OakMap(ConcurrentSkipListMap) instead of OakHash. I am looking forward to the new memory manager which has the ability to release keys to OakMap. If possible, I hope it can be launched as soon as possible, and I will continue to follow up on this issue. |
I use oakMap instead of concurrentSkipListMap in my project, while I find something strange.
When I no longer use an oakMap, java heap memory used by this oakMap is released, but off-heap memory does not seems to be released.
I use NMT to track the use of off-heap memory, and I find something strange.
ggggggggg
The heap memory occupied by current process is very small, but through the linux system command "top" found that it occupies huge memory. And I analyze the memory distribution in heap and find that heap memory used by the current process is very small. By the way, therer is no OakMap object in heap memory.
The text was updated successfully, but these errors were encountered: