Date: Sat, 3 Feb 2018 14:09:53 -0800 From: Mark Millard <marklmi26-fbsd@yahoo.com> To: FreeBSD-STABLE Mailing List <freebsd-stable@freebsd.org> Subject: Re: 50 percent swap used, but "ps auxww" output shows no processes swapped out Message-ID: <4AF9AE33-887E-43F3-8885-B8EF37185407@yahoo.com>
next in thread | raw e-mail | index | archive | help
Brandon Allbery allbery.b at gmail.com wrote on Sat Feb 3 21:18:53 UTC 2018 : > Swapping whole processes out is not really a thing any more. = Individual > pages are paged to/from memory; if a memory page has no backing file, = it > will be allocated a block in swap space as its backing storage. >=20 > (I'm not sure "W" status even means swap; I thought whole-process = swapping > wasn't even supported any more.) =46rom what I've seen on the lists there is a technical distinction made between "kernel stacks for the process no longer memory resident" (swapped out) and other pages for the process having paged to disk and not being resident. But many tools do not seem to present that point of view and still reflect an older view in the terminology used, including in documentation. One has to interpret what one is shown as I understand. As an example, top can show RES being zero despite the kernel stacks for the process not having been moved to disk. RES zero might not mean what one might expect about "swapped out". I do not know if a W after the first letter in state (STAT) for "ps auxww" track the kernel-stacks' resident-vs-not status for the process or not. (Matching your not sure status.) > On Sat, Feb 3, 2018 at 4:14 PM, Michael Voorhis <mvoorhis at = mcvau.net> wrote: >=20 > > Hi all, > > > > I've got an amd64 system running 11.1-STABLE r325027, with something > > like 20G of swap. "swapinfo" shows that half the swap is used. > > > > So of course I'm curious to know which processes have been swapped > > out. I'm not using any "tmpfs" filesystems; no ZFS, no huge amounts = of > > wired-down memory. The system's got 16 processors and 128G of RAM. = "ps > > auxww" output shows *no* processes that are swapped out (2nd = character > > in "STAT" field is "W"). Not a single one. The only process with a W = in > > the stat field at all is the "[intr]" kernel thread. > > > > What is using the swapspace The so-called swapspace is really the paging/swap-space with most of the use being paging typically. (As Brandon indicated.) Once a page is paged out, if the process sticks around but does not use or free the page, the page likely stays paged-out. (I'm guessing some at the intended results for default tuning --and that you probably are using default tuning.) So the in-use swapspace is likely from one or more existing processes that did page-outs earlier. (Expect my descriptions to be over simplified, but hopefully pointing in the right general direction.) > > Please educate me. > > =3D=3D=3D Mark Millard marklmi at yahoo.com ( markmi at dsl-only.net is going away in 2018-Feb, late)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4AF9AE33-887E-43F3-8885-B8EF37185407>