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
memory allocated by index is never reduced #4780
Comments
The issue is not that it doesn't release memory back, but that the memory gets fragmented over time. |
Still waiting for reproducer. |
I would say it's not a bug but known behavior. Any index does not free any memory; it stays reserved for further insertions. This approach not only makes implementation easier but have some performance advantages as well. I'm not sure we'll change it anytime soon. |
@alyapunov all true, as long as this memory doesn't grow over time. I mentioned that this test case is not complete, it needs tweaks to reproduce a real bug. |
on another note, @alyapunov earlier there was a patch which reduces memory fragmentation in slab_arena by sharing the oscillation slab. @kyukhin refused to accept it then, may be you can take a look at it now and queue. |
Tried to tweak the test. I do not see any trace of fragmentation problem. I fear I don't know where to dig. Hash index test
Tree index test
|
@alyapunov the delete/insert part should be run in a loop for at least some time: Populate a table to contain 10 000 rows. In a loop: insert 1-1000 rows with autoincrement (random value between 1 and 1000), delete similar number of rows from the first part of the range. Run the test for a while, a few minutes, if not hours, at least. |
Made exactly suggested test. The last loop lasted for 10-15 minutes. Nothing. Test
It seems that we're done here. |
Tarantool version:
I think any version is affected. I reproduce it on 1.7.5, 1.10.3, 2.1.2, 2.3.1.
OS version:
linux
Bug description:
I found out that space size is less then index size. It happens when rows are removed from space, but index memory is still allocated.
Steps to reproduce:
The text was updated successfully, but these errors were encountered: