Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Feb 2011 01:55:46 +0100
From:      Ivan Voras <ivoras@freebsd.org>
To:        freebsd-fs@freebsd.org
Subject:   Re: zfs directory listing
Message-ID:  <ijhrmj$var$1@dough.gmane.org>
In-Reply-To: <AANLkTinwRumkvSn7wfh4a%2BeNJyFoFDyMMKjk7GOSLAXc@mail.gmail.com>
References:  <AANLkTinwRumkvSn7wfh4a%2BeNJyFoFDyMMKjk7GOSLAXc@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 16/02/2011 23:52, Andrew Thompson wrote:
> Hi,
>
>
> I have a zfs file system on 8.1-RELEASE amd64 which as a large number
> of files in /var/spool/mqueue. loader.conf has vfs.zfs.arc_max=2G for
> an 8G box.

> mqueue has a link count of 522824. I can not list the contents of this
> directory, when I do the number of read IOPS sits>  100 and it will
> never complete

Your problem is probably not FreeBSD-specific and possibly not even 
ZFS-specific. That is a fairly large number of files in a directory for 
any file system; The rule of thumb is usually to start sharding as soon 
as the number of files gets even two orders of magnitude lower than what 
you have there.

As others said, try "cd /var/spool/mqueue && find ." - the find utility 
just reads the directory, it doesn't try to gather other metadata which 
"ls" uses and is usually one of the rare utilities which can work with 
gigantic directories (usually in the form "find . -delete" :) ).

The reason for this is that filenames and file metadata are separate 
objects on the drives and the drives need to seek between them to get 
both if they are not cached.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ijhrmj$var$1>