WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] huge tcp performance-regression on pvops - kernel (+Solu

To: Ronny.Hegewald@xxxxxxxxx, ian.campbell@xxxxxxxxxx
Subject: Re: [Xen-devel] huge tcp performance-regression on pvops - kernel (+Solution)
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Tue, 27 Oct 2009 10:54:07 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 27 Oct 2009 08:10:57 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <733454931.1283414.1256600244808.JavaMail.tomcat55@xxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <733454931.1283414.1256600244808.JavaMail.tomcat55@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.19 (2009-01-05)
On Tue, Oct 27, 2009 at 12:37:25AM +0100, Ronny.Hegewald@xxxxxxxxx wrote:
> < xmlns="http://www.w3.org/1999/x"; xml:lang="en" 
> lang="en"><title></title><head><meta http-equiv="Content-type" 
> content="text/; charset=UTF-8" /><style type="text/css"> , body {overflow-x: 
> visible; }  { width:100%; height:100%;margin:0px; padding:0px; overflow-y: 
> auto; overflow-x: auto; }body { font-size: 100.01%; font-family : Verdana, 
> Geneva, Arial, Helvetica, sans-serif; background-color:transparent; 
> overflow:show; background-image:none; margin:0px; padding:5px; }p { 
> margin:0px; padding:0px; } body { font-size: 12px; font-family : Verdana, 
> Geneva, Arial, Helvetica, sans-serif; } p { margin: 0; padding: 0; } 
> blockquote { padding-left: 5px; margin-left: 5px; margin-bottom: 0px; 
> margin-top: 0px; } blockquote.quote { border-left: 1px solid #CCC; 
> padding-left: 5px; margin-left: 5px; } .misspelled { background: transparent 
> url(//webmailerng.1und1.de/static_resource/mailclient/widgets/basic/parts/maileditor/spellchecking_underline.gif)
>  repeat-x scroll center bottom; } .correct {} .unknown {} .ignored 
> {}</style></head><body id="bodyElement" style="">
> <p>Setup: pvops dom0 kernel 2.6.31.4 from Jeremys git-repository from 
> 2009-10-18<span></span></p><p id="__paragraph__1256597098000" style=""><span 
> style=""><br></span></p>Problem: Very slow network-performance (3-10 kbs) 
> when tcp-packets are used (noticed when using scp, samba, nfs over tcp)<p 
> id="__paragraph__1256597073000" style=""><br></p><p 
> id="__paragraph__1256597073000" style="">But this occurs only in the 
> following situations:<br></p><p id="__paragraph__1256597073000" 
> style="">&nbsp;&nbsp;&nbsp; <span></span></p><p 
> id="__paragraph__1256597073000" style="">1.) domU to domU on same PC (domUs 
> are paravirtualized linux-kernels)<br></p><p id="__paragraph__1256597073000" 
> style="">2.)  domU to another PC that doesn't use<span id="misspelled-have" 
> class="misspelled" name="misspelled-have"></span> pvops-kernel (packets sent 
> from another PC to domU works fine)<br></p><br>domU to dom0 and the opposite 
> way works without performance-regression.<br><br><p>Reason: bigger 
> tcp-packets get dropped from the domU the tcp-packets are sent from (netstat 
> -s in domU shows many retransmitted tcp-segments)</p><p><br></p><p>tcpdump 
> shows that the bigger packets leave the vif from the domU they were sent 
> from, but never arrive the vif from the domU they are sent 
> to.<br><span></span></p><br><span style=""></span><p>This is caused by this 
> lines in drivers/xen/netback.c at line 1325 :<span></span></p><p 
> id="__paragraph__1256597423000" style=""><br><span style=""></span></p><p 
> id="__paragraph__1256597423000" 
> style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
>  if&nbsp;(skb-&gt;data_len&nbsp;&lt;&nbsp;skb_shinfo(skb)-&gt;gso_size)&nbsp;{
> </p><div 
> class="pre">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
>  skb_shinfo(skb)-&gt;gso_size&nbsp;=&nbsp;0;</div>
> <div 
> class="pre">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
>  skb_shinfo(skb)-&gt;gso_type&nbsp;=&nbsp;0;</div>
> <div 
> class="pre">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
>  }</div><br><p id="__paragraph__1256597121000" style="">These lines were 
> reverted from the linux-2.6.18-xen mercurial repository <br></p><p 
> id="__paragraph__1256597121000" style=""><br></p><p 
> id="__paragraph__1256597121000" style="">on 2009-01-13 in changeset 774:
>   <a 
> href="http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/107e10e0e07c";>107e10e0e07c:
>  netfront/back: do not mark packets of length &lt; MSS as GSO</a></p><p 
> id="__paragraph__1256598462000" style=""><br><span style=""></span></p><p 
> id="__paragraph__1256598462000" style=""><span style="">I used the patch on 
> the above mentioned pvops tree and the problem was 
> gone.</span><span></span></p><p id="__paragraph__1256600217000" 
> style=""><br><span style=""></span></p><p id="__paragraph__1256600217000" 
> style=""><span style="">I never noticed such problems on the 2.6.18-xen 
> kernel or the forward-ported xen-kernel 2.6.31.4 (from </span>Andrew 
> Lyon)</p></body></>
> 

Kudos for discovering this. Did you verify whether the domU has the 
corresponding
patch:

diff -r 28acedb66302 -r 107e10e0e07c drivers/xen/netfront/netfront.c
--- a/drivers/xen/netfront/netfront.c   Wed Jan 07 12:21:54 2009 +0900
+++ b/drivers/xen/netfront/netfront.c   Tue Jan 13 15:17:54 2009 +0000
@@ -1439,6 +1439,14 @@
                np->stats.rx_packets++;
                np->stats.rx_bytes += skb->len;

+#if HAVE_TSO
+               if (skb->data_len < skb_shinfo(skb)->gso_size) {
+                       skb_shinfo(skb)->gso_size = 0;
+#if HAVE_GSO
+                       skb_shinfo(skb)->gso_type = 0;
+#endif
+               }
+#endif
                __skb_queue_tail(&rxq, skb);

                np->rx.rsp_cons = ++i;


Looking at the PV_OPs kernel it doesn't look to be there, but I was 
wondering if the domU you are using has it?


Ian,

Would it make sense to remove this changeset if most of the DomU's
don't have this fix?

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel