gc: don't re-open cache so often
Re-opening the cache every interval (1s by default) causes fsync. Normally that isn't noticeable, but on encrypted ZFS it causes high CPU consumption (even when "idle"). Reported on gitter.
Merge request reports
Activity
added performance label
added 30 commits
-
e3946fd3...4925fda0 - 27 commits from branch
master
- 415f564e - gc: don't re-open cache so often
- f991063a - gc: make state in kr_cache_gc() explicit
- f13e4cfb - gc: make the log more readable
Toggle commit list-
e3946fd3...4925fda0 - 27 commits from branch
I reviewed this, cleaned up and did some testing.
@amrazek: if I look correctly, there should be only trivial conflicts with the sysrepo-related changes. I see no need to resolve them quickly. Note that some events (e.g. changing location of cache) will newly need the GC to explicitly call
kr_cache_gc_free_state(&gc_state);
to trigger re-opening the cache.mentioned in commit 3b747b57
mentioned in issue #549 (closed)
mentioned in issue #563 (closed)