- Jan 12, 2021
-
-
Florian Schmaus authored
[LAWS] Attempt to steal from all other workers instead of just one Closes #6 See merge request !66
-
Florian Schmaus authored
The LAWS strategy, unlike the WS strategy, previously only attempted to steal from one victim, instead of trying all other workers. This probably caused SimpleActorTest to sporadically timeout, as all workers went to sleep. With this change, LAWS attempts, just like WS, to steal from all other workers. In a next step, we may want to reduce the duplicated code resulting from this. Fixes #6.
-
Florian Schmaus authored
[Runtime] Add missing constexpr See merge request !65
-
Florian Schmaus authored
Suggested-by:
Florian Fischer <florian.fl.fischer@fau.de>
-
- Jan 11, 2021
-
-
Florian Schmaus authored
Worker wakeup strategy enum See merge request !62
-
Florian Schmaus authored
-
Florian Schmaus authored
Initiailze the WORKER_WAKEUP_STRATEGY via the contents of the EMPER_WORKER_WAKEUP_STRATEGY macro. This makes it easier to add additional strategies later on.
-
Florian Schmaus authored
emper/emper/Worker.hpp:10:7: error: Excessive padding in 'class Worker' (123 padding bytes, where 59 is optimal). Optimal fields order: seed, workerId, consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding,-warnings-as-errors]
-
Florian Schmaus authored
[tests] Increase test timeout from 60 seconds to 180 seconds See merge request !64
-
Florian Schmaus authored
We see SimpleActorTest timing out a lot in our CI when LAWS is used, and from the logs it appears likely that this is a valid timeout (versus the test just being stuck). Let us increase the test timeout and see if it helps. Or if it is a "real" timeout.
-
Florian Schmaus authored
[tests] Increase test timeout from 60 seconds to 180 seconds See merge request !63
-
Florian Schmaus authored
We see SimpleActorTest timing out a lot in our CI, and from the logs it appears likely that this is a valid timeout (versus the test just being stuck). Let us increase the test timeout and see if it helps.
-
- Jan 06, 2021
-
-
Florian Schmaus authored
Fix headers when EMPER_LOG_OFF is defined See merge request !59
-
Florian Schmaus authored
make worker wakeup strategy compile time configurable See merge request !61
-
- Jan 05, 2021
-
-
Florian Fischer authored
-
- Jan 04, 2021
-
-
Florian Schmaus authored
[Runtime] notify only one sleeping worker on new work See merge request !60
-
- Dec 19, 2020
-
-
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
-
- Dec 18, 2020
-
-
Florian Fischer authored
-
Florian Schmaus authored
[Runtime] don't allocate threads array twice See merge request !58
-
- Dec 17, 2020
-
-
Florian Schmaus authored
handle UnboundedBlockingMpscQueue spurious wake-ups Closes #4 See merge request !57
-
Florian Schmaus authored
Add meson option for scheduling strategy and according CI jobs See merge request !53
-
Florian Fischer authored
A spurious wake-up can be produced by the new UnblockOnMainActorTest which triggers the assert(!mpscQueue.empty()) in UnboundedBlockingMpscQueue::get. Those spurious wake-ups are possible because the push and wake-up pair in UnboundedBlockingMpscQueue::put are not atomic. The following sequence diagram demonstrates a spurious wake-up: T1 T2 Q . . { } put(e) . { } push 54-57 . {e} . get() {e} . consume e { } . . { } . get() { } . block { } unblock . { } . . { } . wakeup { } . . { } X assert(!queue.Empty()) To deal with spurious wake-ups we recheck the wake-up condition (a non empty queue) and block again if we find it empty. We assume spurious wake-ups are rare because it was difficult to reproduce them even with a dedicated Test (the new UnblockOnMainActorTest) therefore we declare the empty queue branch as unlikely. Fixes #4.
-
Florian Fischer authored
the threads array is initialized using the Runtime::Runtime initializer list and afterwards again in the constructor.
-
Florian Schmaus authored
Co-authored-by:
Florian Fischer <florian.fl.fischer@fau.de>
-
- Dec 14, 2020
-
-
Florian Schmaus authored
Various small changes See merge request i4/manycore/emper!55
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
Fix memory leak: Ensure that the current fiber is recycled in discardAndResume() See merge request i4/manycore/emper!51
-
Florian Schmaus authored
Improve code readability of UnboundedBlockingMpscQueue See merge request i4/manycore/emper!52
-
Florian Schmaus authored
The current Fiber is now always stored in the context, not just on debug builds. This also means that we can remove the currentFiber thread local variable, as using only a thread local storage would yield wrong results in case a blocked context is resumed on another worker thread.
-
Florian Schmaus authored
[build] Switch to C++2a See merge request i4/manycore/emper!47
-
Florian Schmaus authored
Improve debug output, create Worker class See merge request i4/manycore/emper!42
-
- Dec 13, 2020
-
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
There is no need to call load() on std::atomic if the default memory order is used.
-
- Dec 10, 2020
-
-
Florian Schmaus authored
[doc] make doxygen search for input recursively See merge request !50
-
Florian Schmaus authored
-
Florian Fischer authored
If RECURSIVE is set to NO doxygen will only process files in emper/ when set to YES it will see all files reachable from emper/.
-
Florian Schmaus authored
We are unable to switch to C++20 until https://github.com/mesonbuild/meson/issues/8084 is fixed.
-
Florian Schmaus authored
Add emper::getFullVersion() See merge request !49
-