On Fri, Feb 27, 2009 at 12:31 AM, Andrzej SzymaĆski szymans@agh.edu.pl wrote:
Hello,
Does anybody know how to avoid the file fragmentation when a file is created over NFSv3?
A file created locally is OK: dd bs=32k if=/dev/zero of=test count=32x1024 conv=fsync filefrag test test: 10 extents found, perfection would be 9 extents
When I create the file in the same dir, but from another machine, mounted over NFS:
filefrag test test: 4833 extents found, perfection would be 9 extents
1) what is filefrag and where is it from? 2) Have you played with adding/subtracting threads to see if that helps? 3) What happens if you don't use fsync on the dd. 4) What happens if you use larger/smaller bs 5) Is the rsize/wsize onthe server 32768 or some other number. I thought the default w/size on an export was 512 or some small number.
With such a file a sequential read is quite slow (~76MB vs >200MB on my raid card).
I can just suspect that this is a problem of block allocation when the same file is appended by different processes (8 NFS threads).
I've tried mounting ext3 with -o reservation and switch to NFS over TCP, with no improvement.
Both systems are Centos 5.2 with kernel 2.6.18-92.1.22.el5 The ext3 is mounted with rw,nosuid,nodev,usrquota,grpquota,acl NFS export: rw,sync,no_root_squash 8 NFS threads. Remotely mounted with options rw,intr,nfsvers=3,proto=udp,rsize=32768,wsize=32768
I would be very grateful for any help.
Andrzej _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos