2008-09-17 08:00:57

by Chris Fanning

[permalink] [raw]
Subject: [NFS] sync, async, write speeds.

Hello all,

I'm using NFS to mount /home on a gigabit network.
/etc/exports on the server
/home 192.168.2.48/255.255.255.248(rw,no_root_squash,sync,no_subtree_check)

/proc/mount on the client
home_server:/home /home nfs
rw,vers=3,rsize=32768,wsize=32768,hard,nointr,proto=tcp,timeo=600,retrans=2,sec=sys,addr=192.168.2.22
0 0

Write performance is not good.

dd if=/dev/zero of=/home/testfile bs=16k count=16384
268435456 bytes (268 MB) copied, 45.0461 seconds, 6.0 MB/s

If I change the export to async, it improves a lot.

dd if=/dev/zero of=./testfile bs=16k count=16384
268435456 bytes (268 MB) copied, 3.6 seconds, 74.4 MB/s

But the recommendation is not to use async, right?

I've tried the same thing on two different servers (one xenified
kernel, one stock etch kernel) and two different clients (ubuntu 7.10
y debian etch), with the same results. :(
Where should I start looking to fix this?

Thanks.
Chris.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs



2008-09-17 10:50:41

by Shehjar Tikoo

[permalink] [raw]
Subject: Re: [NFS] sync, async, write speeds.

Chris Fanning wrote:
> I'm using NFS to mount /home on a gigabit network.

First off, if its possible for you to change the configuration on the
clients as well as the server, try bumping up the ethernet frame
size/MTU to 9000, i.e. use jumbo frames. Of course, this depends on
whether your switches and NICs support jumbo frames. To do so, use
ifconfig or specify it in /etc/network/interfaces using the "mtu" option.

> /etc/exports on the server /home
> 192.168.2.48/255.255.255.248(rw,no_root_squash,sync,no_subtree_check)
>
>
>
>
>
> /proc/mount on the client home_server:/home /home nfs
> rw,vers=3,rsize=32768,wsize=32768,hard,nointr,proto=tcp,timeo=600,retrans=2,sec=sys,addr=192.168.2.22
> 0 0
>

Second, try the same dd tests with larger values for rsize and wsize.
These two parameters have a significant affect on NFS throughput, for
read and write respectively.

> Write performance is not good.
>
> dd if=/dev/zero of=/home/testfile bs=16k count=16384 268435456
> bytes (268 MB) copied, 45.0461 seconds, 6.0 MB/s

Try bs=<wsize> or bs=<rsize>( i.e. the values that you specified in
the mount config..), this reduces the number of system calls
that translate to an equivalent NFS rsize of wsize messages. Although,
system calls generally will have negligible overhead when compared to
network latency overhead.

>
> If I change the export to async, it improves a lot.
If you can assure uninterrupted power to the server, I dont see any
reason why you cant use the "async" option.

>
> dd if=/dev/zero of=./testfile bs=16k count=16384 268435456 bytes
> (268 MB) copied, 3.6 seconds, 74.4 MB/s
>
> But the recommendation is not to use async, right?
>
> I've tried the same thing on two different servers (one xenified
> kernel, one stock etch kernel) and two different clients (ubuntu
> 7.10 y debian etch), with the same results. :( Where should I start
> looking to fix this?
>
> Thanks. Chris.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs


2008-09-17 11:15:14

by Marcelo Leal

[permalink] [raw]
Subject: Re: [NFS] sync, async, write speeds.

Hello,
I did not get any performance improvement with block sizes bigger
than 8192... are you using jumbo frame?
Second, i think you should use tcp just if you network is not
reliable, i mean, you are not using a NAS isolated network. And
timeo,retrans you should use just if you see problems. If you want,
you can try with the values above, and see what happens..

Leal.

2008/9/17 Chris Fanning <[email protected]>:
> Hello all,
>
> I'm using NFS to mount /home on a gigabit network.
> /etc/exports on the server
> /home 192.168.2.48/255.255.255.248(rw,no_root_squash,sync,no_subtree_check)
>
> /proc/mount on the client
> home_server:/home /home nfs
> rw,vers=3,rsize=32768,wsize=32768,hard,nointr,proto=tcp,timeo=600,retrans=2,sec=sys,addr=192.168.2.22
> 0 0
>
> Write performance is not good.
>
> dd if=/dev/zero of=/home/testfile bs=16k count=16384
> 268435456 bytes (268 MB) copied, 45.0461 seconds, 6.0 MB/s
>
> If I change the export to async, it improves a lot.
>
> dd if=/dev/zero of=./testfile bs=16k count=16384
> 268435456 bytes (268 MB) copied, 3.6 seconds, 74.4 MB/s
>
> But the recommendation is not to use async, right?
>
> I've tried the same thing on two different servers (one xenified
> kernel, one stock etch kernel) and two different clients (ubuntu 7.10
> y debian etch), with the same results. :(
> Where should I start looking to fix this?
>
> Thanks.
> Chris.
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> NFS maillist - [email protected]
> https://lists.sourceforge.net/lists/listinfo/nfs
> _______________________________________________
> Please note that [email protected] is being discontinued.
> Please subscribe to [email protected] instead.
> http://vger.kernel.org/vger-lists.html#linux-nfs
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>



--

[http://www.posix.brte.com.br/blog]
--------==== pOSix rules ====-------

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs


2008-09-17 15:36:44

by Chuck Lever

[permalink] [raw]
Subject: Re: [NFS] sync, async, write speeds.

On Wed, Sep 17, 2008 at 5:32 AM, Shehjar Tikoo <shehjart-YbfuJp6tym7X/[email protected]> wrote:
>> If I change the export to async, it improves a lot.
> If you can assure uninterrupted power to the server, I dont see any
> reason why you cant use the "async" option.

If the server O/S crashes due to a bug, you are still open to silent
data corruption. A UPS cannot help you with that.

--
Chuck Lever

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs


2008-09-18 08:22:23

by Chris Fanning

[permalink] [raw]
Subject: Re: [NFS] sync, async, write speeds.

Hi,

I'm going to try jumbo frames but it'll take me a while to set it up.
I'll get back to you with the results.

Thanks.
Chris.

On Wed, Sep 17, 2008 at 5:36 PM, Chuck Lever <[email protected]> wrote:
> On Wed, Sep 17, 2008 at 5:32 AM, Shehjar Tikoo <shehjart-YbfuJp6tym7X/[email protected]> wrote:
>>> If I change the export to async, it improves a lot.
>> If you can assure uninterrupted power to the server, I dont see any
>> reason why you cant use the "async" option.
>
> If the server O/S crashes due to a bug, you are still open to silent
> data corruption. A UPS cannot help you with that.
>
> --
> Chuck Lever
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs