From nobody Fri Sep 13 06:47:52 2024 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X4lJg4xHRz5W6Sg for ; Fri, 13 Sep 2024 06:48:51 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from mailgate.Leidinger.net (bastille.leidinger.net [89.238.82.207]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (P-256) client-digest SHA256) (Client CN "mailgate.leidinger.net", Issuer "E5" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X4lJf6rJtz4LfB; Fri, 13 Sep 2024 06:48:50 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Authentication-Results: mx1.freebsd.org; none List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leidinger.net; s=outgoing-alex; t=1726210122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=l4jHjc3BrNLWvGTulAjjoo9jGrrlOwN4itZgIFwV7Xs=; b=1VaUOID143CVQsGKm4ulvuANLXSP0uDyoY8sWNZezrm8wLEIzHagm0IFjdtK8laljO3BzW BpEEx56Dt8yKaNl7GVStwjKE8ZNqEgOQxj9W+OSPCPjAOFN/bbkxqislR+PNmFQxWGSZaa 2IAvq/E+0pak/LDED9+dQEqefIWNnT+YEi4fcXF5KF8M6Z0cUH4VxkvbkVVa6pNTc07Gdb tNmoK9GiQFWAewtSq/p+7ywR4syeIoBn3QQ4DJUzgZ2IKGAklqqSnkLdSaxpocguh2Gknp EQeA37yTnbEr/j3bFaCiOGJP14lhRdQ4wueI93WIxyAUMoMB9YeAgC04x3SYxw== Date: Fri, 13 Sep 2024 08:47:52 +0200 From: Alexander Leidinger To: Yuri Cc: Freebsd hackers list Subject: Re: How to explain high memory consumption of a jail after all large processed in it have finished? In-Reply-To: References: Message-ID: <1a71adc61f78a9f09e825d1f37fd9461@Leidinger.net> Organization: No organization, this is a private message. Content-Type: multipart/signed; protocol="application/pgp-signature"; boundary="=_963277b86430c7fcb3ec3a43502aacbb"; micalg=pgp-sha256 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:34240, ipnet:89.238.64.0/18, country:DE] X-Rspamd-Queue-Id: 4X4lJf6rJtz4LfB This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --=_963277b86430c7fcb3ec3a43502aacbb Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Am 2024-09-12 20:45, schrieb Yuri: > 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? That's not enough information to answer it, but my crystal ball hints at an interaction between nullfs/zfs. Most probably it's not the jail-teardown itself which frees the mem, but the unmounting of some nullfs mounts. Depending on the version of FreeBSD you are using, you could try if "sysctl vfs.nullfs.cache_vnodes=0" changes this behavior (I'm not saying that this is a "solution" to the "issue" you see, I simply say this may change the behavior). Bye, Alexander. -- http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF http://www.FreeBSD.org netchild@FreeBSD.org : PGP 0x8F31830F9F2772BF --=_963277b86430c7fcb3ec3a43502aacbb Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc; size=833 Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEER9UlYXp1PSd08nWXEg2wmwP42IYFAmbj4CgACgkQEg2wmwP4 2IZF+w//SeMMxqHXEW/WBhQSRht+FDf1jINs198yyuObKDfShsaFYHEDzZ6G9lUG b/ZyEtqihVKe6+1p0o3TipqVsdwFtzfq7T0jan3flxN+hZn/ZrlR+g/Mr/66aIu5 A6z6ybz1cnoxd0jRjpJwaRTdj2MzUMv+SytyiItyCj5b2qlPc2wdAJ1P4ybIpnef vxDXNnUt/fhKQRGAuy/MT7Kb3/CMm8PF/5lAvRGGQ/HoxfBdYuVY/tNAFCNcfwu+ avONnDcE6ZcCou29uK4ow+5hBxV0f9Y8MXiP6hwqZV0FK+pT9IeT6u4drf+t7Nab efBI3U3pRy865qeKkIWA4BMcsqAaMjYJ6Rv1hI00rTQrePsBLH6Lrw93RibLoElD UqiWvzYzadIOF0o2eontTEKocde07QsfJcZh7HsCB0MgDbfXHWiNJG7H4bzfNxsV XPulgr/lylgQXmNruikTHqvT391qO4AzW1xUzNQUg60kePcaBnvF3rCgtffRjFUR 18RXagYuF4UguWUNi7h15nwqRpz3BJCkaZCjLzexH+rq6YG8iZUUAYxxeqxghIYs m+k/h+0DOU0svFbxA1DxgfZD4UNg1jKaubqjc03Ow9b+SGueZs2qe39AVMmgmy3X T0ryqIWYT2NSDpTjpwd5SOIivEr6kHeXF4CRSaPdIVwMYxBJhzY= =8otd -----END PGP SIGNATURE----- --=_963277b86430c7fcb3ec3a43502aacbb--