Zannick/logic-graph

Better capacity/eviction policy for the segmented queue

Offen

#97 geöffnet am 13.07.2023

 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Rust (0 Forks)auto 404
help wanted

Repository-Metriken

Stars
 (4 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

With no fixed capacity and after removing the shrink_to_fit calls, we generate reports of the total capacity of each segment, and find that with our current AV2 test, the entire queue keeps a capacity of roughly 2-3x the capacity we asked for.

It may be beneficial to have a per-segment cap, such that we can better control the allocated capacity for each segment, especially since DoublePriorityQueue's underlying store does not support shrink_to_fit on the inner map, only on the lists of indexes. One idea is for the heap to perform a segment eviction if attempting to push or extend past a segment's capacity limit, which we'd set to maybe 1.5-2x the average we'd have with a full queue on all segments.

Contributor Guide