|
Boost Users : |
Subject: Re: [Boost-users] boost asio synchronous vs asynchronous operations performance
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2014-03-31 15:34:56
On 30 Mar 2014 at 15:13, Niall Douglas wrote:
> > 1000 cycles/op -- measured via io_service::do_run_once().
>
> Methinks AFIO could do with some minimum latency benchmarks actually
> ... might as well, I already have build time benchmarks.
I have some results: on a 3.5Ghz quad core CPU with hyperthreading,
latencies are as follows:
1-4 concurrency: constant ~9 microseconds between op issue and
operation beginning, ~7 microseconds between operation end and op
future signals. Total latency for main thread: ~ 16 microseconds.
4-8 concurrency: linear rise with concurrency. I assume this is the
hyperthreading.
8-32 concurrency: fairly constant ~12 microseconds between op issue
and operation beginning, ~9 microseconds between operation end and op
future signals. Total latency for main thread: ~ 21 microseconds.
The latency curve after 8 concurrency is pretty flat, but it's
probably because the tasks are getting executed as fast as you can
dispatch them so basically you don't really see the true scaling to
load.
For reference a thread context switch was measured at 0.2
microseconds, obviously there will be quite a few of those during a
typical AFIO op dispatch.
Niall
-- Currently unemployed and looking for work in Ireland. Work Portfolio: http://careers.stackoverflow.com/nialldouglas/
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net