Readdir NFSv3 No Readdir Plus

From Linux NFS

(Difference between revisions)
Jump to: navigation, search
Line 5: Line 5:
   38RC: Linux 2.6.38 (with readdir cap added back)
   38RC: Linux 2.6.38 (with readdir cap added back)
   38NB: Linux 2.6.38 (with Neil Brown's patch and loop detection)
   38NB: Linux 2.6.38 (with Neil Brown's patch and loop detection)
-
<pre>
+
</pre>

Revision as of 19:04, 4 April 2011

    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)


100 Files

time ls -f --color=none /nfs/test/dir.100 > ls.txt
 kernel |    36    |  36NORC  |    38    |   38RC   |   38NB
--------+----------+----------+----------+----------+----------
  real  | 0m0.011s | 0m0.079s | 0m0.129s | 0m0.045s | 0m0.016s
  user  | 0m0.007s | 0m0.000s | 0m0.000s | 0m0.000s | 0m0.000s
  sys   | 0m0.003s | 0m0.007s | 0m0.007s | 0m0.043s | 0m0.010s
getattr |    1     |    1     |    1     |    1     |    1
 lookup |    2     |    2     |    2     |    2     |    2
 access |    3     |    3     |    3     |    3     |    3
readdir |    1     |    1     |    1     |    1     |    1

time ls -lU --color=none /nfs/test/dir.100 > ls.txt
 kernel |    36    |  36NORC  |    38    |   38RC   |   38NB
--------+----------+----------+----------+----------+----------
  real  | 0m0.151s | 0m0.123s | 0m0.059s | 0m0.065s | 0m0.056s
  user  | 0m0.007s | 0m0.007s | 0m0.003s | 0m0.007s | 0m0.007s
  sys   | 0m0.023s | 0m0.017s | 0m0.017s | 0m0.023s | 0m0.013s
getattr |    1     |    1     |    1     |    1     |    1
 lookup |   102    |   102    |   102    |   102    |   102
 access |    3     |    3     |    3     |    3     |    3
readdir |    1     |    1     |    1     |    1     |    1

time ls -U --color=none /nfs/test/dir.100 > ls.txt
 kernel |    36    |  36NORC  |    38    |   38RC   |   38NB
--------+----------+----------+----------+----------+----------
  real  | 0m0.011s | 0m0.056s | 0m0.013s | 0m0.014s | 0m0.031s
  user  | 0m0.000s | 0m0.003s | 0m0.003s | 0m0.000s | 0m0.003s
  sys   | 0m0.007s | 0m0.010s | 0m0.000s | 0m0.010s | 0m0.013s
getattr |    1     |    1     |    1     |    1     |    1
 lookup |    2     |    2     |    2     |    2     |    2
 access |    3     |    3     |    3     |    3     |    3
readdir |    1     |    1     |    1     |    1     |    1

time rm -rf /nfs/test/dir.100 > ls.txt
 kernel |    36    |  36NORC  |    38    |   38RC   |   38NB
--------+----------+----------+----------+----------+----------
  real  | 0m0.032s | 0m0.033s | 0m0.040s | 0m0.056s | 0m0.066s
  user  | 0m0.000s | 0m0.000s | 0m0.000s | 0m0.000s | 0m0.000s
  sys   | 0m0.013s | 0m0.013s | 0m0.020s | 0m0.017s | 0m0.017s
getattr |    1     |    1     |    1     |    1     |    1
 lookup |   102    |   102    |   102    |   102    |   102
 access |    3     |    3     |    3     |    3     |    3
 remove |   100    |   100    |   100    |   100    |   100
 rmdir  |    1     |    1     |    1     |    1     |    1
readdir |    1     |    1     |    1     |    1     |    1
 fsstat |    1     |    1     |    1     |    1     |    1



1,000 Files
===========

time ls -f --color=none /nfs/test/dir.1000 > ls.txt
 kernel |    36    |  36NORC  |    38    |   38RC   |   38NB
--------+----------+----------+----------+----------+----------
  real  | 0m0.014s | 0m0.029s | 0m0.035s | 0m0.017s | 0m0.014s
  user  | 0m0.000s | 0m0.000s | 0m0.003s | 0m0.000s | 0m0.007s
  sys   | 0m0.007s | 0m0.010s | 0m0.007s | 0m0.013s | 0m0.003s
getattr |    1     |    1     |    1     |    1     |    1
 lookup |    2     |    2     |    2     |    2     |    2
 access |    3     |    3     |    3     |    3     |    3
readdir |    8     |    8     |    10    |    10    |    10

time ls -lU --color=none /nfs/test/dir.1000 > ls.txt
 kernel |    36    |  36NORC  |    38    |   38RC   |   38NB
--------+----------+----------+----------+----------+----------
  real  | 0m0.327s | 0m0.395s | 0m0.320s | 0m0.288s | 0m0.247s
  user  | 0m0.020s | 0m0.017s | 0m0.007s | 0m0.007s | 0m0.017s
  sys   | 0m0.103s | 0m0.247s | 0m0.133s | 0m0.213s | 0m0.090s
getattr |    1     |    1     |    1     |    1     |    1
 lookup |   1002   |   1002   |   1002   |   1002   |   1002
 access |    3     |    3     |    3     |    3     |    3
readdir |    8     |    8     |    10    |    10    |    10

time ls -U --color=none /nfs/test/dir.1000 > ls.txt
 kernel |    36    |  36NORC  |    38    |   38RC   |   38NB
--------+----------+----------+----------+----------+----------
  real  | 0m0.027s | 0m0.016s | 0m0.032s | 0m0.018s | 0m0.024s
  user  | 0m0.003s | 0m0.000s | 0m0.003s | 0m0.007s | 0m0.003s
  sys   | 0m0.003s | 0m0.013s | 0m0.007s | 0m0.010s | 0m0.017s
getattr |    1     |    1     |    1     |    1     |    1
 lookup |    2     |    2     |    2     |    2     |    2
 access |    3     |    3     |    3     |    3     |    3
readdir |    8     |    8     |    10    |    10    |    10

time rm -rf /nfs/test/dir.1000 > ls.txt
 kernel |    36    |  36NORC  |    38    |   38RC   |   38NB
--------+----------+----------+----------+----------+----------
  real  | 0m0.287s | 0m0.264s | 0m0.319s | 0m0.264s | 0m0.270s
  user  | 0m0.010s | 0m0.000s | 0m0.007s | 0m0.003s | 0m0.000s
  sys   | 0m0.073s | 0m0.083s | 0m0.173s | 0m0.120s | 0m0.147s
getattr |    1     |    1     |    1     |    1     |    1
 lookup |   1002   |   1002   |   1002   |   1002   |   1002
 access |    3     |    3     |    3     |    3     |    3
 remove |   1000   |   1000   |   1000   |   1000   |   1000
 rmdir  |    1     |    1     |    1     |    1     |    1
readdir |    8     |    8     |    10    |    10    |    10
 fsstat |    1     |    1     |    1     |    1     |    1



10,000 Files
============

time ls -f --color=none /nfs/test/dir.10000 > ls.txt
 kernel |    36    |  36NORC  |    38    |   38RC   |   38NB
--------+----------+----------+----------+----------+----------
  real  | 0m0.090s | 0m0.108s | 0m0.077s | 0m0.058s | 0m0.059s
  user  | 0m0.017s | 0m0.000s | 0m0.010s | 0m0.003s | 0m0.007s
  sys   | 0m0.003s | 0m0.043s | 0m0.027s | 0m0.050s | 0m0.050s
getattr |    1     |    1     |    1     |    1     |    1
 lookup |    2     |    2     |    2     |    2     |    2
 access |    3     |    3     |    3     |    3     |    3
readdir |    89    |    89    |    99    |    99    |    99

time ls -lU --color=none /nfs/test/dir.10000 > ls.txt
 kernel |    36    |  36NORC  |    38    |   38RC   |   38NB
--------+----------+----------+----------+----------+----------
  real  | 0m2.753s | 0m2.812s | 0m2.719s | 0m2.450s | 0m2.392s
  user  | 0m0.097s | 0m0.093s | 0m0.097s | 0m0.140s | 0m0.110s
  sys   | 0m1.113s | 0m1.237s | 0m0.910s | 0m0.930s | 0m0.880s
getattr |    1     |    1     |    1     |    1     |    1
 lookup |  10002   |  10002   |  10002   |  10002   |  10002
 access |    3     |    3     |    3     |    3     |    3
readdir |    89    |    89    |    99    |    99    |    99

time ls -U --color=none /nfs/test/dir.10000 > ls.txt
 kernel |    36    |  36NORC  |    38    |   38RC   |   38NB
--------+----------+----------+----------+----------+----------
  real  | 0m0.097s | 0m0.061s | 0m0.120s | 0m0.061s | 0m0.057s
  user  | 0m0.033s | 0m0.003s | 0m0.040s | 0m0.010s | 0m0.007s
  sys   | 0m0.017s | 0m0.017s | 0m0.013s | 0m0.043s | 0m0.047s
getattr |    1     |    1     |    1     |    1     |    1
 lookup |    2     |    2     |    2     |    2     |    2
 access |    3     |    3     |    3     |    3     |    3
readdir |    89    |    89    |    99    |    99    |    99

time rm -rf /nfs/test/dir.10000 > ls.txt
 kernel |    36    |  36NORC  |    38    |   38RC   |   38NB
--------+----------+----------+----------+----------+----------
  real  | 0m2.698s | 0m2.439s | 0m2.777s | 0m2.570s | 0m2.550s
  user  | 0m0.013s | 0m0.010s | 0m0.007s | 0m0.027s | 0m0.017s
  sys   | 0m0.810s | 0m0.790s | 0m0.873s | 0m0.853s | 0m0.793s
getattr |    1     |    1     |    1     |    1     |    1
 lookup |  10002   |  10002   |  10002   |  10002   |  10002
 access |    3     |    3     |    3     |    3     |    3
 remove |  10000   |  10000   |  10000   |  10000   |  10000
 rmdir  |    1     |    1     |    1     |    1     |    1
readdir |    89    |    89    |    99    |    99    |    99
 fsstat |    1     |    1     |    1     |    1     |    1



100,000 Files
=============

time ls -f --color=none /nfs/test/dir.100000 > ls.txt
 kernel |    36     |  36NORC   |    38     |   38RC    |   38NB
--------+-----------+-----------+-----------+-----------+----------
  real  | 0m0.666s  | 0m0.682s  | 0m0.618s  | 0m0.481s  | 0m0.524s
  user  | 0m0.037s  | 0m0.017s  | 0m0.030s  | 0m0.040s  | 0m0.053s
  sys   | 0m0.173s  | 0m0.207s  | 0m0.133s  | 0m0.247s  | 0m0.397s
getattr |    1      |    1      |    1      |    1      |    1
 lookup |    2      |    2      |    2      |    2      |    2
 access |    3      |    3      |    3      |    3      |    3
readdir |   885     |   885     |   981     |   981     |   981

time ls -lU --color=none /nfs/test/dir.100000 > ls.txt
 kernel |    36     |  36NORC   |    38     |   38RC    |   38NB
--------+-----------+-----------+-----------+-----------+----------
  real  | 0m29.040s | 0m29.681s | 0m27.115s | 0m23.544s | 0m23.818s
  user  | 0m01.037s | 0m01.107s | 0m01.060s | 0m01.063s | 0m00.095s
  sys   | 0m01.113s | 0m11.843s | 0m09.133s | 0m08.626s | 0m09.016s
getattr |     1     |     1     |     1     |     1     |     1
 lookup |   100002  |   100002  |   100002  |   100002  |   100002
 access |     3     |     3     |     3     |     3     |     3
readdir |    885    |    885    |    981    |    981    |    981

time ls -U --color=none /nfs/test/dir.100000 > ls.txt
 kernel |    36     |  36NORC   |    38     |   38RC    |   38NB
--------+-----------+-----------+-----------+-----------+----------
  real  | 0m1.585s  | 0m0.493s  | 0m0.990s  | 0m0.518s  | 0m0.476s
  user  | 0m0.537s  | 0m0.040s  | 0m0.523s  | 0m0.047s  | 0m0.023s
  sys   | 0m0.220s  | 0m0.187s  | 0m0.183s  | 0m0.039s  | 0m0.317s
getattr |    1      |    1      |    1      |    1      |    1
 lookup |    2      |    2      |    2      |    2      |    2
 access |    3      |    3      |    3      |    3      |    3
readdir |   885     |   885     |   981     |   981     |   981

time rm -rf /nfs/test/dir.100000 > ls.txt
 kernel |    36     |  36NORC   |    38     |   38RC    |   38NB
--------+-----------+-----------+-----------+-----------+----------
  real  | 0m28.312s | 0m27.197s | 0m32.711s | 0m27.093s | 0m26.746s
  user  | 0m00.213s | 0m00.200s | 0m00.237s | 0m00.243s | 0m00.193s
  sys   | 0m07.500s | 0m07.420s | 0m08.679s | 0m07.789s | 0m07.673s
getattr |     1     |     1     |     1     |     1     |     1
 lookup |   100002  |   100002  |   100002  |   100002  |   100002
 access |     3     |     3     |     6     |     3     |     3
 remove |   100000  |   100000  |   100000  |   100000  |   100000
 rmdir  |     1     |     1     |     1     |     1     |     1
readdir |    885    |    885    |    981    |    981    |    981
 fsstat |     2     |     2     |     2     |     2     |     2



1,000,000 Files
===============

time ls -f --color=none /nfs/test/dir.1000000 > ls.txt
 kernel |     36     |   36NORC   |     38     |    38RC    |    38NB
--------+------------+------------+------------+------------+-----------
  real  | 0m52.432s  | 0m51.730s  |            |            |  0m0.171s
  user  | 0m00.283s  | 0m00.333s  |            |            |  0m0.017s
  sys   | 0m09.843s  | 0m09.629s  |  Looping   |  Looping   |  0m0.153s
getattr |     1      |     1      |  readdir   |  readdir   |     1
 lookup |     2      |     2      |    bug     |    bug     |     2
 access |     3      |     3      |            |            |     3
readdir |    8850    |    8850    |            |            |    323
                                                              Readdir loop
                                                                detected
time ls -lU --color=none /nfs/test/dir.1000000 > ls.txt
 kernel |     36     |   36NORC   |     38     |    38RC    |    38NB
--------+------------+------------+------------+------------+-----------
  real  | 6m45.724s  | 5m36.690s  | 1m14.123s  |            |  0m7.851s
  user  | 0m10.613s  | 0m10.763s  | 0m03.456s  |            |  0m0.927s
  sys   | 1m58.756s  | 2m01.479s  | 0m25.532s  | ls: memory |  0m3.003s
getattr |     1      |     1      |     4      | exhausted  |     1
 lookup |  1000002   |  1000002   |   32946    |            |   32946
 access |     23     |     20     |     6      |            |     3
readdir |    8850    |    8850    |    323     |            |    323
                                  Out of memory               Readdir loop
                                                                detected
time ls -U --color=none /nfs/test/dir.1000000 > ls.txt
 kernel |     36     |   36NORC   |     38     |    38RC    |    38NB
--------+------------+------------+------------+------------+-----------
  real  | 0m19.982s  | 0m12.819s  | 0m12.621s  |            |  0m0.175s
  user  | 0m07.110s  | 0m00.307s  | 0m00.947s  |            |  0m0.020s
  sys   | 0m10.313s  | 0m09.809s  | 0m03.076s  |  Looping   |  0m0.153s
getattr |     1      |     1      |     1      |  readdir   |     1
 lookup |     2      |     2      |     2      |    bug     |     2
 access |     3      |     3      |     3      |            |     3
readdir |    8850    |    8850    |    2902    |            |    323
                                  Out of memory               Readdir loop
                                                                detected

time rm -rf /nfs/test/dir.1000000 > ls.txt
 kernel |     36     |   36NORC   |     38     |    38RC    |    38NB
--------+------------+------------+------------+------------+-----------
  real  | 33m57.591s | 32m54.279s |            |  0m18.350s |  0m57.887s
  user  | 00m02.357s | 00m02.543s |            |  0m00.827s |  0m00.133s
  sys   | 03m17.380s | 03m24.627s |            |  0m02.780s |  0m07.933s
getattr |      1     |      2     |  Looping   |      1     |      1
 lookup |   1000005  |   1000005  |  readdir   |      2     |    32946
 access |      35    |      33    |    bug     |      3     |      6
 remove |   1000000  |   1000000  |            |      0     |    32944
 rmdir  |      1     |      1     |            |      0     |      1
readdir |     8850   |     8850   |            |     721    |     323
 fsstat |      2     |      2     |            |      0     |      2
                                               Out of memory  Readdir loop
                                                                detected
Personal tools