Readdir NFSv3 With Readdir Plus

From Linux NFS

Jump to: navigation, search
    36: Linux 2.6.36
36NORC: Linux 2.6.36 (without readdir cap)
    38: Linux 2.6.38
  38RC: Linux 2.6.38 (with readdir cap added back)
  38NB: Linux 2.6.38 (with Neil Brown's patch and loop detection)


Contents

100 Files

time ls -f --color=none /nfs/test/dir.100 > ls.txt
   kernel   |    36    |  36NORC  |    38    |   38RC   |   38NB
------------+----------+----------+----------+----------+----------
    real    | 0m0.014s | 0m0.014s | 0m0.152s | 0m0.068s | 0m0.032s
    user    | 0m0.007s | 0m0.000s | 0m0.003s | 0m0.003s | 0m0.007s
    sys     | 0m0.003s | 0m0.007s | 0m0.080s | 0m0.007s | 0m0.003s
  getattr   |    1     |    1     |    1     |    1     |    1
   lookup   |    2     |    2     |    2     |    2     |    2
   access   |    3     |    3     |    3     |    3     |    3
  readdir   |    0     |    0     |    0     |    0     |    0
readdirplus |    4     |    4     |    4     |    4     |    4
time ls -lU --color=none /nfs/test/dir.100 > ls.txt
   kernel   |    36    |  36NORC  |    38    |   38RC   |   38NB
------------+----------+----------+----------+----------+----------
    real    | 0m0.109s | 0m0.100s | 0m0.046s | 0m0.056s | 0m0.029s
    user    | 0m0.000s | 0m0.003s | 0m0.007s | 0m0.003s | 0m0.007s
    sys     | 0m0.013s | 0m0.027s | 0m0.010s | 0m0.017s | 0m0.013s
  getattr   |    1     |    1     |    1     |    1     |    1
   lookup   |    2     |    2     |    2     |    2     |    2
   access   |    3     |    3     |    3     |    3     |    3
  readdir   |    0     |    0     |    0     |    0     |    0
readdirplus |    4     |    4     |    4     |    4     |    4
time ls -U --color=none /nfs/test/dir.100 > ls.txt
   kernel   |    36    |  36NORC  |    38    |   38RC   |   38NB
------------+----------+----------+----------+----------+----------
    real    | 0m0.076s | 0m0.022s | 0m0.035s | 0m0.089s | 0m0.015s
    user    | 0m0.003s | 0m0.000s | 0m0.000s | 0m0.000s | 0m0.000s
    sys     | 0m0.007s | 0m0.017s | 0m0.003s | 0m0.080s | 0m0.013s
  getattr   |    1     |    1     |    1     |    1     |    1
   lookup   |    2     |    2     |    2     |    2     |    2
   access   |    3     |    3     |    3     |    3     |    3
  readdir   |    0     |    0     |    0     |    0     |    0
readdirplus |    4     |    4     |    4     |    4     |    4
time rm -rf /nfs/test/dir.100 > ls.txt
   kernel   |    36    |  36NORC  |    38    |   38RC   |   38NB
------------+----------+----------+----------+----------+----------
    real    | 0m0.025s | 0m0.024s | 0m0.025s | 0m0.025s | 0m0.042s
    user    | 0m0.003s | 0m0.000s | 0m0.000s | 0m0.003s | 0m0.007s
    sys     | 0m0.007s | 0m0.007s | 0m0.013s | 0m0.010s | 0m0.033s
  getattr   |    1     |    1     |    1     |    1     |    1
   lookup   |    2     |    2     |    2     |    2     |    2
   access   |    3     |    3     |    3     |    3     |    3
   remove   |   100    |   100    |   100    |   100    |   100
   rmdir    |    1     |    1     |    1     |    1     |    1
  readdir   |    0     |    0     |    0     |    0     |    0
readdirplus |    4     |    4     |    4     |    4     |    4
   fsstat   |    0     |    0     |    0     |    0     |    0


1,000 Files

time ls -f --color=none /nfs/test/dir.1000 > ls.txt
   kernel   |    36    |  36NORC  |    38    |   38RC   |   38NB
------------+----------+----------+----------+----------+----------
    real    | 0m0.024s | 0m0.061s | 0m0.066s | 0m0.028s | 0m0.032s
    user    | 0m0.003s | 0m0.000s | 0m0.003s | 0m0.010s | 0m0.000s
    sys     | 0m0.010s | 0m0.037s | 0m0.020s | 0m0.003s | 0m0.013s
  getattr   |    1     |    1     |    1     |    1     |    1
   lookup   |    2     |    2     |    2     |    2     |    2
   access   |    3     |    3     |    3     |    3     |    3
  readdir   |    0     |    0     |    0     |    0     |    0
readdirplus |    36    |    36    |    39    |    39    |    39
time ls -lU --color=none /nfs/test/dir.1000 > ls.txt
   kernel   |    36    |  36NORC  |    38    |   38RC   |   38NB
------------+----------+----------+----------+----------+----------
    real    | 0m0.209s | 0m0.251s | 0m0.166s | 0m0.163s | 0m0.151s
    user    | 0m0.013s | 0m0.007s | 0m0.010s | 0m0.010s | 0m0.010s
    sys     | 0m0.073s | 0m0.113s | 0m0.053s | 0m0.080s | 0m0.060s
  getattr   |    1     |    1     |    1     |    1     |    1
   lookup   |    2     |    2     |    2     |    2     |    2
   access   |    3     |    3     |    3     |    3     |    3
  readdir   |    0     |    0     |    0     |    0     |    0
readdirplus |    36    |    36    |    39    |    39    |    39
time ls -U --color=none /nfs/test/dir.1000 > ls.txt
   kernel   |    36    |  36NORC  |    38    |   38RC   |   38NB
------------+----------+----------+----------+----------+----------
    real    | 0m0.083s | 0m0.023s | 0m0.039s | 0m0.035s | 0m0.039s
    user    | 0m0.000s | 0m0.003s | 0m0.003s | 0m0.003s | 0m0.003s
    sys     | 0m0.023s | 0m0.010s | 0m0.007s | 0m0.030s | 0m0.033s
  getattr   |    1     |    1     |    1     |    1     |    1
   lookup   |    2     |    2     |    2     |    2     |    2
   access   |    3     |    3     |    3     |    3     |    3
  readdir   |    0     |    0     |    0     |    0     |    0
readdirplus |    36    |    36    |    39    |    39    |    39
time rm -rf /nfs/test/dir.1000 > ls.txt
   kernel   |    36    |  36NORC  |    38    |   38RC   |   38NB
------------+----------+----------+----------+----------+----------
    real    | 0m0.165s | 0m0.157s | 0m0.171s | 0m0.174s | 0m0.162s
    user    | 0m0.003s | 0m0.003s | 0m0.003s | 0m0.007s | 0m0.007s
    sys     | 0m0.067s | 0m0.047s | 0m0.097s | 0m0.073s | 0m0.047s
  getattr   |    1     |    1     |    1     |    1     |    1
   lookup   |    2     |    2     |    2     |    2     |    2
   access   |    3     |    3     |    3     |    3     |    3
   remove   |   1000   |   1000   |   1000   |   1000   |   1000
   rmdir    |    1     |    1     |    1     |    1     |    1
  readdir   |    0     |    0     |    0     |    0     |    0
readdirplus |    36    |    36    |    39    |    39    |    39
   fsstat   |    0     |    0     |    0     |    0     |    0


10,000 Files

time ls -f --color=none /nfs/test/dir.10000 > ls.txt
   kernel   |    36    |  36NORC  |    38    |   38RC   |   38NB
------------+----------+----------+----------+----------+----------
    real    | 0m0.075s | 0m0.335s | 0m0.348s | 0m0.119s | 0m0.194s
    user    | 0m0.003s | 0m0.007s | 0m0.003s | 0m0.003s | 0m0.003s
    sys     | 0m0.023s | 0m0.067s | 0m0.043s | 0m0.047s | 0m0.027s
  getattr   |    1     |    1     |    1     |    1     |    1
   lookup   |    2     |    2     |    2     |    2     |    2
   access   |    3     |    3     |    3     |    3     |    3
  readdir   |    89    |    0     |    0     |    99    |    88
readdirplus |    0     |   371    |   393    |    0     |    44
time ls -lU --color=none /nfs/test/dir.10000 > ls.txt
   kernel   |    36    |  36NORC  |    38    |   38RC   |   38NB
------------+----------+----------+----------+----------+----------
    real    | 0m2.761s | 0m1.700s | 0m1.059s | 0m2.520s | 0m1.399s
    user    | 0m0.120s | 0m0.050s | 0m0.040s | 0m0.137s | 0m0.090s
    sys     | 0m1.060s | 0m0.743s | 0m0.550s | 0m1.050s | 0m0.553s
  getattr   |    1     |    1     |    1     |    1     |    1
   lookup   |  10002   |    83    |    2     |  10002   |    2
   access   |    3     |    3     |    3     |    3     |    3
  readdir   |    89    |    0     |    0     |    99    |    0
readdirplus |    0     |   371    |   393    |    0     |   393
time ls -U --color=none /nfs/test/dir.10000 > ls.txt
   kernel   |    36    |  36NORC  |    38    |   38RC   |   38NB
------------+----------+----------+----------+----------+----------
    real    | 0m0.164s | 0m0.143s | 0m0.181s | 0m0.061s | 0m0.084s
    user    | 0m0.000s | 0m0.007s | 0m0.007s | 0m0.000s | 0m0.010s
    sys     | 0m0.017s | 0m0.057s | 0m0.037s | 0m0.057s | 0m0.070s
  getattr   |    1     |    1     |    1     |    1     |    1
   lookup   |    2     |    2     |    2     |    2     |    2
   access   |    3     |    3     |    3     |    3     |    3
  readdir   |    89    |    0     |    0     |    99    |    88
readdirplus |    0     |   371    |   393    |    0     |    44
time rm -rf /nfs/test/dir.10000 > ls.txt
   kernel   |    36    |  36NORC  |    38    |   38RC   |   38NB
------------+----------+----------+----------+----------+----------
    real    | 0m2.523s | 0m1.512s | 0m1.554s | 0m2.573s | 0m1.555s
    user    | 0m0.037s | 0m0.013s | 0m0.017s | 0m0.030s | 0m0.020s
    sys     | 0m0.833s | 0m0.460s | 0m0.437s | 0m0.797s | 0m0.497s
  getattr   |    1     |    1     |    1     |    1     |    1
   lookup   |  10002   |    2     |    2     |  10002   |    2
   access   |    3     |    3     |    3     |    3     |    3
   remove   |  10000   |  10000   |  10000   |  10000   |  10000
   rmdir    |    1     |    1     |    1     |    1     |    1
  readdir   |    89    |    0     |    0     |    0     |    0
readdirplus |    0     |   371    |   393    |    99    |   393
   fsstat   |    1     |    0     |    0     |    1     |    0


100,000 Files

time ls -f --color=none /nfs/test/dir.100000 > ls.txt
   kernel   |    36     |  36NORC   |    38     |   38RC    |   38NB
------------+-----------+-----------+-----------+-----------+----------
    real    | 0m0.430s  | 0m3.916s  | 0m3.901s  | 0m0.543s  | 0m1.955s
    user    | 0m0.023s  | 0m0.023s  | 0m0.043s  | 0m0.033s  | 0m0.017s
    sys     | 0m0.183s  | 0m0.920s  | 0m0.420s  | 0m0.133s  | 0m0.153s
  getattr   |    1      |    1      |    1      |    1      |    1
   lookup   |    2      |    2      |    2      |    2      |    2
   access   |    3      |    3      |    3      |    3      |    3
  readdir   |   885     |    0      |    0      |   981     |   970
readdirplus |    0      |   3704    |   3922    |    0      |    44
time ls -lU --color=none /nfs/test/dir.100000 > ls.txt
   kernel   |    36     |  36NORC   |    38     |   38RC    |   38NB
------------+-----------+-----------+-----------+-----------+----------
    real    | 0m28.302s | 0m17.219s | 0m13.897s | 0m23.753s | 0m13.758s
    user    | 0m01.033s | 0m00.597s | 0m00.553s | 0m01.027s | 0m00.563s
    sys     | 0m10.886s | 0m06.920s | 0m05.590s | 0m08.696s | 0m05.523s
  getattr   |     1     |     1     |     1     |     1     |     1
   lookup   |   100002  |    1230   |     2     |   100002  |     2
   access   |     3     |     3     |     3     |     3     |     3
  readdir   |    885    |     0     |     0     |    981    |     0
readdirplus |     0     |    3704   |    3922   |     0     |    3922
time ls -U --color=none /nfs/test/dir.100000 > ls.txt
   kernel   |    36     |  36NORC   |    38     |   38RC    |   38NB
------------+-----------+-----------+-----------+-----------+----------
    real    | 0m0.733s  | 0m1.731s  | 0m1.552s  | 0m0.565s  | 0m0.458s
    user    | 0m0.027s  | 0m0.033s  | 0m0.023s  | 0m0.017s  | 0m0.040s
    sys     | 0m0.197s  | 0m0.830s  | 0m0.617s  | 0m0.330s  | 0m0.230s
  getattr   |    1      |    1      |    1      |    1      |    1
   lookup   |    2      |    2      |    2      |    2      |    2
   access   |    3      |    3      |    3      |    3      |    3
  readdir   |   885     |    0      |    0      |   981     |   970
readdirplus |    0      |   3704    |   3922    |    0      |    44
time rm -rf /nfs/test/dir.100000 > ls.txt
   kernel   |    36     |  36NORC   |    38     |   38RC    |   38NB
------------+-----------+-----------+-----------+-----------+----------
    real    | 0m26.871s | 0m16.505s | 0m16.345s | 0m27.563s | 0m26.406s
    user    | 0m00.203s | 0m00.140s | 0m00.147s | 0m00.220s | 0m00.217s
    sys     | 0m07.576s | 0m04.296s | 0m04.420s | 0m08.056s | 0m07.163s
  getattr   |     1     |     1     |     1     |     1     |     1
   lookup   |   100002  |     74    |     2     |   100002  |   83581
   access   |     3     |     3     |     3     |     3     |     3
   remove   |   100000  |   100000  |   100000  |   100000  |   100000
   rmdir    |     1     |     1     |     1     |     1     |     1
  readdir   |    885    |     0     |     0     |    981    |    820
readdirplus |     0     |    3704   |    3922   |     0     |    644
   fsstat   |     0     |     2     |     1     |     2     |     2


1,000,000 Files

time ls -f --color=none /nfs/test/dir.1000000 > ls.txt
   kernel   |     36     |   36NORC   |     38     |    38RC    |    38NB
------------+------------+------------+------------+------------+-----------
    real    | 0m13.257s  | 2m13.968s  |            |            | 0m12.394s
    user    | 0m00.327s  | 0m00.300s  |            |            | 0m00.017s
    sys     | 0m09.483s  | 0m40.791s  |  Looping   |  Looping   | 0m00.037s
  getattr   |     1      |     1      |  readdir   |  readdir   |     1
   lookup   |     2      |     2      |    bug     |    bug     |     2
   access   |     3      |     3      |            |            |     3
  readdir   |    8850    |     0      |            |            |    312
readdirplus |     0      |   37038    |            |            |     44
                                                                  Readdir loop
                                                                    detected
time ls -lU --color=none /nfs/test/dir.1000000 > ls.txt
   kernel   |     36     |   36NORC   |     38     |    38RC    |    38NB
------------+------------+------------+------------+------------+-----------
    real    | 6m48.479s  |            | 0m32.330s  | 0m35.978s  | 0m4.496s
    user    | 0m11.416s  |            | 0m03.256s  | 0m03.510s  | 0m0.200s
    sys     | 2m00.499s  |  Looping   | 0m24.762s  | 0m25.078s  | 0m1.767s
  getattr   |     1      |  readdir   |     4      |     4      |    1
   lookup   |  1000002   |    bug     |     2      |   32946    |    2
   access   |     23     |            |     6      |     6      |    3
  readdir   |    8850    |            |     0      |    323     |    0
readdirplus |     0      |            |    1292    |     0      |   1292
                                        ls: memory   ls: memory   Readdir loop
                                        exhausted    exhausted      detected
time ls -U --color=none /nfs/test/dir.1000000 > ls.txt
   kernel   |     36     |   36NORC   |     38     |    38RC    |    38NB
------------+------------+------------+------------+------------+-----------
    real    | 0m38.040s  | 0m56.100s  |            |            | 0m0.169s
    user    | 0m00.297s  | 0m00.300s  |            |            | 0m0.017s
    sys     | 0m09.413s  | 0m41.111s  |  Looping   |  Looping   | 0m0.120s
  getattr   |     1      |     1      |  readdir   |  readdir   |    1
   lookup   |     2      |     2      |    bug     |    bug     |    2
   access   |     3      |     3      |            |            |    3
  readdir   |    8850    |     0      |            |            |   312
readdirplus |     0      |   37038    |            |            |    44
                                                                  Readdir loop
                                                                    detected
time rm -rf /nfs/test/dir.1000000 > ls.txt
   kernel   |     36     |   36NORC   |     38     |    38RC    |    38NB
------------+------------+------------+------------+------------+-----------
    real    | 50m48.529s | 45m21.721s |            |  0m9.918s  | 0m44.815s
    user    | 00m02.100s | 00m02.513s |            |  0m1.163s  | 0m00.067s
    sys     | 01m24.991s | 05m18.723s |            |  0m2.943s  | 0m02.037s
  getattr   |      1     |      1     |            |     1      |     1
   lookup   |   1000005  |    984847  |  Looping   |     2      |   16525
   access   |      48    |      42    |  readdir   |     3      |     6
   remove   |   1000000  |   1000000  |    bug     |     0      |   32944
   rmdir    |      1     |      1     |            |     0      |     1
  readdir   |     8850   |    488918  |            |    323     |    162
readdirplus |      0     |      2     |            |     0      |    644
   fsstat   |      2     |      0     |            |     0      |     2
                                                   Out of memory  Readdir loop
                                                                    detected
Personal tools