Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Oct 2016 15:05:36 +0300
From:      Slawa Olhovchenkov <slw@zxy.spb.ru>
To:        "Eugene M. Zheganin" <emz@norma.perm.ru>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: zfs, a directory that used to hold lot of files and listing pause
Message-ID:  <20161021120536.GI57876@zxy.spb.ru>
In-Reply-To: <499a3693-d8ea-8b47-138c-77876077967c@norma.perm.ru>
References:  <4d9269af-ed64-bb73-eb7f-98a3f5ffd5a2@norma.perm.ru> <40fa9fd6-15aa-d8f7-b958-8783e763e6bc@multiplay.co.uk> <577ab7b2-46c1-5cf0-b6ad-50895978d957@norma.perm.ru> <38a84fce-fd97-a6a1-5820-89e578d76f0b@multiplay.co.uk> <91f34889-7f4f-661d-c88f-8034402c39cd@norma.perm.ru> <19a45e94-65e6-53a9-202d-c048055460d1@multiplay.co.uk> <20161021102051.GH57876@zxy.spb.ru> <499a3693-d8ea-8b47-138c-77876077967c@norma.perm.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 21, 2016 at 04:51:36PM +0500, Eugene M. Zheganin wrote:

> Hi.
> 
> On 21.10.2016 15:20, Slawa Olhovchenkov wrote:
> >
> > ZFS prefetch affect performance dpeneds of workload (independed of RAM
> > size): for some workloads wins, for some workloads lose (for my
> > workload prefetch is lose and manualy disabled with 128GB RAM).
> >
> > Anyway, this system have only 24MB in ARC by 2.3GB free, this is may
> > be too low for this workload.
> You mean - "for getting a list of a directory with 20 subdirectories" ? 
> Why then does only this directory have this issue with pause, not 
> /usr/ports/..., which has more directories in it ?
> 
> (and yes, /usr/ports/www isn't empty and holds 2410 entities)
> 
> /usr/bin/time -h ls -1 /usr/ports/www
> [...]
> 0.14s real              0.00s user              0.00s sys

You wrote: "(tens of thousands) files".

In bad case metadata of every file will be placed in random place of
disk.
ls need access to metadata of every file before start of output
listing.
I.e. in bad case you will be need tens of thousands seeks over disk
capable only 72 seeks per seconds.

Perhaps /usr/ports/www created at once and metadata of all
entries placed near each other, need less seeks.

If zfs property primarycache/secondarycache not off.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20161021120536.GI57876>