All proceeds from Ad Clicks goes to the author of this site.

 

Tuesday, November 29, 2005

Zones on UFS vs. ZFS

Decided to benchmark zones on UFS vs ZFS and found some surprising speed results. A while back I had fallen into the thinking that ZFS was too heavy of a file system and you wouldn’t benefit from running it on a sub 700mhz usparc III box. I guess this proves, since these tests were run on a Sun Ultra 2 2 x 300 MHz usparcII 1.25GB ram. UFS testing was done on a 9GB 10k rpm drive. ZFS was done on a raidz device made of 4x 9GB 10k rpm drives. The ZFS one has higher potential IO but has higher CPU requirements and both file systems were limited to the 20MB/s IO channel. Then I try and turn the table, and compare ZFS with compression on. Will it save space, at what cost speed/size?



Zone on top of UFS



# zonecfg -z test_ufs
test_ufs: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:test_ufs> create
zonecfg:test_ufs> set zonepath=/ufstest
zonecfg:test_ufs> verify
zonecfg:test_ufs> commit
zonecfg:test_ufs>

# time zoneadm -z test_ufs install
Preparing to install zone .
Creating list of files to copy from the global zone.
Copying <2535> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <1081> packages on the zone.
Initialized <1081> packages on zone.
Zone is initialized.
Installation of these packages generated warnings:
The file
contains a log of the zone installation.

real 22m22.402s
user 5m20.384s
sys 7m58.420s
#
Zone on top of ZFS
# chmod 700 /data/zone_zfs
# time zoneadm -z zone_zfs install
Preparing to install zone .
Creating list of files to copy from the global zone.
Copying <2535> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <1081> packages on the zone.
Initialized <1081> packages on zone.
Zone is initialized.
Installation of these packages generated warnings:
The file
contains a log of the zone installation.

real 16m23.287s
user 5m18.917s
sys 9m28.814s
#
Enable Compression and put a zone on it.
# zfs  set compression=on data/zone_zfs2
# time zoneadm -z zone_zfs2 install
Preparing to install zone .
Creating list of files to copy from the global zone.
Copying <2535> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <1081> packages on the zone.
Initialized <1081> packages on zone.
Zone is initialized.
Installation of these packages generated warnings:
The file
contains a log of the zone installation.

real 16m3.941s
user 5m19.210s
sys 9m32.384s
#
Yes ZFS with compression on is even faster.
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
data/zone_zfs 93.3M 26.0G 93.3M /data/zone_zfs
data/zone_zfs2 43.4M 26.0G 43.4M /data/zone_zfs2
data/zones 249M 26.0G 249M /data/zones

# zfs list -o name,compressratio
NAME RATIO
data/zone_zfs 1.00x
data/zone_zfs2 2.27x
(and even has impressive compression ratio)
p.s. Just so people say that the initial UFS install be slower because of data caching, here is the UFS retested.

# time zoneadm -z test_ufs install
Preparing to install zone .
Creating list of files to copy from the global zone.
Copying <2535> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <1081> packages on the zone.
Initialized <1081> packages on zone.
Zone is initialized.
Installation of these packages generated warnings:
The file
contains a log of the zone installation.

real 21m26.723s
user 5m22.573s
sys 7m54.183s
#
A little faster, but ZFS still blows it away.

For more blogs related to Zones, ZFS, OpenSolaris and Solaris.

1 Comments:

Anonymous Dan Price said...

On my stock Ultra-20 workstation on a ZFS filesystem on just one spindle:

# time zoneadm -z myzone install
...
Initialized <929> packages on zone.
...
real 1m22.966s
user 0m27.040s
sys 0m48.549s

Sweeet. UFS takes almost 4 minutes although I didn't have a spindle separate from / to test on so the results aren't very valid. But 1m 22s is sweet.

1:57 AM  

Post a Comment

<< Home