All of lore.kernel.org
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: bert hubert <bert.hubert@netherlabs.nl>
Cc: Andi Kleen <andi@firstfloor.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: all syscalls initially taking 4usec on a P4? Re: nonblocking UDPv4 recvfrom() taking 4usec @ 3GHz?
Date: Tue, 20 Feb 2007 20:11:20 +0300	[thread overview]
Message-ID: <20070220171120.GD24930@2ka.mipt.ru> (raw)
In-Reply-To: <20070220170232.GA4730@outpost.ds9a.nl>

On Tue, Feb 20, 2007 at 06:02:32PM +0100, bert hubert (bert.hubert@netherlabs.nl) wrote:
> On Tue, Feb 20, 2007 at 07:41:25PM +0300, Evgeniy Polyakov wrote:
> 
> > It can be recvfrom only problem - syscall overhead on my p4 (core duo,
> > debian testing) is bout 300 usec - to test I ran read('dev/zero', &data,
> > 0) in a loop.
> 
> nsec I assume?

Yes, sure - mistyped - it is about 300 nanoseconds (280-290 or so).

> The usec numbers for read(fd, &c, 0) where fd is /dev/zero:
> 1.557667, 0.627667, 0.447333, 0.440000, 0.440000, 0.440000, 0.442333,
> 0.440000, 0.440000, 0.442333, 0.442333, 0.440000, 0.440000, 0.442333,
> 0.442667, 0.440000, 0.440000, 0.440000, 0.442333, 0.442667,
> 
> In usecs. Notice the same declining figure, but not as pronounced. With a
> sleep(1) in between, we get:
> 1.692667, 1.800000, 0.782667, 1.282667, 0.665000, 0.980000, 0.925000,
> 0.887667, 0.662667, 0.862667, 1.077333, 1.442333, 0.660000, 1.890000,
> 0.672333, 0.795000, 0.647667, 0.692333, 0.750000, 0.865000,
> 
> This doesn't look all that unhealthy.
> 
> > Could you try to hack recvfrom() for your socket to always copy some
> > empty buffer and check the results without waiting for packet?
> 
> That might be out of my reach before tomorrow :-)

I would try it today - but it is a bit late in Moscow already - and
there are some things to complete yet. So, tomorrow I will create a patch
and run it, but I seriously doubt that there is _that_ high per-recvfrom 
latency.

> > If you are not hurry I can test it myself tomorrow.
> 
> Thanks. My major problem is that in my measurements, I quite often see the
> 'worst case' 4usec result. It would not be a problem if it happens only
> once, of course.

Depending on how frequent is 'quite often' - if it ever changes the
distribution picture, then there is some problem.

> 	Bert

-- 
	Evgeniy Polyakov

  reply	other threads:[~2007-02-20 17:11 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-19 23:14 nonblocking UDPv4 recvfrom() taking 4usec @ 3GHz? bert hubert
2007-02-19 23:56 ` Stephen Hemminger
2007-02-20  8:04   ` bert hubert
2007-02-20 10:50 ` Andi Kleen
2007-02-20 16:27   ` all syscalls initially taking 4usec on a P4? " bert hubert
2007-02-20 16:41     ` Evgeniy Polyakov
2007-02-20 17:02       ` bert hubert
2007-02-20 17:11         ` Evgeniy Polyakov [this message]
2007-02-20 17:18           ` Evgeniy Polyakov
2007-02-21 11:06           ` Evgeniy Polyakov
2007-02-21 11:34             ` Andi Kleen
2007-02-20 18:42       ` Josef Sipek
2007-02-20 18:48         ` Evgeniy Polyakov
2007-02-20 19:33           ` bert hubert
2007-02-20 19:40             ` Benjamin LaHaise
2007-02-20 20:45               ` bert hubert
2007-02-20 21:02                 ` Stephen Hemminger
2007-02-20 22:02             ` Rick Jones
2007-02-20 22:17               ` bert hubert
2007-02-20 22:22                 ` Arjan van de Ven
2007-02-20 22:22                   ` Arjan van de Ven
2007-02-21 16:25                   ` Chuck Ebbert
2007-02-20 22:46                 ` Ian McDonald
2007-02-25 10:41       ` Pavel Machek
2007-02-25 17:06         ` Evgeniy Polyakov
2007-02-20 16:57     ` Eric Dumazet

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=20070220171120.GD24930@2ka.mipt.ru \
    --to=johnpol@2ka.mipt.ru \
    --cc=andi@firstfloor.org \
    --cc=bert.hubert@netherlabs.nl \
    --cc=linux-kernel@vger.kernel.org \
    --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 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.