Skip to content
Snippets Groups Projects
  1. Jan 11, 2021
  2. Jan 06, 2021
  3. Jan 05, 2021
  4. Jan 04, 2021
  5. Dec 19, 2020
    • Florian Fischer's avatar
      [Runtime] notify only one sleeping worker on new work · c2686509
      Florian Fischer authored
      This prevents a trampling herd effect on the AnywhereQueue and the workerSleep mutex.
      
      On workloads where not all workers are busy it greatly reduces used
      CPU time because not all workers wake up just to sleep again.
      
      For hight intensity workloads when al workers are busy handling there own work
      this change should not have any impact because then sleeping workers are rare.
      
      This claim is backed by the experiments I did on faui49big02 (40 cores / 80 hw threads).
      I measured the time and resources used by our tests/Echoserver handling
      incremental amount of connections (one connection per client process,
      each connection issued 100000 echos)
      
                 con    100k echos time[ns]    user-time[s]    sys-time[s]     cpu-used
      notify_all   1            49008685297          217.86         626.26        1650%
      notify_one   1            31304750273            9.40           8.33          53%
      
      notify_all  10            76487793595          665.45        1295.19        2484%
      notify_one  10            35674140605          188.77          68.26         656%
      
      ...
      
      notify_all  40           102469333659         4255.30         363.86        4399%
      notify_one  40           105289161995         4167.43         322.69        4169%
      
      notify_all  80            76883202092         3418.44         409.64        4762%
      notify_one  80            68856748614         2878.56         397.66        4548%
      
      Although I would not absolutely trust the numbers because there are from only one
      run and quit a bit of randomness is inherent to emper because of the work stealing scheduling.
      Nonetheless they show three interesting points:
      1. CPU usage for low intensity workloads is drastically reduced.
      2. Impact of notify_one get smaller the more intense the workload gets.
      3. Somehow emper performs significantly worse for 40 than for 80 connections
      
      Command used to generate results:
      for i in 1 10 20 30 40 80; do /usr/bin/time -v build-release/tests/EchoServer 2>> notify_all.txt & sleep 2; tests/echo_client.py -p ${i} -c 1 -i 100000 >> notify_all.txt && echo "quit" | nc localhost 12345; done
      
      Full results can be found here:
      notify_all: https://termbin.com/6zba
      notify_one: https://termbin.com/3bsi
      c2686509
  6. Dec 18, 2020
  7. Dec 17, 2020
  8. Dec 14, 2020
  9. Dec 13, 2020
  10. Dec 10, 2020
  11. Dec 09, 2020
    • Florian Schmaus's avatar
      Add emper::getFullVersion() · 5b194979
      Florian Schmaus authored
      This also solves a dependency declaration issue in WorkerSleepExample:
      Prior to this change, a clean build could potentially result in
      
      ninja  -C build
      ninja: Entering directory `build'
      [13/57] Compiling C++ object apps/worker_sleep_example.p/WorkerSleepExample.cpp.o
      FAILED: apps/worker_sleep_example.p/WorkerSleepExample.cpp.o
      ccache c++ -Iapps/worker_sleep_example.p -Iapps -I../apps -Iemper -I../emper -Iemper/include -I../emper/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Wpedantic -Werror -std=c++17 -O2 -g -Wno-non-virtual-dtor -MD -MQ apps/worker_sleep_example.p/WorkerSleepExample.cpp.o -MF apps/worker_sleep_example.p/WorkerSleepExample.cpp.o.d -o apps/worker_sleep_example.p/WorkerSleepExample.cpp.o -c ../apps/WorkerSleepExample.cpp
      ../apps/WorkerSleepExample.cpp:12:10: fatal error: emper-version.h: No such file or directory
         12 | #include "emper-version.h"        // for EMPER_FULL_VERSION
            |          ^~~~~~~~~~~~~~~~~
      compilation terminated.
      [17/57] Generating emper-version.h with a custom command
      ninja: build stopped: subcommand failed.
      make: *** [Makefile:23: build] Error 1
      
      because worker_sleep_example_exec should have also depend on
      emper_version_h. However this is obviously error prone, as users
      easily forget to add this dependency. Instead we add
      emper::getFullVersion() which is part of the EMPER shared object (not
      just of a single header).
      5b194979
    • Florian Schmaus's avatar
      Merge branch 'locked-unbounded-queue' into 'master' · a46310e4
      Florian Schmaus authored
      Use lib::adt::LockedUnboundedQueue in Scheduler
      
      See merge request i4/manycore/emper!45
      a46310e4
    • Florian Schmaus's avatar
      Merge branch 'cache-get-workerid' into 'master' · 80ecc1e3
      Florian Schmaus authored
      Re-use Runtime::getWorkerId() when possible
      
      See merge request i4/manycore/emper!44
      80ecc1e3
    • Florian Schmaus's avatar
      Merge branch 'start_actor_from_anywhere' into 'master' · fc1d42ef
      Florian Schmaus authored
      Allow an actor to be startet from anywhere
      
      See merge request i4/manycore/emper!43
      fc1d42ef
    • Florian Schmaus's avatar
      Use lib::adt::LockedUnboundedQueue in Scheduler · 02fc38d4
      Florian Schmaus authored
      This class was previously unused, but can be used in Scheduler after
      minor modifcations.
      02fc38d4
    • Florian Fischer's avatar
Loading