FEAT: Fragmentation and long-term stability focused benchmarks
Fragmentation and long-term stability focused benchmarks
Rationale
Our current open source library tests are mostly limited to a small scope feature tests, with some longer tests/benchmark focused on a single scenario/workload. Besides a few complex pmembench scenarios that are based on our container examples, there are no easy to use tools that can facilitate testing of the library behavior over time.
Description
To improve confidence in our algorithms during long running workloads, and to simplify the development process, we need to extend pmembench to include a workload that runs a parameterized probabilistic model of a theoretical application. The model should take at least these two variables into account:
- distribution of allocation sizes
- length of life of allocations
The model must also take transactions into account, since they can allocate a non-trivial amount of memory when used extensively.
The way I imagine an example implementation is to create a few "classes" to simulate various different data structures of an application, with each class having a size (or a range of sizes) and a length of life. In the duration of the benchmarks various objects, from various classes, would be allocated/freed to simulate a living service.
We should also extend pmembench to be able to produce output during a benchmark, so that we can observe how fragmentation/performance changes over time.
Assuming that for given sum of allocation sizes S the memory it occupies is N (for a perfect allocator, N should be equal to S), fragmentation over time could be measured as a deviation from that initial value N if the aforementioned sum is a constant, otherwise the change in value N should be directly proportional to increase in sum S. In a theoretical ideal allocator the change in S should directly track changes in N.
API Changes
n/a
Bibliography
https://parasol.tamu.edu/~rwerger/Courses/689/spring2002/day-3-ParMemAlloc/papers/wilson95dynamic.pdf (Section 2) http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.45.6354&rep=rep1&type=pdf https://www.usenix.org/system/files/conference/fast14/fast14-paper_rumble.pdf https://www.cs.tufts.edu/~nr/cs257/archive/paul-wilson/fragmentation.pdf (section 6)
@Greg091 What's the status of this task?
This improvement is not considered vital at the moment. So, we do not have the resources to fulfil your request. Sorry.