Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have FreeBSD 8.2 with ZFS v28. 8 cpu core, 16Gb ram. Two disk drives (1.5Tb WD Green) on zfs mirror raid.

My system strangely uses memory. With alot of free (wired) memory it start to use swap and then doesn't clean it! Swap usage keeps growing. munin-graph swap

And then I see on my kvm this messages: kvm log

All file reads or writes seems very slow. When I use ssh and for example do nano /etc/rc.conf it pauses for 3-5 seconds before it works.

Will my disk drives die soon? Or is the problem elsewhere?

share|improve this question
add comment

2 Answers

You have read the ZFS Tuning Guide, right?

Early versions of ZFS had more than a few issues with memory management, especially when using the dedupe and/or compression options. For the longest time, a simple recipe for ZFS hangs was to set compression=gzip and start copying data. Later versions of ZFS are much better. If you can, you should upgrade to FreeBSD 8.4 or 9.1.

I have a very comparable system at home (16GB RAM, 2 x 3TB SATA disks in ZFS mirror) that's been rock solid since upgrading to FreeBSD 9.1. I have compression enabled and these settings in /boot/loader.conf:

# attempts to get ZFS more stable
vfs.zfs.arc_max="4096M"
kern.maxvnodes=250000
vfs.zfs.prefetch_disable=1
vm.kmem_size="1024M"
vm.kmem_size_max="1024M"

Another thing to check is your motherboard settings for the SATA ports. Initially, my motherboard had the SATA ports set to IDE mode and performance under ZFS was awful, making the memory exhaustion issues worse. After switching them to AHCI mode, the disks perform quite well.

share|improve this answer
add comment

This looks like a hardware problem - either drives or controller. Since there are errors on both ad4 and ad6, it may be the controller. I recommend backing up any important data as soon as possible.

You might try installing sysutils/smartmontools to see if any SMART errors are reported.

As to your RAM usage, that seems strange. Even if you're using ZFS v28's dedupe, I wouldn't expect a 1.5TB filesystem to take up that much RAM. You might try running top -S -osize to see what is using the memory.

share|improve this answer
    
I'd go with the controller too. –  schaiba Feb 16 '13 at 14:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.