Peter
2016-Oct-20 20:09 UTC
zfs, a directory that used to hold lot of files and listing pause
Eugene M. Zheganin wrote:> Hi. > > I have FreeBSD 10.2-STABLE r289293 (but I have observed this situation > on different releases) and a zfs. I also have one directory that used to > have a lot of (tens of thousands) files. I surely takes a lot of time to > get a listing of it. But now I have 2 files and a couple of dozens > directories in it (I sorted files into directories). Surprisingly, > there's still a lag between "ls" and an output:I see this on my pgsql_tmp dirs (where Postgres stores intermediate query data that gets too big for mem - usually lots of files) - in normal operation these dirs are completely empty, but make heavy disk activity (even writing!) when doing ls. Seems normal, I dont care as long as the thing is stable. One would need to check how ZFS stores directories and what kind of fragmentation can happen there. Or wait for some future feature that would do housekeeping. ;)
Jonathan Chen
2016-Oct-20 21:18 UTC
zfs, a directory that used to hold lot of files and listing pause
On 21 October 2016 at 09:09, Peter <pmc at citylink.dinoex.sub.org> wrote: [...]> > I see this on my pgsql_tmp dirs (where Postgres stores intermediate > query data that gets too big for mem - usually lots of files) - in > normal operation these dirs are completely empty, but make heavy disk > activity (even writing!) when doing ls. > Seems normal, I dont care as long as the thing is stable. One would need > to check how ZFS stores directories and what kind of fragmentation can > happen there. Or wait for some future feature that would do > housekeeping. ;)I'm seeing this as well with an Odoo ERP running on Postgresql. This lag does matter to me as this is huge performance hit when running Postgresql on ZFS, and it would be good to see this resolved. pg_restores can make the system crawl as well. Cheers. -- Jonathan Chen <jonc at chen.org.nz>