[linux-cifs-client] cifs vfs performance

Steve French smfltc at us.ibm.com
Tue May 18 17:00:38 GMT 2004


Quick performance summary of cifs ... 

Have not done enough performance optimizations and lots of low hanging
fruit to fix but here is the current state based on recent informal
tests to Samba 3.0.3 of smbfs vs. cifs performance. CIFS is doing great
for write performance (and open performance when large number of files
does great). Read performance is worse for cifs since smbfs caches
too but more aggressively since smbfs does not use oplock and does not
rely on the nanosecond timestamps.   The write performance looks good
but should be much improved in cifs (although far better than smbfs it
is not at nfs performance levels yet for write) when multipage write is
implemented.  Read performance is hampered for various reasons including
an extra file copy and not using > 16K read sizes.  The reason smbfs is
faster in backward read test
is unknown, and I don't understand why smbfs can hold its own and
equal cifs performance in one write test (the fwrite test)
while the others are so much slower in smbfs as expected.  I think the
freread problem is fairly easy to fux and is caused by the extra cache
flush of read ahead data that I do after the last close cifs when I
don't always need to. The other big issue to fix is I allocate send
buffers that are larger than I need (I use fixed size 5 page buffers for
sends and receives which is suboptimal but consistent) and I don'tuse
gather send iovecs which would help a lot. The receive path has some
obvious cleanups as well.  

-----------------------------------------------
-----------------------------------------------

For Iozone:

CIFS 
  KB  reclen   write rewrite    read    reread   rand read   
512       4  429903  420011    69897   209915  689108 

randwrt bkwrdread recrewrt strread   fwrite frewrt   fread freread
474544      39254 1135033  882722    35997    40352   44103    54042

-----------------------------------------------

SMBFS
  KB  reclen   write rewrite    read    reread    read
512       4   20862   44459    41898   644064  835077   

randwrite bkwrdread recrewrite  strread   fwrite frewrt  fread freread
41052     505938   36657        686284    27985  43611  40891 608741

-----------------------------------------------
-----------------------------------------------

For Connectathon timing tests:

CIFS
./test1: File and directory creation test
        created 155 files 62 directories 5 levels deep in 0.14 seconds
        ./test1 ok.

./test2: File and directory removal test
        removed 155 files 62 directories 5 levels deep in 0.4  seconds
        ./test2 ok.

./test3: lookups across mount point
        500 getcwd and stat calls in 0.0  seconds
        ./test3 ok.

./test4: setattr, getattr, and lookup
        1000 chmods and stats on 10 files in 0.12 seconds
        ./test4 ok.

./test5: read and write
        wrote 1048576 byte file 10 times in 0.26 seconds (39804125
bytes/sec)
        read 1048576 byte file 10 times in 0.2  seconds (468448892
bytes/sec)
        ./test5 ok.

./test6: readdir
        20500 entries read, 200 files in 0.45 seconds
        ./test6 ok.

./test7: link and rename
        200 renames and links on 10 files in 0.15 seconds
        ./test7 ok.

./test8: symlink and readlink
        400 symlinks and readlinks on 10 files in 0.15 seconds
        ./test8 ok.

./test9: statfs
        1500 statfs calls in 0.22 seconds
        ./test9 ok.

-----------------------------------------------

SMBFS (fails)
Starting BASIC tests: test directory /mnt1/1smbfs (arg: -t)

./test1: File and directory creation test
        created 155 files 62 directories 5 levels deep in 0.17 seconds
        ./test1 ok.

./test2: File and directory removal test
        removed 155 files 62 directories 5 levels deep in 0.4  seconds
        ./test2 ok.

./test3: lookups across mount point
        500 getcwd and stat calls in 0.0  seconds
        ./test3 ok.

./test4: setattr, getattr, and lookup
        1000 chmods and stats on 10 files in 0.15 seconds
        ./test4 ok.

./test5: read and write
        wrote 1048576 byte file 10 times in 0.27 seconds (38262214
bytes/sec)
        read 1048576 byte file 10 times in 0.1  seconds (573117621
bytes/sec)
        ./test5 ok.

./test6: readdir
        20500 entries read, 200 files in 0.44 seconds
        ./test6 ok.

./test7: link and rename
basic tests failed (SMBFS)



More information about the linux-cifs-client mailing list