Get the latest tech news
Atomic polling intervals for highly concurrent workloads
Polling Intervals for Highly Concurrent Workloads Posted on One of the problems I've run into while developing Balter is figuring out how often you are able to poll atomics without affecting data accuracy. For context, Balter is a distributed load testing framework, and under-the-hood it spawns a bunch of concurrent tasks which run the user's load test scenario, as well as a Scenario Coordinator task which polls the data collected via atomics.
If you aren't familiar with atomics, they are primitive types which provide synchronization across threads at a hardware level, and are a core building block for many concurrent applications. For instance, Rust provides an atomic version of the i32 integer type, AtomicI32, which can be shared across threads and updated in a lock-free manner (avoiding the use of a Mutex). Moving forward, I will be investigating alternative control algorithms for Balter to make it faster, and plan to do a similar deep dive for that work in the near future.
Or read this on Hacker News