8 Some people may have read about Peter Holms' Stress Test Suite on
10 commits@, and yes, Matt and I have found several bugs with it.
14 To get wider testing I thought I could write a little Stress-Test-Suite
22 First of all, get the source, it's available at:
26 http://holm.cc/stress/src/
30 http://people.freebsd.org/~pho/stress/src/
34 And this is the version I'm using in this guide:
38 SHA1 (stress2.tgz) = 844faff0b5372cdbcfbfbe66ac769df597c56599
42 Last modified: 23-May-2006 14:31/18:30
52 # fetch http://www.holm.cc/stress/src/stress2.tgz
58 Untar it somewhere and apply this patch:
62 http://leaf.dragonflybsd.org/~cosmicdj/stress2dfly.patch.gz
66 SHA1 (stress2dfly.patch.gz) = f0fd1b4290d2bdcfc45862b4279687afac9d2210
72 # fetch http://leaf.dragonflybsd.org/~cosmicdj/stress2dfly.patch.gz
74 # cd stress2; zcat ../stress2dfly.patch.gz | patch -p1
80 But before you start compiling it you need to tell
82 stress2/lib/resources.c your swapsize, so start your editor and search
84 for "const int64_t sz = 524256;". Now you need to replace 524256 with
98 Device 1K-blocks Used Avail Capacity
100 /dev/ad0s1b 637704 156 637548 0%
102 # echo "637704 / 4" | bc # take the 1K-blocks and devide them by 4
110 Replace the (sz =) 524256 in lib/resources.c with this number!
114 You can compile the suite now:
128 One last thing before you can start stressing your machine, edit
130 default.cfg and change BLASTHOST to an IP with a machine running inetd
132 with UDP discard enabled. If you don't have such a machine you can set
134 it to 127.0.0.1 or your local NIC IP and use DragonFly's inetd with
140 discard dgram udp wait root internal
146 enabled (uncommented) in /etc/inetd.conf
154 ## Set up your environment, reboot
158 First some considerations. You want to stress test your machine?
160 Your machine could panic and fsck takes quite some time... and
162 uploading 1+GB crashdump isn't fun, either. So we'll do a reboot!
166 At the Beasty-bootmenu, select
172 6. Escape to loader prompt
190 prompt we'll first limit the memory DragonFly BSD sees (and thus the
192 crashdump size) to 256MB
198 ok set hw.physmem="256M"
206 and then we'll boot into single-user mode.
218 ## Set up your environment, Post-reboot
222 The first thing we'll do is:
234 And then we'll mount some important dirs read-only!
240 $ mount -r /home # this is were the stress-test-suite is
242 $ mount -r /usr # you can leave this out but some cmds might come handy
244 $ mount /tmp # usualy MFS, if not: mount_mfs -s 262144 swap /tmp
246 $ mount /proc # shouldn't hurt...
252 Then we'll start some services:
258 $ /etc/rc.d/dumpon start # don't forget to set up a dumpdev in rc.conf
260 $ /etc/rc.d/swap1 start # a stress-test needs it
262 $ /etc/rc.d/netif start
268 If you don't have a "blasthost" with UDP discard enabled somewhere in your network,
270 just start a local inetd:
276 $ inetd -R 0 -p /tmp/inetd.pid # -R 0 disable rate limiting,
278 # needed for the udp stress-test
284 ## How to run the stress-test
288 Quoting stress2/README: "Do not run the tests as root."
292 So let's switch to an ordinary user:
298 $ su -m ordinary_user
300 # cd /home/ordinary_user/stress2
302 # setenv INCARNATIONS 10
310 If you want some verbosity:
324 And if you want to run all tests:
336 And that's it. If the stress test triggers a panic,
338 your filesystems are safe because everything is mounted read-only.
346 If you got a panic, you need to boot with the same
348 hw.physmem settings, otherwise savecore will not find your crashdump!
354 Thanks to Peter Holm (http://www.holm.cc) for his stress test.
356 Thanks to Matt Dillon and everyone else involved for DragonFly BSD.