How to explain high memory consumption of a jail after all large processed in it have finished?

From: Yuri <yuri_at_FreeBSD.org>
Date: Thu, 12 Sep 2024 18:45:16 UTC
I noticed that when the port lang/rust is building in the poudriere jail 
the memory consumption of the host system remains high all the way into 
the packaging phase when the pkg-static process is the only active 
process and it consumes a very little memory.


During build a lot of memory is consumed, which is understandable. The 
system remains at ~500MB of free memory through the build process, 
according to top(1).


But once the build is finished, poudriere goes into the "packaging" 
phase which only runs a small pkg-static process that compresses the 
built files. pkg-static is the only active process in the poudriere jail.


What looks strange to me is that the host system's memory consumption 
remains high through the "packaging" phase which itself is low in 
memory, and only goes down when the jail is destroyed.


How to explain the high memory consumption of a jail after all large 
presses have finished?



Thanks,

Yuri