<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Arial","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Arial","sans-serif";
        color:navy;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Arial","sans-serif";
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 @list l0
        {mso-list-id:1595045804;
        mso-list-type:hybrid;
        mso-list-template-ids:-1862107010 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level2
        {mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level4
        {mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level7
        {mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>><span
style='color:navy'>Are you using tcp as transport?<o:p></o:p></span></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>I’ve
tried both UDP and TCP and the same results on both.  My understanding is
that if you have only one switch between the devices, then UDP should be fine
as long as there isn’t any packet loss.  <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>From
what I can tell, its not so much the transport of data between the client and
server, just the commit time on the server.  I think the steps are:<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p>

<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='font-size:10.0pt;font-family:Symbol'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>        
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>NFS
server receives data<o:p></o:p></span></p>

<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='font-size:10.0pt;font-family:Symbol'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>        
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>NFS
server requests a commit of the data<o:p></o:p></span></p>

<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='font-size:10.0pt;font-family:Symbol'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>        
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Data
gets handed off to the file system<o:p></o:p></span></p>

<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='font-size:10.0pt;font-family:Symbol'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>        
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>File
system writes the data<o:p></o:p></span></p>

<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='font-size:10.0pt;font-family:Symbol'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>        
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>A
response is sent back to the NFS server that the commit was successful<o:p></o:p></span></p>

<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='font-size:10.0pt;font-family:Symbol'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>        
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>NFS
server sends a response back to the client that it can send more data<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>I’m
trying to get more detail on this process though and the above is just an
educated guess.  I even increased the amount of nfsd processes (the
daemons) from 8 to the 32 with the exact same results.  Changing the rsize
and wsize didn’t do anything either.  From my understanding,
meta-data changes are small so increasing the size of the data chunks
shouldn’t really make a difference.  <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p>

<div>

<div class=MsoNormal align=center style='text-align:center'>

<hr size=2 width="100%" align=center>

</div>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
redhat-sysadmin-list-bounces@redhat.com
[mailto:redhat-sysadmin-list-bounces@redhat.com] <b>On Behalf Of </b>Chris
Wornell<br>
<b>Sent:</b> Sunday, November 19, 2006 1:59 AM<br>
<b>To:</b> redhat-sysadmin-list@redhat.com<br>
<b>Subject:</b> NFS Help! Terrible performance with sync,fast performance with
async</span><o:p></o:p></p>

</div>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>I've got a problem that I've spent quite a bit of time on,
though I'm not an expert at NFS. In summary, operations that require meta-data
changes (such as file/directory creations/deletions), perform extremely slow
over sync, but over 10x faster using async.<br>
<br>
I have two systems, connected to a GigE switch using intel pro 1000 NICs (jumbo
frames is currently not enabled on any of the points). <br>
<br>
The NFS server is a dual-core opteron system with 1GB of RAM and 3x300 SAS disk
RAID-5 on a Perc5/i controller with 256MB battery backed cache (write cache is
enabled). The file system is ext3. I've configured nfsd to spawn 32 processes
upon startup. I'm using defaults for export the nfs shares, no changes to rsize
or wsize.<br>
<br>
The NFS client is a dual Xeon with 4GB of RAM and a single 7200rpm SATA disk.
Both systems are running RHEL WS 3 Update 8 and kernel 2.4.21-47.0.1.ELsmp. <br>
<br>
For testing, I'm using bonnie++. The following are some sample test results
that sum up the problem:<br>
<br>
Test on NFS server directly (not NFS loopback)<br>
-Sequential File Creation: 2976<br>
-Sequential File Deletion: N/A<br>
-Random File Creation: 3077<br>
-Random File Deletion: 9922<br>
<br>
NFS test with sync enabled<br>
-Sequential File Creation: 39<br>
-Sequential File Deletion: 79<br>
-Random File Creation: 39<br>
-Random File Delection: 65<br>
<br>
NFS test with async enabled<br>
-Sequential File Creation: 575<br>
-Sequential File Deletion: 1718<br>
-Random File Creation: 543<br>
-Random File Deletion: 1228<br>
<br>
Based on the local performance of the NFS server, it does not appear the IO
setup is the culprit. My understanding of the sync operation is a commit
happens which means the NFS server doesn't reply back until the change has
actually been committed to stable storage. There is something happening behind
the scenes though which is causing a huge delay before the NFS server replies
back the commit was complete.<br>
<br>
This question is actually work related and I'm planning to put the NFS server
into production, but I'd rather not use async, even with a UPS and dual PSU's
on the server. With the newer nfs-utils, sync is the default option as well so
it seems like sync should perform relatively well.<br>
<br>
Another question is I don't quite understand how the data corruption happens if
a power loss occurs on an NFS server using async. Even with sync, data
transferred over the wire maybe loss if the nfs server gets shut down before
that data is committed. Can anyone go into more detail on how the data
corruption happens?<br>
<br>
Thanks a bunch!<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt'>Thanks,<br>
<br>
Chris Wornell<br>
Network Administrator, Information Technology<br>
Peerless Systems Corporation<br>
</span><a href="http://www.peerless.com/" title="http://www.peerless.com/"><span
style='font-size:10.0pt'>http://www.peerless.com</span></a><br>
<span style='font-size:10.0pt'>office: 310.727.5723<br>
fax: 310.727.5715<br>
</span><a href="mailto:cwornell@peerless.com"
title="mailto:cwornell@peerless.com"><span style='font-size:10.0pt'>mailto:cwornell@peerless.com</span></a>
<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

</div>

</body>

</html>