-
Notifications
You must be signed in to change notification settings - Fork 23
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
region_reset() leaks memory #12
Comments
Totktonada
added a commit
that referenced
this issue
Jan 29, 2020
This reverts commit 67d7ab4. The goal of the reverted commit was to fix flaky fails of tarantool tests that checks amount of memory used by a fiber: | fiber.info()[fiber.self().id()].memory.used It also attempts to overcome the situation when a fiber holds some amount of memory, which is not used in any way. The high limit of such memory is controlled by a threshold in fiber_gc() tarantool's function (128 KiB at the moment): | void | fiber_gc(void) | { | if (region_used(&fiber()->gc) < 128 * 1024) { | region_reset(&fiber()->gc); | return; | } | | region_free(&fiber()->gc); | } The reverted commit, however, leads to significant performance degradation on certain workloads (see #4736). So the revertion fixes the performance degradation and opens the problem with tests, which is tracked in #4750. Related to #12 Related to tarantool/tarantool#4750 Fixes tarantool/tarantool#4736
kyukhin
pushed a commit
that referenced
this issue
Jan 29, 2020
This reverts commit 67d7ab4. The goal of the reverted commit was to fix flaky fails of tarantool tests that checks amount of memory used by a fiber: | fiber.info()[fiber.self().id()].memory.used It also attempts to overcome the situation when a fiber holds some amount of memory, which is not used in any way. The high limit of such memory is controlled by a threshold in fiber_gc() tarantool's function (128 KiB at the moment): | void | fiber_gc(void) | { | if (region_used(&fiber()->gc) < 128 * 1024) { | region_reset(&fiber()->gc); | return; | } | | region_free(&fiber()->gc); | } The reverted commit, however, leads to significant performance degradation on certain workloads (see #4736). So the revertion fixes the performance degradation and opens the problem with tests, which is tracked in #4750. Related to #12 Related to tarantool/tarantool#4750 Fixes tarantool/tarantool#4736
kyukhin
pushed a commit
that referenced
this issue
Jan 29, 2020
This reverts commit 67d7ab4. The goal of the reverted commit was to fix flaky fails of tarantool tests that checks amount of memory used by a fiber: | fiber.info()[fiber.self().id()].memory.used It also attempts to overcome the situation when a fiber holds some amount of memory, which is not used in any way. The high limit of such memory is controlled by a threshold in fiber_gc() tarantool's function (128 KiB at the moment): | void | fiber_gc(void) | { | if (region_used(&fiber()->gc) < 128 * 1024) { | region_reset(&fiber()->gc); | return; | } | | region_free(&fiber()->gc); | } The reverted commit, however, leads to significant performance degradation on certain workloads (see #4736). So the revertion fixes the performance degradation and opens the problem with tests, which is tracked in #4750. Related to #12 Related to tarantool/tarantool#4750 Fixes tarantool/tarantool#4736
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
region_reset() only marks the first block as free. There may be other blocks which are neither reset no returned to the slab cache. Better free all blocks except the first - that would be both fast for small amounts and safe for big ones.
The text was updated successfully, but these errors were encountered: