ZFS directory with a large number of files

Damien Fleuriot ml at my.gd
Tue Aug 9 09:16:29 UTC 2011


On 8/2/11 9:39 AM, seanrees at gmail.com wrote:
> Hi there,
> 
> I Googled around and checked the PRs and wasn't successful in finding
> any reports of what I'm seeing. I'm hoping someone here can help me
> debug what's going on.
> 
> On my FreeBSD 8.2-S machine (built circa 12th June), I created a
> directory and populated it over the course of 3 weeks with about 2
> million individual files. As you might imagine, a 'ls' of this
> directory took quite some time.
> 
> The files were conveniently named with a timestamp in the filename
> (still images from a security camera, once per second) so I've since
> moved them all to timestamped directories (yyyy/MM/dd/hh/mm). What I
> found though was the original directory the images were in is still
> very slow to ls -- and it only has 1 file in it, another directory.
> 

While not addressing your original question, which many people have
already, I'll toss in the following:

I do hope you've disabled access times on your ZFS dataset ?

zfs set atime=off YOUR_DATASET/supercamera/captures



More information about the freebsd-stable mailing list