All of lore.kernel.org
 help / color / mirror / Atom feed
* Performance tuning on modern 2.6 series kernels
@ 2007-06-13 17:45 Bill Johnstone
  2007-06-13 18:58 ` Trond Myklebust
  2007-06-14 18:00 ` Chuck Lever
  0 siblings, 2 replies; 4+ messages in thread
From: Bill Johnstone @ 2007-06-13 17:45 UTC (permalink / raw)
  To: nfs

Hello all.

I've been trying to understand performance tuning for NFSv3 on Linux
2.6 kernels (say 2.6.20 and up), and I just wound up uncertain, with a
lot of questions.  Additionally, the Linux-NFS documentation for
performance tuning at http://nfs.sourceforge.net/nfs-howto/ar01s05.html
has a lot of discussion regarding 2.4 series kernels, which doesn't
really seem that relevant these days.  It would be great if there was
more discussion of 2.6-related information (if so desired, I could
submit some changes to the docs based on what I hear back).  Anyway,
here's what I would really appreciate some clarification on:

1. TCP vs. UDP.  Assuming a high-bandwidth switched network, with
enough disk and network bandwidth on the storage server, and
rsize/wsize (for both) less than the MTU, UDP should have less overhead
and be faster, than TCP, correct?

2. Large rsize/wsize, and TCP vs. UDP again.  I understand that if the
rsize/wsize is larger than the MTU, a UDP packet containing NFS
read/write data will be fragmented into multiple packets.  However, all
the documentation in this cases seems to imply that even though the
same MTU restriction applies to TCP, TCP will be faster in this case
than the fragmented UDP.  Why is this?  Doesn't TCP need to "fragment"
the NFS payload as well?

3. Socket buffers.  Many references mention changing
/proc/sys/net/core/{r,w}mem_default and
/proc/sys/net/core/{r,w}mem_max
but documents such as NetApp's "Using the Linux NFS Client with Network
Appliance Filers" ( http://www.netapp.com/library/tr/3183.pdf ) mention
that this is not necessary in 2.6 kernels, as they "auto-tune" socket
buffers.  However, even if we needn't change the default values, is
there any benefit to increasing the rmem_max / wmem_max parameters?

4. tcp_window_scaling, tcp_timestamps, and tcp_sack .  There is an IBM
Linux NFS performance tuning article at
http://www.ibm.com/developerworks/eserver/library/es-033104.html which
mentions turning off all three of these features, and presumaby the
tcp_window_scaling causes them to see an effective MSS less than what
they get without it.  Is there merit to turning these features off
today, on modern 2.6 kernels?

Thank you very much for any enlightenment you provide.



      ___________________________________________________________________________________
You snooze, you lose. Get messages ASAP with AutoCheck
in the all-new Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_html.html

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: Performance tuning on modern 2.6 series kernels
@ 2007-06-15  4:17 Bill Johnstone
  0 siblings, 0 replies; 4+ messages in thread
From: Bill Johnstone @ 2007-06-15  4:17 UTC (permalink / raw)
  To: nfs

--- Trond Myklebust <trond.myklebust@fys.uio.no> wrote:

> On Wed, 2007-06-13 at 10:45 -0700, Bill Johnstone wrote:

> > 4. tcp_window_scaling, tcp_timestamps, and tcp_sack .  There is an
> > IBM
> > Linux NFS performance tuning article at
> > http://www.ibm.com/developerworks/eserver/library/es-033104.html
> > which
> > mentions turning off all three of these features, and presumaby the
> > tcp_window_scaling causes them to see an effective MSS less than
> > what
> > they get without it.  Is there merit to turning these features off
> > today, on modern 2.6 kernels?
> 
> Those were in a section on "Web applications", not NFS AFAICS.
> Their
> main reason for turning off window scaling is presumably to work
> around
> the "broken router" issue??? (see http://lwn.net/Articles/92727/)
> Otherwise, given their choices of tcp_rmem/tcp_wmem/tcp_mem, the
> decision to turn off window scaling seems very odd...
 
Yes, I was mistaken about the overall intent of the article, it was
on generic "performance optimization" but came up as a relevant hit in
a
Google search for NFS Linux performance tuning.
 
They are not very clear about the specific reasons for turning each
specific feature off, but they indicate that having them on reduced
their MSS below the maximum (and expected) value for 1500 byte MTU
ethernet.  Perhaps, as you say, this is an implementation artifact of
the tcp window scaling "broken router" workaround.  Either way, it
seems like in a modern implementation, we should leave these features
on.




 
____________________________________________________________________________________
Don't get soaked.  Take a quick peak at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-06-15  4:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-13 17:45 Performance tuning on modern 2.6 series kernels Bill Johnstone
2007-06-13 18:58 ` Trond Myklebust
2007-06-14 18:00 ` Chuck Lever
  -- strict thread matches above, loose matches on Subject: below --
2007-06-15  4:17 Bill Johnstone

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.