9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] arm & httpd
Date: Mon, 18 Nov 2013 09:15:33 -0500	[thread overview]
Message-ID: <ba73be54299cff99d858759a7dd8b284@brasstown.quanstro.net> (raw)
In-Reply-To: <5aaee493e2190f3660f54100f1f99db8@hamnavoe.com>

On Mon Nov 18 06:46:22 EST 2013, 9fans@hamnavoe.com wrote:
> > this is because wakeup() takes about 100-1000x as long as sleep(0)
>
> [Citation needed]

since rendezvous has to do a bunch of locks and a context switch,
whereas sleep(0) doesn't really have to do anything other than
check anyhigher(), i thought this wouldn't need proof.

here are some numbers. it turns out my lazy guess was too high,
but the thing to remember is the time wasting and sleep(0) tricks
work because rendezvous is quite slow.

(the test results for semaphore locks vs tas locks were posted to
the list, iirc, and tas locks generally come out on top.  semaphores
get worse as the number of processors increase.)

the rendezvous numbers should be /4 so we have
	time per million
	rendezvous		sleep0
kw	17.71			2.78		6.3
32c intel	1.01			0.14		7.2
4c amd	.785			0.15		5.2

raw data

# arm kirkwood; 1 processor
kw; time 5.rpingpong; time 5.sleep0
4.86u 65.97s 70.84r 	 5.rpingpong
0.61u 2.17s 2.78r 	 5.sleep0

sooner; aux/cpuid -i
       Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
sooner; wc -l /dev/sysstat
     32 /dev/sysstat
sooner; time 6.rpingpong; time 6.sleep0
0.56u 1.27s 4.04r 	 6.rpingpong
0.05u 0.08s 0.14r 	 6.sleep0
; aux/cpuid -i
AMD Phenom(tm) II X4 965 Processor
; wc -l /dev/sysstat
      4 /dev/sysstat
; time 6.rpingpong;time 6.sleep0
0.25u 1.29s 3.14r 	 6.rpingpong
0.06u 0.08s 0.15r 	 6.sleep0

- erik



  reply	other threads:[~2013-11-18 14:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-17 21:54 Jeff Sickel
2013-11-17 22:04 ` Steve Simon
2013-11-17 22:33   ` Jeff Sickel
2013-11-17 23:40 ` erik quanstrom
2013-11-18 10:12   ` Richard Miller
2013-11-18 14:15     ` erik quanstrom [this message]
2014-11-09 15:34 [9fans] arm httpd Jeff Sickel
2014-11-09 19:42 ` erik quanstrom
2014-11-09 19:51   ` Jeff Sickel
2014-11-09 20:21     ` erik quanstrom
2014-11-10  1:47       ` Jeff Sickel
2014-11-09 20:28 ` Skip Tavakkolian

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=ba73be54299cff99d858759a7dd8b284@brasstown.quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /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).