random technical thoughts from the Nominet technical team

A first look at ZFS

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Posted by jad on Jul 3rd, 2006

Solaris 10 6/06 was released last week. This is the first release of Solaris 10 with ZFS support built in.

Creating a ZFS filesystem is easy

I had a disk partitioned like

Part      Tag    Flag     Cylinders         Size            Blocks
0       swap    wu       0 -  1927        2.00GB    (1928/0/0)    4195328
1       root    wm    1928 - 16384       15.00GB    (14457/0/0)  31458432
2     backup    wm       0 - 65532       68.00GB    (65533/0/0) 142599808
3 unassigned    wm   16385 - 65532       51.00GB    (49148/0/0) 106946048
4 unassigned    wm       0                0         (0/0/0)             0
5 unassigned    wm       0                0         (0/0/0)             0
6 unassigned    wm       0                0         (0/0/0)             0
7 unassigned    wm       0                0         (0/0/0)             0

To create a zfs filesystem and mount slice 3 as /test you run the following

bash-3.00# zpool create test c1t0d0s3
bash-3.00# df -k
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c1t0d0s1    15490539 3523947 11811687    23%    /
/devices                   0       0       0     0%    /devices
ctfs                       0       0       0     0%    /system/contract
proc                       0       0       0     0%    /proc
mnttab                     0       0       0     0%    /etc/mnttab
swap                 30414184     560 30413624     1%    /etc/svc/volatile
objfs                      0       0       0     0%    /system/object
/platform/SUNW,Sun-Fire-T200/lib/libc_psr/libc_psr_hwcap1.so.1
15490539 3523947 11811687    23%    /platform/sun4v/lib/libc_psr.so.1
/platform/SUNW,Sun-Fire-T200/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1
15490539 3523947 11811687    23%    /platform/sun4v/lib/sparcv9/libc_psr.so.1
fd                         0       0       0     0%    /dev/fd
swap                 30413624       0 30413624     0%    /tmp
swap                 30413664      40 30413624     1%    /var/run
test                 52125696       1 52125644     1%    /test

Done. (The zpool command took a few seconds to run)

However, performance is not what I expected. Running a simple test script to create lots of small files like this

#!/usr/local/bin/bash
i=0
while [ $i -lt 10000 ]
do
touch $i
let i=i+1
done

gave these results

UFS 102 seconds
ZFS 99 seconds

When creating a single large file like this

dd if=/dev/zero of=/myfile count=1000000 bs=1k

ZFS was a lot slower

UFS 29 seconds
ZFS 55 seconds

I appreciate that these are very simple tests, but I did expect ZFS to be at least as fast a UFS.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

Recent Posts

Highest Rated

Categories

Archives

Meta: