2007-12-28 09:09:03

by saeed bishara

[permalink] [raw]
Subject: [NFS] read-ahead in NFS server

Hi,
my NFS server seems not to utilize the read-ahead feature, my exported
dir is located on ext3 fs over sata disk. the sata controller can
issue commands up to 1MB, also I modified the read ahead under the sys
to 1MB. but when the client do reads in 32KB chunks (rsize), I can see
in the server side that all IOs are ~32KB. my kernel version is
2.6.22.7.
does the NFS server utilizes the read-ahead feature? what should I do
to enable it?

please CC me as I'm not subscribed to this list.
saeed

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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



2007-12-31 04:33:56

by Dean

[permalink] [raw]
Subject: Re: [NFS] read-ahead in NFS server

My understanding is that readahead is a client concept, in the sense
that the nfs client and ext3 are both clients. The NFS client performs
readahead, which is carried out as a series of 32 KB requests. The
exported file system client, ext3 in your case, will decide how best to
react to these requests and perform readahead, etc as necessary. The
NFS server only relays the I/O requests to the underlying file system,
although it might delay (on linux) or gather the requests for maximum
performance.

I believe ext3 uses the standard linux readahead mechanism, so readahead
should be occurring. How are you determining on the server that ext3 is
only issuing 32KB requests to the disks? I bet that the nfs server is
passing 32 KB requests to ext3, which in turn is issuing larger requests
to the disks.

Another thing to do is on linux you can increase the rsize to 1 MB to
get larger chunks out of the disks.

Dean

saeed bishara wrote:
> Hi,
> my NFS server seems not to utilize the read-ahead feature, my exported
> dir is located on ext3 fs over sata disk. the sata controller can
> issue commands up to 1MB, also I modified the read ahead under the sys
> to 1MB. but when the client do reads in 32KB chunks (rsize), I can see
> in the server side that all IOs are ~32KB. my kernel version is
> 2.6.22.7.
> does the NFS server utilizes the read-ahead feature? what should I do
> to enable it?
>
> please CC me as I'm not subscribed to this list.
> saeed
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> 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
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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


2007-12-31 13:43:23

by saeed bishara

[permalink] [raw]
Subject: Re: [NFS] read-ahead in NFS server

>
> I believe ext3 uses the standard linux readahead mechanism, so readahead
> should be occurring. How are you determining on the server that ext3 is
> only issuing 32KB requests to the disks?
I use sar -du to see the actual requests average size that handled by
the sata driver.

I bet that the nfs server is
> passing 32 KB requests to ext3, which in turn is issuing larger requests
> to the disks.
>
> Another thing to do is on linux you can increase the rsize to 1 MB to
> get larger chunks out of the disks.
it seems this is known issue with NFSv3 that is resolved in version 4,
please see my commit to the linux kernel mailing list:

http://lkml.org/lkml/2007/12/27/172

thanks
saeed

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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