Skip to contentSkip to conversation

NFS write speed and file permissions (2.6.0-test10 kernel)

DISCUSSION Gaël Roualland 1 participant 1 message Nov 26, 2003 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Stephen Beahm a =E9crit :

Quoted 25 lines

I am seeing huge speed differences in NFS file writes based on file permissions.

create a test file:
dd if=3D/dev/zero of=3Dtestfile bs=3D4k count=3D65535

chmod 664 testfile
time cp testfile /mnt/gwpub

real    0m36.818s
user    0m0.018s
sys     0m2.574s

chmod 755 testfile
time cp testfile /mnt/gwpub

real    4m6.056s
user    0m0.054s
sys     0m5.835s

I can consistently reproduce this problem with a 2.6.0-test9 or 2.6.0- test10 kernel on the client side. There does not seem to be any problems here with a 2.4.22 kernel. Reading does not seem to be affected, only writes. Neither export nor mount options make a difference. If the test is performed as root, all is fast.

Quoted 6 lines

I am using NFSv3 and nfs-utils-1.06.

This is only an observation and not mean anything:
using a 2.4.22 client, open() does not pass any mode, but a 2.6.0-testX client does this: open("/mnt/gwpub/testfile", O_WRONLY|O_CREAT|O_LARGEFILE, 0100755)

I'm experiencing the exact same problem with 2.6.0-test10 as NFS client and a FreeBSD server, in NFSv2 and NFSv3.

Looking at the network dumps, it looks like writes are being done synchronously when the file permissions is 755, just as if O_SYNC was set. Also, when open is called with perm 0755, the CREATE call is passed a mode of 0100755, but in its reply the server only aknowledges 0755, while when open is called with 0644, CREATE is passed exactly that and the server agrees. I don't know if that matters, though...

Ga=EBl.

--=20
Ga=EBl Roualland -+- [email protected]

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs