I'm trying to build my own network attached storage based on FreeBSD+ZFS+standard components, but there are strange performance issues.
The hardware specs are:
- AMD Athlon II X2 240e processor
- ASUS M4A78LT-M LE mainboard
- 2GiB Kingston ECC DDR3 (two sticks)
- Intel Pro/1000 CT PCIe network adapter
- 5x Western Digital Caviar Green 1.5TB
I created a RAID-Z2 zpool from all disks. I installed FreeBSD 8.1 on that zpool following the tutorial. The SATA controllers are running in AHCI mode.
Output of zpool status:
pool: zroot state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM zroot ONLINE 0 0 0 raidz2 ONLINE 0 0 0 gptid/7ef815fc-eab6-11df-8ea4-001b2163266d ONLINE 0 0 0 gptid/80344432-eab6-11df-8ea4-001b2163266d ONLINE 0 0 0 gptid/81741ad9-eab6-11df-8ea4-001b2163266d ONLINE 0 0 0 gptid/824af5cb-eab6-11df-8ea4-001b2163266d ONLINE 0 0 0 gptid/82f98a65-eab6-11df-8ea4-001b2163266d ONLINE 0 0 0
The problem is that write performance on the pool is very very bad (<10 MB/s) and every application that is accessing the disk is unresponsive every few seconds when writing. It seems like writing is fine until the ZFS ark cache is full and then ZFS stalls the entire system I/O till it's finished writing that data.
Also I'm getting
kmem_malloc to small kernel panics. I've already tried to put
into /boot/loader.conf, but it doesn't help.
Does anyone know what's going on here? Am I really not having enough memory for ZFS to handle this RAID-Z2?