So I’ve been using ZFS on my Ubuntu 32-bit server for the past week. I have a 4x1TB raid that I’m trying to copy over to my 4x1TB ZFS drives. Here’s the rub. Apparently ZFS requires an insane amount of RAM. Currently (I’m actually ashamed to say this) my server only has 2GB of RAM. I’ve since rectified the situation and quickly ordered 16GB of RAM from Amazon. I will be having to install 64bit linux to make use of the >4GB RAM the system will have.
In the mean time, I’ve alleviated some of the performance issues by increasing the ARC size of the ZFS. You can do this by editing /etc/zfs/zfsrc and putting in a line like:
max-arc-size = 2000
Now of course the size is in terms of MB, so it should be 2048 for the maximum in my case, but I wanted to leave some space for other running programs. I read somewhere that for ZFS, the recommended memory is 1GB per 1TB. So I will ultimately be using 8GB just for ZFS. This is because ZFS would like to do all of its compression in RAM. It also can keep a cache of directory structures and other miscellaneous frequently accessed information in RAM.
Another suggestion is to turn off access time on files. I think it’s kinda useless to store it to begin with. You can do this by issuing:
zfs set atime=off nameOfZFSPool
Finally another suggestion I’ve seen is to turn off the primarycache and secondarycache in ZFS. I haven’t figured out what this does yet, and I’m weary of turning it off. I’ll report back with my results.