Skip to contentSkip to conversation

Why is NFS write so slow?

DISCUSSION Xin Zhao 3 participants 3 messages Mar 21, 2005

lore
Share & tools
lore

Xin Zhao

author
#0 lore raw

Sorry for the dumb question.

I am trying to develop a new filesystem based on NFS, which runs in a very fast network environment. I used the source code of NFS2, but noticed that NFS write is very slow. Even if I changed wsize to 8192, it still can only reach 1MB/s. I don't know why. Because the network is extremely fast (over 100MB/s), I don't think network is the only reason. Any other reason?

Is the NFS write synchronous? Does that means the NFS server will not return before the data is flushed to disk? Because nfsd_write will close the file every time, I will assume that the data will be flushed to disk before return. However, even if I change nfsd_write to stop closing file, the write speed is still very slow. Can someone give me some advice about this?

Thanks in advance!

-x

#1 lore raw
Quoted 9 lines · Xin Zhao

I am trying to develop a new filesystem based on NFS, which runs in a very fast network environment. I used the source code of NFS2, but noticed that NFS write is very slow. Even if I changed wsize to 8192, it still can only reach 1MB/s. I don't know why. Because the network is extremely fast (over 100MB/s), I don't think network is the only reason. Any other reason?

Is the NFS write synchronous? Does that means the NFS server will not return before the data is flushed to disk?

Yes, that is the case here. You can use export or mount options to make NFS asynchronous.

Plus, NFS3 has write clustering which may be worth a try depending on your workload.

Signature · 1 line
Matthias Andree
#2 lore raw
In reply to Xin Zhao
Quoted 9 lines · Xin Zhao

Sorry for the dumb question.

I am trying to develop a new filesystem based on NFS, which runs in a very fast network environment. I used the source code of NFS2, but noticed that NFS write is very slow. Even if I changed wsize to 8192, it still can only reach 1MB/s. I don't know why. Because the network is extremely fast (over 100MB/s), I don't think network is the only reason. Any other reason?

Quoted 8 lines

Is the NFS write synchronous? Does that means the NFS server will not return before the data is flushed to disk? Because nfsd_write will close the file every time, I will assume that the data will be flushed to disk before return. However, even if I change nfsd_write to stop closing file, the write speed is still very slow. Can someone give me some advice about this?

Thanks in advance!

because NFS is now at version 4, so you're 2 versions late ?