Swapping caused by very large (regular) file size

Thomas Hurst tom.hurst at clara.net
Sat Jan 19 12:21:20 PST 2008

* Kris Kennaway (kris at FreeBSD.org) wrote:

> I don't understand your test procedure, can you elaborate?

The spikes from last night are from:

(/sbin/dump -$level -LuaC128 -f - $fs | /usr/bin/tee ${target} |
/sbin/sha1 > ${target}.sha1)

Followed by:

nice -n 19 /home/freaky/bin/par2 c -t+ -r5 -m256 ${target}

Graphs from this run clearly slow a modest amount of paging activity
while it occurs; you can see the other graphs here:


More simply, it can be reproduced by doing this:

-# swapoff -a # clear swap
-# swapon -a
-# top |grep -A1 Mem
Mem: 1371M Active, 5727M Inact, 416M Wired, 271M Cache, 214M Buf, 124M
Swap: 10G Total, 10G Free
-# ls -l voi_20080119_#usr.dmp.0
-rw-r--r--    1 root     wheel    106527672320 Jan 19 05:27
-# cat voi_20080119_#usr.dmp.0 >/dev/null &
-% sleep 20 && top |grep -A1 Mem
Mem: 1407M Active, 5789M Inact, 431M Wired, 272M Cache, 214M Buf, 8580K
Swap: 10G Total, 400K Used, 10G Free

The system's occasionally deciding to swap pages out rather than recycle
something from the huge pool of inactive/cache memory (which atm will be
mostly cached pages from this file, since this is my second test run;
the first took longer to ramp up).

-% uname -a
FreeBSD voi.nightsdawn.sf 7.0-RC1 FreeBSD 7.0-RC1 #0: Wed Jan 16
14:56:50 GMT 2008

Thomas 'Freaky' Hurst

More information about the freebsd-stable mailing list