-
Notifications
You must be signed in to change notification settings - Fork 0
Description
In this experiment, we are trying to measure the impact that one thread repeatedly allocating garbage (and running GC) would have on the parallelism performance scaling if all the rest of the threads are independent, non-allocating, non-contentious tasks.
To achieve this, my first several (failed) approaches were to try to have some percentage of the work perform allocations if it is running on a particular thread. This turned out to be problematic for several reasons, but the main reason is:
- If one thread takes longer to handle queries, it will get a smaller percentage of queries to run, so it's hard to control what percentage of the work ends up allocating.
To solve this, I rewrote this benchmark to have one thread fully occupied running a task in the background that infinite loops constantly allocating garbage. Then I run all benchmark experiments, making sure to record that there was one fewer threads available for the benchmark than we passed in the parameter to Julia.
This allows us to measure the effect that the garbage collector has on "simple" CPU-bound work.
This experiment lives here:
src/bench/onethread_alloc_garbage.jl
Tracking issue: #1