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 . . .
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% phpThe <> 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
Ken Chen <ken73.chen@gmail.com> wrote: > When I use 'top' command to check my system, some processes are shown like > '<php>'. The manual told these processes are swapped out. Actually it means that they're not mapped into RAM, but in practice that should be the same. Just out of cusiosity I grepped the kernel sources for the PS_INMEM flag and found just two places where it could possibly be cleared for a process: during creation of a child process within the fork() system call, and when a process is being swapped out. > But my problem is .. I don't have swapping device (swapoff -a). Where are > they swapped to ? If you don't plan to configure any swap at all, I recommend you build a kernel with "options NO_SWAPPING". It removes the code for swapping processes from the kernel. (By the way, I recommend you always configure some swap, even if you don't intend to use it under normal circumstances, except maybe on diskless machines.) 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 "If you think C++ is not overly complicated, just what is a protected abstract virtual base pure virtual private destructor, and when was the last time you needed one?" -- Tom Cargil, C++ Journal