]> git.ipfire.org Git - thirdparty/knot-resolver.git/commit
daemon/worker: drop caching of kr_request mempools
authorVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 3 Aug 2022 14:52:01 +0000 (16:52 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 11 Aug 2022 09:24:00 +0000 (11:24 +0200)
commit17815ff3f73fd94a2760d4de06ea92885dedb061
treeed7b51f67d06c3da7dd98b81b01bc163e0aaa9df
parent8ef99b1b50559f3e84d1472b6fb0a0607cb0723f
daemon/worker: drop caching of kr_request mempools

This caused a huge increase in real memory usage in case of queries
arriving to kresd while being disconnected from internet.
The usage was slowly creeping up, even over 2G.

Interesting past commits: b350d38d and two preceding.

There apparently was no real memory leak.  I assume that reusal of
long-living mempools is risky in terms of memory fragmentation,
though the extent of the issue surprised me very much.
The issue seemed the same with normal glibc and jemalloc.

I generally dislike ad-hoc optimization attempts like these freelists.
Now the allocator can better decide *itself* how to reuse memory.
NEWS
daemon/worker.c
daemon/worker.h