HDD Stress Test with Python

Skip Montanaro skip at pobox.com
Fri Jan 23 03:50:18 CET 2004

    Bart> A bit off topic, but here goes: Does this look like a reasonable
    Bart> hard drive stress-test?


    Bart>     fp1 = os.popen("/sbin/newfs /dev/disk0s3", "r")
    Bart>     fp2 = os.popen("/sbin/newfs /dev/disk0s5", "r")

My guess is that newfs isn't all that random in its behavior, nor that it
touches all that much of the disk.  I think it mostly lays down inode
structure.  I doubt it even zeroes out the data chunks.  You might want to
do something like build multiple copies of some huge program (Emacs?  GCC?
Gimp? Darwin kernel?) in parallel, while constantly creating and deleting a
bunch of large files stuffed with random bits.


More information about the Python-list mailing list