From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 5560 invoked from network); 9 Jun 2021 08:32:50 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 9 Jun 2021 08:32:50 -0000 Received: (qmail 22507 invoked by uid 89); 9 Jun 2021 08:33:14 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Received: (qmail 22500 invoked from network); 9 Jun 2021 08:33:14 -0000 Date: Wed, 9 Jun 2021 08:32:46 +0000 From: Colin Booth To: Arjun D R Cc: Dewayne Geraghty , supervision@list.skarnet.org Subject: Re: Query on s6-log and s6-supervise Message-ID: <20210609083246.GA3037@cathexis.xen.prgmr.com> References: <6a95462b-547f-bef8-7cc2-8d9e26b6a61d@heuristicsystems.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) On Wed, Jun 09, 2021 at 09:00:38AM +0530, Arjun D R wrote: > Thanks Laurent for the brief detail. That really helps. > > I have checked the Private_Dirty memory in "smaps" of a s6-supervise > process and I don't see any consuming above 8kB. Just posting it here > for reference. > > grep Private_Dirty /proc/991/smaps > Private_Dirty: 0 kB > Private_Dirty: 4 kB > Private_Dirty: 4 kB > Private_Dirty: 8 kB > Private_Dirty: 0 kB > Private_Dirty: 0 kB > Private_Dirty: 4 kB > Private_Dirty: 4 kB > Private_Dirty: 4 kB > Private_Dirty: 0 kB > Private_Dirty: 0 kB > Private_Dirty: 4 kB > Private_Dirty: 4 kB > Private_Dirty: 0 kB > Private_Dirty: 0 kB > Private_Dirty: 8 kB > Private_Dirty: 8 kB > Private_Dirty: 8 kB > Private_Dirty: 0 kB > Private_Dirty: 0 kB > Private_Dirty: 8 kB > Private_Dirty: 4 kB > Private_Dirty: 4 kB > Private_Dirty: 0 kB > Private_Dirty: 8 kB > Private_Dirty: 4 kB > Private_Dirty: 4 kB > Private_Dirty: 4 kB > Private_Dirty: 0 kB > Private_Dirty: 0 kB > ... snip... In a fully dynamic world a large number of dirty pages is expected, even if each segment is only one or two pages. There's nothing particularly surprising here when using a distro provided s6 that's linked dynamically. > > I have tried with flag "--enable-allstatic" and unfortunately I don't see > any improvement. If you were mentioning about shared memory, then yes we > are good here. It is using 2.1 MiB for 129 instances, but the private > memory is around 12.2 MiB. I am not sure whether this is the normal value > or not. > If you're building against glibc then allstatic probably won't help. The default config options for s6 will build with static links against all libraries but the libc which is a pretty decent tradeoff between efficiency and convenience, but to see super low dirty memory you'll need to use a libc that can actually be linked statically such as musl. For your needs, using a musl toolchain and building a fully static s6 should get you significantly better memory usage. -- Colin Booth