netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: David Miller <davem@davemloft.net>,
	master@sectorb.msk.ru, hawk@diku.dk, harry@atmos.washington.edu,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: Network performance degradation from 2.6.11.12 to 2.6.16.20
Date: Fri, 22 Sep 2006 17:43:40 +0200	[thread overview]
Message-ID: <200609221743.40053.ak@suse.de> (raw)
In-Reply-To: <20060922153517.GB24866@ms2.inr.ac.ru>

On Friday 22 September 2006 17:35, Alexey Kuznetsov wrote:
> Hello!
> 
> > I can't even find a reference to SIOCGSTAMP in the
> > dhcp-2.0pl5 or dhcp3-3.0.3 sources shipped in Ubuntu.
> > 
> > But I will note that tpacket_rcv() expects to always get
> > valid timestamps in the SKB, it does a:
> 
> It is equally unlikely it uses mmapped packet socket (tpacket_rcv).
> 
> I even installed that dhcp on x86_64. And I do not see anything,
> netstamp_needed remains zero when running both server and client.
> It looks like dhcp was defamed without a guilt. :-)
>
> Seems, Andi saw some leakage in netstamp_needed (value of 7),
> but I do not see this too.

That came from named. It opens lots of sockets with SIOCGSTAMP.
No idea what it needs that many for.
 
I suspect  it was either dhcpd (server) or that ppp user space daemon
the original reporter was running.

Maybe it would be a good idea to add a printk by default?

> In any case, the issue is obviously more serious than just behaviour
> of some applications. On my notebook one gettimeofday() takes:
> 
> 	0.2 us with tsc
> 	4.6 us with pm  (AND THIS CRAP IS DEFAULT!!)

This is actually quite fast. I've seen much worse ratios.

Also on some i386 kernels the pmtimer reads the register three 
times to work around some buggy implementation that doesn't latch the counter
properly.

> 	9.4 us with pit (kinda expected)
> 
> It is ridiculous. Obviosuly, nobody (not only tcpdump, but everything
> else) does not need such clock. Taking timestamp takes time comparable
> with processing the whole tcp frame. :-) I have no idea what is possible
> to do without breaking everything, but it is not something to ignore.
> This timer must be shot. :-)

If it's a reasonably new notebook it might be actually possible to change.
The default choices are quite conservative there because in the past
there were lots of problems with notebooks changing frequency behind
the kernel's back etc. and screwing up TSC. But that shouldn't happen anymore.

If you had a 64bit laptop the kernel would likely do the right choice :)

Notebooks are easy because they are only single socket, so the only thing
needed is to keep track of the frequency (or not if you have a Core+) 

-Andi


  reply	other threads:[~2006-09-22 15:44 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4492D5D3.4000303@atmos.washington.edu>
2006-06-17 22:35 ` Network performance degradation from 2.6.11.12 to 2.6.16.20 Andrew Morton
2006-06-17 23:23   ` Harry Edmon
2006-06-17 23:56     ` Andrew Morton
2006-06-18  3:16       ` Stephen Hemminger
2006-06-18 23:23         ` Harry Edmon
2006-06-19 13:54         ` Harry Edmon
2006-06-20  2:11           ` Herbert Xu
2006-06-19 14:47     ` Jesper Dangaard Brouer
2006-06-19 15:24       ` Andi Kleen
2006-06-19 17:34         ` Chris Friesen
2006-06-19 20:39           ` Andi Kleen
2006-06-19 18:24         ` Jesper Dangaard Brouer
2006-06-25 21:51           ` Harry Edmon
2006-06-26  4:20             ` Bill Fink
2006-06-25 22:22         ` Willy Tarreau
2006-06-26  5:23           ` Andi Kleen
2006-07-04 11:41             ` Jesper Dangaard Brouer
2006-07-04 11:54               ` Andi Kleen
2006-07-10 10:55                 ` Jesper Dangaard Brouer
2006-09-16 12:08         ` Vladimir B. Savkin
2006-09-18  8:35           ` Andi Kleen
2006-09-18  9:03             ` Vladimir B. Savkin
2006-09-18  9:58               ` Andi Kleen
2006-09-18 10:29                 ` Vladimir B. Savkin
2006-09-18 11:27                   ` Andi Kleen
2006-09-18 15:38                     ` Alexey Kuznetsov
2006-09-18 15:54                       ` Andi Kleen
2006-09-18 16:28                         ` Alexey Kuznetsov
2006-09-18 16:50                           ` Andi Kleen
2006-09-18 21:03                             ` Alexey Kuznetsov
2006-09-18 21:22                               ` David Miller
2006-09-18 21:46                                 ` Alexey Kuznetsov
2006-09-19  5:55                                 ` Andi Kleen
2006-09-19 20:31                                 ` Thomas Graf
2006-09-19 20:43                                   ` Andi Kleen
2006-09-19  5:52                               ` Andi Kleen
2006-09-18 21:18                             ` Vladimir B. Savkin
2006-09-18 22:00                               ` Alexey Kuznetsov
2006-09-18 21:57                                 ` David Lang
2006-09-19 19:40                                   ` David Miller
2006-09-19 19:44                                     ` Stephen Hemminger
2006-09-18 22:03                                 ` Vladimir B. Savkin
2006-09-19 19:41                                   ` David Miller
2006-09-19 19:47                                 ` David Miller
2006-09-22 15:35                                   ` Alexey Kuznetsov
2006-09-22 15:43                                     ` Andi Kleen [this message]
2006-09-22 16:51                                       ` Rick Jones
2007-03-06 13:25                                         ` Packet timestamps (was: Re: Network performance degradation from 2.6.11.12 to 2.6.16.20) Vladimir B. Savkin
2007-03-06 14:38                                           ` Eric Dumazet
2007-03-06 14:43                                             ` Vladimir B. Savkin
2007-03-06 15:16                                               ` Eric Dumazet
2007-03-06 18:15                                                 ` Vladimir B. Savkin
2006-09-18 21:08                     ` Network performance degradation from 2.6.11.12 to 2.6.16.20 Vladimir B. Savkin
2006-09-18 14:09                 ` David Miller
2006-09-18 14:29                   ` Andi Kleen
2006-09-18 15:19                     ` Alan Cox
2006-09-18 15:19                       ` Andi Kleen
2006-06-19 16:40       ` Harry Edmon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200609221743.40053.ak@suse.de \
    --to=ak@suse.de \
    --cc=davem@davemloft.net \
    --cc=harry@atmos.washington.edu \
    --cc=hawk@diku.dk \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=master@sectorb.msk.ru \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).