NFS Performance

Joel Sherrill joel.sherrill at oarcorp.com
Tue Aug 29 11:29:26 UTC 2006


Steven Johnson wrote:
> Hi,
>
> We are using the NFS Client stack as found in the RTEMS CVS.  We
> experienced the slow performance that the readme talks about.  We were
> getting around 3.5Mbit/s on a 100MBit link.  Our Processor is a 100Mhz
> MPC862, and we are using the FEC.
>
> This isn't fast enough for us, as we need around 6-7 Mbit/s so we can
> read media files and play them in real time from the NFS Share.
>
> So we investigated the causes.
>
> The single biggest thing we found is BUFSIZ in stdio.h.
>
> It was defined as 1024, which gave us ~3.5Mbit/s
> We Changed it to 8192, and NFS Performance on our board jumped to
> ~19.53MBit/s
> We also tried 32768, which gave us ~19.99MBit/s
>
> (This is all Read performance, we don't know how fast write is, because
> we don't write with our application).
>
> Also, the readme for the NFS Client indicates performance sucks due to a
> lack of read ahead buffering.  Changing BUFSIZ to 8192 seems to provide
> read ahead buffering, because if we read 512 bytes, 8192 bytes are
> transferred from the file, and another request for 8192 bytes only
> occurs when we have exhausted that data.
>
> Anyway, I'm just reporting this so that anyone else who needs NFS to
> perform better can know what we did to achieve dramatic speed increases.
>
>   
Interesting.  Since hacking stdio.h is generally not a good thing.  Can 
you try using
one of the setbuf methods on the file descriptor and seeing if that 
accomplishes the
same thing.

If it does, then perhaps an open on a NFS client should implicitly 
increase the buffer
size.

This would limit the impact of the change.

20 Mbit/s is pretty nice performance from any computer but a 100 Mhz PowerPC
makes it impressive.

--joel

> Steven J
>   




More information about the users mailing list