Re: [patch] zfs kmem fragmentation

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ben Kelly
Date: Tuesday, May 5, 2009 - 6:48 am

On May 4, 2009, at 6:17 PM, Jeff Roberson wrote:

ZFS buffers range from 512 bytes to 128KB.  I don't know of any  
allocations above 128KB at the moment.

In my workload the panic is usually caused by zfs attempting to  
allocate a 128KB buffer, although sometimes its only doing a 64KB  
buffer.

At one point I hacked in some instrumentation to print the kmem_map  
vm_map_entry when I touched a sysctl mib.  Here's a capture I made  
during my load test as the fragmentation was occurring:

   http://www.wanderview.com/svn/public/misc/zfs/fragmentation.txt

I also added some debug later to show the consumers of the  
allocations.  The vast majority of them were from the opensolaris  
subsystem.  Unfortunately I don't have a capture of that output handy.


Using a separate submap might help.  It seems that the fragmentation  
is occurring due to the interaction of the smaller and larger buffers  
within zfs.  I believe in opensolaris data buffers and meta-data  
buffers are allocated from separate arenas.  We don't do this  
currently and it may be the cause of some of the fragmentation.  It  
also occurred to me that it might be nice if the arc could somehow  
share the buffer cache directly.

Unfortunately I am moving this Friday and probably will be unable to  
really look at this for the next couple weeks.

Thanks.

- Ben
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch] zfs kmem fragmentation, Ben Kelly, (Fri May 1, 9:49 pm)
Re: [patch] zfs kmem fragmentation, Jeff Roberson, (Mon May 4, 3:17 pm)
Re: [patch] zfs kmem fragmentation, Ben Kelly, (Tue May 5, 6:48 am)