From nobody Mon Jun 6 12:49:37 2022 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 4B61A1BE9307 for ; Mon, 6 Jun 2022 12:49:40 +0000 (UTC) (envelope-from debdrup@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (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 "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LGtc36XLjz3NTZ for ; Mon, 6 Jun 2022 12:49:39 +0000 (UTC) (envelope-from debdrup@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654519779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=paGPQ3+Fb9rGv5zgNzclDqtt6dW5+mFG5PUTOShzUto=; b=RFVmmW7IGxMQ8ZJyFbmnsezpRXmYXBJpK6X48/+KOBbWN4knGX+nHbrDqRxHAq2K2UOnjv u1B0ods/3JHG33JeET3LnlKYTk8/KpXYvetGyOwoFW1niz7bvr9ARIuy+zUbCSt4zsAPo7 bhVhliBN/KIl8p5/9eTJYwYZYWsjMxihtNteWBYZTjlsRpcZpj6iGCEdy1Asj7fKbBcokF S1zmy456aK3ZgR9Z5a2CbeixVYv2fpFXWLFsZ5UlVBm0HxfppCnVtUR0U8aFlm4pt9tYTL aa1I36POPmsGGcgx3Q8sejtrj5L5BsCklLBmC9/5zUQ7Gh3fTBjc1kF79jqxzw== Received: by freefall.freebsd.org (Postfix, from userid 1471) id C9194BAFF; Mon, 6 Jun 2022 12:49:39 +0000 (UTC) Date: Mon, 6 Jun 2022 14:49:37 +0200 From: Daniel Ebdrup Jensen To: freebsd-hackers@freebsd.org Subject: Re: What can I learn about data that is staying paged out? (There is a more specific poudriere bulk related context given.) Message-ID: <20220606124937.exjit7znetcx6t6z@geroi.local> References: <27DD20B8-E19B-444B-BAE7-A09CD5390D2F@crossfamilyweb.com> <50163894-DCEB-4033-B555-698523E4D100@yahoo.com> 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 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wedjdybktmzss6rh" Content-Disposition: inline In-Reply-To: <50163894-DCEB-4033-B555-698523E4D100@yahoo.com> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654519779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=paGPQ3+Fb9rGv5zgNzclDqtt6dW5+mFG5PUTOShzUto=; b=AhdWOiNtNNYV3gZB21SMzkIf96JjixnpBSDlXBAvH4ZiE0bLNEtDm6k5Hq03g7vQkIe62h sxU7DKAoaU43efpireh9L580W42QjGZ60y7GUhR/G4gjHwnsKca1FAwhCA0xqX2poqYJ51 Krj3D1Zsl/BTLW/RO+GIeD5mg/mDCv6fCOSeMmQRrP4CinF2O5D3lpAeCn35Nno4ZaB/Uq Y1s5bZ4RHZz/T4TAWqSv/Nw2GR4cDYnMvH7mA6QlMzyvSl/JsGs5oJ5Ww4uQRRPstGrTY8 dFdY+K2vZEG1cUyCANh8Q4Q5R8Yb7f5apmYGcmujMUNE0WCMyPwm0f4nifrsZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1654519779; a=rsa-sha256; cv=none; b=HNidQ4PyHKrr2N5jbAk4QTXlLcenMcOK5z/Hk3K72vDu+GvvnMfbyWeiW4bU+MFELi0xH0 7svEKL/dddp9/SkY163Lj9stAvQ0bE2Yl/Cfoxmos8NJovttvl+k48e2q+kXbu6jkexw8y d3RscEE6ps6oK6+L6FtGFXhOlBtDlaYS3qABXb25P1ribZ9nR1Rdj9i/Alrk6/zYYuNVJP OLo+iskkeHA/HE7haIzXpa7xyhVT0io+/OHdOEylfuuC1ndR4rpCLlB321CK95VSxQolN+ 53iE9z7q0syN8qwYrbaIwKwRomHBpsUEqjEakVtUQUT1Ey5LvAbUU9xqE7oINg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --wedjdybktmzss6rh Content-Type: multipart/mixed; boundary="x3jibatkpmiijy2n" Content-Disposition: inline --x3jibatkpmiijy2n Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline On Sun, Jun 05, 2022 at 03:55:21PM -0700, Mark Millard wrote: >Thanks for the idea. Know how I could find an approximation >to the amount of paged out buffer cache to see about how much >of the ~300 MiBytes it might explain? > >Mark > >=== >Mark Millard >marklmi at yahoo.com > > Hi folks, I believe what you're looking for is: vmstat -o | awk '$7 == "sw" { print $0 }' The definition of the 7th column is escaping me right now; I'm pretty sure I've seen it in a manual page somewhere, but can't for the life of me remember it - so if anyone knows, do tell and I'll figure out a way to get it added to vmstat. ;) If a lot of lines in vmstat -o are blank, it's usually a good idea to have a look at `pstat -f` because it'll either be shared memory objects, sockets, pipes, or things like that. There's also vmstat -m or vmstat -z which can be useful in breaking down types of VM objects by allocator. I've also taken the liberty of including `zones.pl` which has been floating around FreeBSD circles for ages, and which uses the vmstat -z flag mentioned above plus a bit of perl to sum everything up nicely. This is just what I've picked up over the course of sysadmining, I'm by no means a VM expert - as evidenced by the fact that I didn't know about sytat -swap, despite using systat regularly, and wishing it had a `systat -sensors` page which detailed the temperature values that can be found via acpi(4), coretemp(4) and occationally others, as well as fan-speed as reported by acpi_ibm(4) and others of its kind in /boot/kernel/acpi_*. Yours, Daniel Ebdrup Jensen --x3jibatkpmiijy2n Content-Type: text/x-perl; charset=us-ascii Content-Disposition: attachment; filename="zones.pl" #!/usr/bin/env perl open STDIN, "vmstat -z |" or die "Failed to run vmstat program"; open STDOUT, "| sort -n @ARGV -k 2" or die "Failed to pipe through sort"; $fmt="%-30s %8.3f %8.3f %8.3f %6.1f%%\n"; while () { ($n, $s, undef, $u, $c) = split /[:,] */; next unless $s > 0; $n =~ s/ /_/g; $s /= 1024 * 1024; $u *= $s; $c *= $s; $t = $u + $c; next unless $t > 0; printf $fmt, $n, $t, $u, $c, 100 * $c / $t; $cache += $c; $used += $u; $total += $t; } printf $fmt, TOTAL, $total, $used, $cache, 100 * $cached / $total; close STDOUT; --x3jibatkpmiijy2n-- --wedjdybktmzss6rh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAABCgB9FiEEDonNJPbg/JLIMoS6Ps5hSHzN87oFAmKd9+FfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDBF ODlDRDI0RjZFMEZDOTJDODMyODRCQTNFQ0U2MTQ4N0NDREYzQkEACgkQPs5hSHzN 87py4Af/b+AcDo6iLCpI4y/PvBN3wkH91bxOgNrjhBTsV/cKOe4mY01DwFuYlCwb k+rssETbOLt8dwo6HVMz9Apb5kImCfM1RwWfL0fmhEYX/iaaYu81+JtF0lk45Q9z 0TFD2YGrcCkig6Gs8z5WC7PO0JjmOO8EGVucB7/gZAJV95TamfNZs8+LPsJAazUk rkz/TojFNB/fUMP3InUYe4Xv8n1JBIUq2pcOm09BVTCMOBy8UPmy9FpAWSnueQb7 y7XDWFeiuPqfeK9erverat5lO6ofZLsUEs0dwcrLCiVijbiR3A1xtP6RITRFVr0G bzEmH8HlS3Xv/XHJRZvCDNJ6rtyLmA== =9fK8 -----END PGP SIGNATURE----- --wedjdybktmzss6rh--