top shows '<swapped>'

Bill LeFebvre bill at lefebvre.org
Wed May 9 13:58:14 UTC 2007


Ken Chen wrote:
> When I use 'top' command to check my system, some processes are shown like
> '<php>'. The manual told these processes are swapped out.
> 
> But my problem is .. I don't have swapping device (swapoff -a). Where are
> they swapped to ?
> 
> last pid: 29144;  load averages:  0.69,  0.67,  0.82
> up 19+11:25:27  21:05:03
> 89 processes:  1 running, 88 sleeping
> CPU states:  1.2% user,  0.0% nice,  0.9% system,  0.0% interrupt, 
> 97.8%idle
> Mem: 309M Active, 27M Inact, 127M Wired, 19M Cache, 60M Buf, 4136K Free
> Swap:
> 
>  PID USERNAME  THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU COMMAND
> 29141 nobody      1   4    0 37164K 15932K select 0   0:00  4.55% php
> 28856 nobody      1   4  -15 36936K  7612K sbwait 0   0:44  1.66% php
>                   .
>                   .
>                   .
> 29116 nobody      1   4  -15 33732K 13140K accept 0   0:00  0.00% php
> 24937 nobody      1   8  -15 31740K     0K wait   1   0:00  0.00% <php>
> 24948 nobody      1   8  -15 31740K     0K wait   0   0:00  0.00% <php>
> 24931 nobody      1   8  -15 31740K     0K wait   0   0:00  0.00% <php>
> 24950 nobody      1   8  -15 31740K     0K wait   1   0:00  0.00% <php>
> 24932 nobody      1   8  -15 31740K   220K wait   1   0:00  0.00% php

The <> are only used when the process flag PS_INMEM is clear, which is 
supposed to indicate that the process is or is not "in memory".   This flag 
is only ever cleared in swapout, called from swapout_procs.  My bet is that 
the processes are being marked for swap but the dirty pages never actually 
go anywhere since you don't have a backing store.  Maybe someone more 
familiar with the inner workings of the VM system can fill us in on what 
happens on a system with no swap.

Bill LeFebvre


More information about the freebsd-stable mailing list