HEADS UP: New ZFS in the tree.

Freddie Cash fjwcash at gmail.com
Tue Dec 2 13:15:00 PST 2008

On December 2, 2008 12:33 pm Peter Schuller wrote:
> I just upgraded my workstation to CURRENT for the purpose of testing
> ZFS. I wanted to report one anomoly that I have seen so far, that I
> never saw before and that I do not recognize from other posts.
> I had ktorrent seemingly hang. The process is in state TL, and does
> not respond to SIGKILL. SIGCONT also has no effect; neither has
> SIGSTOP followed by SIGCONT.
> Though I do not know how ktorrent works internally, the typical
> behavior, and behavior that I saw just prior to this hang, is one of
> periodically flushing out a lot of (bittorrent, not file system)
> blocks. This happens to the point that the pool is more or less
> saturated for the duration of these bursts (when downloading quickly;
> around 10 MB/sec in this case). So possibly the triggering factor is
> quick writing of a lot of randomly located blocks in a handful of
> files.

Hrm, I wonder if this is what I'm running into with 7.1-PRERELEASE (Nov 17).  
I'm running a P4 3.0 GHz system w/2 GB RAM, and 3x 200 GB SATA drives in 
raidz1 config (/ is on USB flash drive, everything else is on ZFS).  I'm 
also running ktorrent.

I've noticed the past couple of days, when using the server (not very 
often), every now and then, the GUI (KDE 4.1) will "hang" for up to 5 
minutes (no mouse movement, no keyboard events), while the drives work like 
crazy.  The drives will quiet, and everything will go back to working all 
nice and snappy.  Most noticeable when new torrents start to download (pre-
allocate space for new torrents is disabled), or when combined download rate 
goes above 100 KBps, or combined up/down rate goes above 200 KBps.  
Unfortunately, when this happens, I can't swith terminals or apps to see 
what's happening with gstat, zpool stats, vmstat, top, etc.

During this "hang" period, network throughput also drops to nil, most 
noticeable when watching video over Samba/NFS via the laptop in the living 
room.  Movie pauses for up to 2 minutes, then either continues, or the 
player aborts and starts the next one in the queue.  Gets really annoying 
when it pauses multiple times in a 60-minute video.

I figured this was a networking issue, as it only ever affected streaming 
movies off the server, and have been playing with Samba setting, NFS 
settings, TCP/IP sysctls, and NIC options on the server and laptop.  Never 
thought to look at ZFS, as it's only been in the last couple days that I 
noticed the drives working like crazy in burst.  Unfortunately, by the time 
I go from the living room downstairs to the computer room upstairs, things 
have generally resolved themselves, so I can't say for sure that the pausing 
video stream is happening at the same time as the drives are working like 

loader.conf sets kmem_max to 1 GB, zfs_arc_max to 0.5 GB, and disables ZFS 

All ZFS filesystems have recordsize set to 64 KB; /usr/src and /usr/ports 
have lzjb compression enabled; all the other filesystems have compression 

TCP send and receive buffers are also set to 64 KB.

Not sure what to look for, or how to go about debugging this one.  Just been 
living with it.  So any and all suggestions, comments, threats, and flames 
welcomed.  :)
fjwcash at gmail.com

More information about the freebsd-current mailing list