jemalloc/msvc
Dmitry Ilvokhin ad108d50f1 Extend purging algorithm with peak demand tracking
Implementation inspired by idea described in "Beyond malloc efficiency
to fleet efficiency: a hugepage-aware memory allocator" paper [1].

Primary idea is to track maximum number (peak) of active pages in use
with sliding window and then use this number to decide how many dirty
pages we would like to keep.

We are trying to estimate maximum amount of active memory we'll need in
the near future. We do so by projecting future active memory demand
(based on peak active memory usage we observed in the past within
sliding window) and adding slack on top of it (an overhead is reasonable
to have in exchange of higher hugepages coverage). When peak demand
tracking is off, projection of future active memory is active memory we
are having right now.

Estimation is essentially the same as `nactive_max * (1 + dirty_mult)`.

Peak demand purging algorithm controlled by two config options. Option
`hpa_peak_demand_window_ms` controls duration of sliding window we track
maximum active memory usage in and option `hpa_dirty_mult` controls
amount of slack we are allowed to have as a percent from maximum active
memory usage. By default `hpa_peak_demand_window_ms == 0` now and we
have same behaviour (ratio based purging) that we had before this
commit.

[1]: https://storage.googleapis.com/gweb-research2023-media/pubtools/6170.pdf
2025-03-13 10:12:22 -07:00
..
projects Extend purging algorithm with peak demand tracking 2025-03-13 10:12:22 -07:00
test_threads Fix je_ prefix issue in test 2019-09-24 11:24:57 -07:00
jemalloc_vc2015.sln Add MS Visual Studio 2015 support 2016-02-20 10:55:23 -08:00
jemalloc_vc2017.sln Fix MSVC 2015 project and add a VS 2017 solution 2017-10-16 10:26:54 -07:00
jemalloc_vc2019.sln [MSVC] support for Visual Studio 2019 and 2022 2023-02-21 13:39:25 -08:00
jemalloc_vc2022.sln [MSVC] support for Visual Studio 2019 and 2022 2023-02-21 13:39:25 -08:00