[newnfs/client] -alldirs: listing files consumes too much memory

From: Anonymous <swell.k_at_gmail.com>
Date: Thu, 16 Jul 2009 21:41:43 +0400
Let's create 335 empty files in /blah and try to list them over nfsv3.

# uname -vm
FreeBSD 8.0-BETA1 #0: Sat Jul  4 03:55:14 UTC 2009     root_at_almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

# mkdir /blah
# (while [ $((i+=1)) -le 334 ]; do : >/blah/foo_$i; done)
# echo / -alldirs >/etc/exports
# /etc/rc.d/nfsd onestart
# mount -t newnfs -o nfsv3 0:/blah /mnt

# time -l ls /mnt >&-
        0.07 real         0.01 user         0.05 sys
      1672  maximum resident set size
        60  average shared memory size
       718  average unshared data size
       320  average unshared stack size
       247  page reclaims
         0  page faults
         0  swaps
         0  block input operations
         0  block output operations
         4  messages sent
         0  messages received
         0  signals received
         3  voluntary context switches
         8  involuntary context switches

# : >/blah/foo_335

# time -l ls /mnt >&-
[wait a few sec and type ^C]
^Ctime: command terminated abnormally
        4.22 real         2.21 user         1.80 sys
     70716  maximum resident set size
        52  average shared memory size
      1530  average unshared data size
       278  average unshared stack size
     17557  page reclaims
         0  page faults
         0  swaps
         0  block input operations
         0  block output operations
         6  messages sent
         0  messages received
         0  signals received
         3  voluntary context switches
       188  involuntary context switches

This was from qemu. On my main box with r195709M it doesn't stop after
eating over 2Gb memory when trying to list 886 entries in distfiles dir.

Is this one known?
Received on Thu Jul 16 2009 - 15:41:51 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:52 UTC