From nobody Fri Sep 13 07:14:33 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 4X4ltN4dkDz5W9jn for ; Fri, 13 Sep 2024 07:14:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X4ltN43xTz4RFb; Fri, 13 Sep 2024 07:14:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726211676; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2ir0WFE3bs+oBB1frImKikVZQAF/pu+ndfEO47Q8KAs=; b=FNvtK2tyTWjo72nRiCyLt6OsPtzzB737H9NVDtfJB7R/81rs6QpFFete+hYdykuTy3nsD+ JcZRhff3XaMfywcp4HQmwTT80Av0iW2wuiFPdvxuw7sNpMrnYR79VXDveNauAe0cdCLv4Q hpfT2UA6gMgpYCKuzGALb8om7tkzAkRWFgc7Ori4jE/x3S9ieKsi2ErRiYW2pSJWdB/QKo BSQ4xl5J2uBhhg4k81b7PB5rxPxdcw6w9nXLHu+fnwhBhSFMpr+ZhTjJpEWVJfkUVBIDAD VshfH+XRTTb/B4FEojajYsTWnn9gbzcNvcR++LdeLPJErDvW4tdXVYbp9nEhdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726211676; a=rsa-sha256; cv=none; b=VUFNsViHMDsg9sDBnrEGoucqFETxXftOoWrZVPc7ycaPuuuBEK0jz0kmJf2RkLML8TFsES XAmdT3bHYCkoeaOwUT/h9QsAUh54boVX3u2dHX6zH/7ys9JggF88P2TvVs5obzcMvO5jy1 EUXQ6DzjsrryrQD2LriY4Zxd953pFq8XKisy6EPykq1HSQo0NlM3efXEHQayxS+6QMgRbS RT/actneI2Wg57vboK+PqaRFarMj2F/TBaXiuKl8Gi9KYH5+w/Uul+xAu2Dh5qDRU3BKr8 YBC/R834YwdO7jXUrhDRa65Yuni+Kb+8a2R/JOElVxBP4QopDbnubFdxcea92g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726211676; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2ir0WFE3bs+oBB1frImKikVZQAF/pu+ndfEO47Q8KAs=; b=VDzyN3qUy92zCoYVi+5Lxdpige0gz4U9Khx3RjgT640q2sslmtRg2NgbXVU5iZiYcYXk/z 11ki5pV+5YgeaOk1eUtVo9z0eF3r0MUBM5mPQNXUXzfRfCr1Bk+mCdDZyd2eVCnNeLEYL/ 5uAgdwdY0sS3zvqGzgm0lMQyjOLHYIZe5+EkUR4AJur+vW/UH59ejSlaZNsPHSxy1WMHRj XujNviI4ZOVGzXE4XXOijHpbpYzfUUTp0p/t5W+yiNlz0Qct1ZjHH04s5fNXIMQpbK0+0L FWu80hwzIEu6vulDn9Nmqp3iUIZEwLdlNIovmfeOaGGOTiG4+ohyBd28DmItEg== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (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 RSA-PSS (2048 bits) client-digest SHA256) (Client CN "tensor.andric.com", Issuer "R10" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4X4ltN2y5rz14Qt; Fri, 13 Sep 2024 07:14:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (longrow.wg.andric.com [10.69.1.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 4F9D639521; Fri, 13 Sep 2024 09:14:34 +0200 (CEST) Content-Type: text/plain; charset=us-ascii 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 (Mac OS X Mail 16.0 \(3731.700.6.1.2\)) Subject: Re: How to explain high memory consumption of a jail after all large processed in it have finished? From: Dimitry Andric In-Reply-To: Date: Fri, 13 Sep 2024 09:14:33 +0200 Cc: Freebsd hackers list Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Yuri X-Mailer: Apple Mail (2.3731.700.6.1.2) On 12 Sep 2024, at 20:45, Yuri wrote: >=20 > 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. >=20 >=20 > 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). >=20 >=20 > 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. >=20 >=20 > 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. >=20 >=20 > How to explain the high memory consumption of a jail after all large = presses have finished? Most likely this is tmpfs. Look at the USE_TMPFS=3D setting = poudriere.conf. I usually set it to "localbase", otherwise my rather low = memory boxes all blow up. Or you can just use "no" to turn it off = entirely, which might make it a little slower. -Dimitry