ZIL communication
If you’re dealing with lots of small files, a
NFS and ZFS combination
can run slower than you’d like.
For example, untarring the apache source tree on the NFS client:
planb:$ time tar xvf httpd-2.2.4.tar.gz
real 2m9.594s
user 0m0.356s
sys 0m0.508s
Ouch.
BenR mentioned turning off the ZIL
(ZFS intent log ) to speed up ZFS+NFS over aggregated Gbit ethernet – I doubted my 100Mbit link would have the same bottleneck for anything,
but it was worth a go.
Tell the ZFS/NFS server to switch off the ZIL:
vera# echo 'set zfs:zil_disable=1' >> /etc/system
Then either reboot, or run:
vera # echo ‘zil_disable/W 1’ | mdb -kw
vera # zpool export tank
vera # zpool import tank
In my case, I might as well reboot.
planb:$ mv httpd-2.2.4 outoftheway
planb:$ time tar xzf httpd-2.2.4.tar.gz
real 0m4.862s
user 0m0.368s
sys 0m0.440s
Holy crap.
There are some
implications to the ‘correctness’ of this from the NFS clients point of view but on the ZFS box itself it’s non-lethal, so I think
I’ll keep it (I’m snapshotting the share three times a day, so I’m
reasonably safe if when Linux shits itself).