Unusual swapping behaviour

Hwei Sheng TEOH (hsteoh@cs.toronto.edu)
Thu, 28 May 1998 15:53:31 -0400

Hi, sorry if this is doesn't belong to this mailing list, but I've posted to
the linux newsgroups and was directed here. I think this might be of interest
to kernel developers.

I have a very small process running in the background (nice +19), that doesn't
take up much resources. This process is usually unnoticeable, but every time I
run an intensive compile jobs (e.g. compiling an entire application like
netscape), this tiny process begins to thrash on the HD. This usually happens
after the link phase, when ld sucks up the system resources.

I know it's this process that's thrashing, because the HD stops grinding when
I issue a 'kill -STOP <pid>', and resumes thrashing when I re-active the
process using 'kill -CONT <pid>'.

Now, the even stranger thing is that I can start up another copy of the exact
same process, and this new copy will *not* thrash at all. These two copies of
the process can actually exist at the same time, and one will thrash while the
other won't, all depending on whether it 'survived' the compile job.

Details of my system:
i586 90MHz (with FDIV bug) :-(
Debian Linux version 2.0 (frozen)
Kernel image 2.0.33-9, 'kernelversion' reports 2.0
2.1GB Quantum Fireball HD with:
128MB swap partition, 1.3GB partition with root ext2 filesystem,
500MB mounted vfat/Win95 partition (probably irrelevent :-)
C/C++ compiler: egcs-2.90.27 980315 (egcs-1.0.2 release)

Details of the processes:
- the 'small process' consists of a shell script piped to a small C++ program
whose output is redirected to /dev/null, VmSize of this C++ program is
about 1 Kb. Once this process begins the thrash, it continues doing so
indefinitely (I've actually had it thrash overnight once, until I killed
it in the morning, so it can't just be the system cleaning up swap space
after the compile).
- compile job: any large compilation will trigger this behaviour. Tried with
netscape, among others.
- other significant processes running at the time: X windows, running on
xdm with three X servers, each serving its own virtual console. This is
probably irrelevant, but just in case. The number of users logged on
doesn't affect the thrashing behaviour (usually I'm the only user).

HS Teoh

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu