Posts Tagged ‘stress’

Abusing Solaris attempt #2: stressing out ZFS, PART1

Tuesday, March 11th, 2008

So last time we pulled out an IDE hard disk, and Solaris lived. It got me thinking…What else can we do to a hard disk that Solaris might not like? What about making a really big file? What about a 9TB file on an 80GB hard disk?:

anton@solaris-devx ~ $ time mkfile 9000G deleteThis

real 120m42.953s
user 0m16.448s
sys 46m55.092s

anton@solaris-devx ~ $ ls -l deleteThis
-rw------- 1 anton staff 9663676416000 Mar 9 02:22 deleteThis

And the machine didn’t die! But what about the compression ratio?

anton@solaris-devx ~ $ zfs get compressratio tank/home
NAME PROPERTY VALUE SOURCE
tank/home compressratio 1.22x

Looks like the ratio is an average for all the files on that file system. So lets try to artificially inflate this value. We can run a little script like this:

#/bin/sh
#A little script to make ten million files each 1 megabyte in size
i="0"
while [ $i -lt 10000000 ]
do
mkfile 10M la$i
i=$[$i+1]
done

The result (after about an hour of making files) wasn’t good:

bash: fork: Not enough space

This looks more like an issue bash had rather than ZFS. So did we push up that compression ratio?:

anton@solaris-devx mess $ zfs get compressratio tank/home
NAME PROPERTY VALUE SOURCE
tank/home compressratio 1.22x -

Seemingly not. To compensate, we’ll do something more crazy for PART2