zfs, a directory that used to hold lot of files and listing pause
Slawa Olhovchenkov
slw at zxy.spb.ru
Fri Oct 21 13:08:05 UTC 2016
On Fri, Oct 21, 2016 at 01:47:08PM +0100, Pete French wrote:
> > 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.
>
> Umm, are we not talkong abut an issue where the directoyr no longer contains
> any files. It used to have lots, now it has none.
>
> > I.e. in bad case you will be need tens of thousands seeks over disk
> > capable only 72 seeks per seconds.
>
> Why does it need to seek all over the disc if there are no files (and hence
> no metadata surely) ?
>
> I am not bothered if a hufge directoyr takes a while to list,
> thats something I am happy to deal with. What I dont like is
> when it is back down to zero that it still takes a long time
> to list. That doesnt make much sense.
OK, this case may be differ.
May be zdb can help.
ls -li /parent/dir
Take inode number
zdb -vvvv zfs_set inode_number
also do ktrace ls and anaylyse `kdump -E`
More information about the freebsd-stable
mailing list