top shows '<swapped>'
Oliver Fromme
olli at lurza.secnetix.de
Wed May 9 17:50:21 UTC 2007
Thomas Hurst wrote:
> I'm seeing this sort of thing too -- I do have swap, but it's not being
> used by these processes (swapoff -a didn't do anything to them):
>
> Mem: 1672M Active, 5337M Inact, 279M Wired, 400M Cache, 215M Buf, 74M Free
> Swap: 10G Total, 12K Used, 10G Free
>
> 1251 www 1 4 0 87884K 0K accept 2 0:00 0.00% <httpd>
> 1106 root 1 20 0 12756K 0K pause 1 0:00 0.00% <smbd>
> 950 root 1 115 0 8536K 0K select 3 0:00 0.00% <pure-ftpd>
> 1143 mysql 1 8 0 5220K 0K wait 3 0:00 0.00% <sh>
> 1288 root 1 5 0 3644K 0K ttyin 2 0:00 0.00% <getty>
>
> The bulk of the data is probably "swapped" to the on-disk binaries,
You probably mean that the text pages of the binary
have not been paged into memory (that's different from
"swapping"). That's unlikely.
> but this would imply there isn't a single page unique to each process.
I don't think that could happen. As soon as you link
with libc (which sh, httpd and others certaily do), you
get a bunch of global variables and other things that
are not shared across processes.
> Quite why it's bothering in the first place with >5GB Inact I'm not
> sure -- is it unmapping idle processes to conserve VM objects?
That doesn't happen. FreeBSD has a feature to proactively
swap processes that have been idle for a certain time, but
it's disabled by default, see: sysctl vm.swap_idle_enabled
> I also find it interesting that I only noticed this behavior a few days
> ago and suddenly someone else mentions it too :)
I don't see it on any of my FreeBSD 6-stable machines, but
they run RELENG_6 of about 2 months ago. Maybe a subtle
bug has been introduced recently.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"A language that doesn't have everything is actually easier
to program in than some that do."
-- Dennis M. Ritchie
More information about the freebsd-stable
mailing list