slow directory operation on huge dirs

Mike Tancsa mike at sentex.net
Thu Jan 23 16:41:52 UTC 2020


On 1/23/2020 1:40 PM, Wojciech Puchar wrote:
>
> first - we have DIRHASH option and i have it enabled.
> second - it is not just a problem of huge directory but both huge
> directory and large maxvnodes settings.
>
> Large directories works fast when kern.maxvnodes is small and there is
> enough dirhash_maxmem.
>
> it's clearly an error somewhere. 


Dont know about the vnodes adjustment, and its probably not related. But
on our largish mail servers, we need to change the defaults in nsswitch
as ls takes forever on large directories otherwise.

--- /usr/src/etc/nsswitch.conf  2019-07-10 14:46:40.871619000 -0400
+++ /etc/nsswitch.conf  2016-01-27 14:21:30.400226032 -0500
@@ -1,13 +1,12 @@
 #
 # nsswitch.conf(5) - name service switch configuration file
-# $FreeBSD: stable/11/etc/nsswitch.conf 301711 2016-06-09 01:28:44Z markj $
+# $FreeBSD: src/etc/nsswitch.conf,v 1.1.10.1 2009/08/03 08:13:06
kensmith Exp $
 #
-group: compat
+group: files
 group_compat: nis
 hosts: files dns
-netgroup: compat
 networks: files
-passwd: compat
+passwd: files
 passwd_compat: nis
 shells: files
 services: compat


    ---Mike



More information about the freebsd-hackers mailing list