Files
scylladb/utils
Michał Chojnowski d72b91053b logalloc: fix quadratic behaviour of reclaim_from_evictable
As an optimization for optimistic cases, reclaim_from_evictable first evicts
the requested amount of memory before attempting to reclaim segments through
compactions. However, due to an oversight, it does this before every compaction
instead of once before all compactions.

Usually reclaim_from_evictable is called with small targets, or is preemptible,
and in those cases this issue is not visible. However, when the target is bigger
than one segment and the reclaim is not preemptible, which is he case when it's
called from allocating_section, this results in a quadratic explosion of
evictions, which can evict several hundred MiB to reclaim a few MiB.

Fix that by calculating the target of memory eviction only once, instead of
recalculating it after every compaction.

Fixes #8542.

Closes #8611
2021-05-22 20:49:00 +02:00
..
2020-08-03 15:55:16 +03:00
2020-10-13 12:32:14 +03:00
2020-10-13 12:32:14 +03:00
2020-08-04 17:54:45 +03:00
2020-10-18 18:16:30 +03:00
2021-03-08 16:04:20 +01:00