Eugene M. Zheganin
2016-Oct-21 11:51 UTC
zfs, a directory that used to hold lot of files and listing pause
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 Thanks. Eugene.
Slawa Olhovchenkov
2016-Oct-21 12:05 UTC
zfs, a directory that used to hold lot of files and listing pause
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 sysYou 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.