mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
logalloc: report increases of reserves
The log-structured allocator maintains memory reserves to so that operations using log-strucutured allocator memory can have some working memory and can allocate. The reserves start small and are increased if allocation failures are encountered. Before starting an operation, the allocator first frees memory to satisfy the reserves. One problem is that if the reserves are set to a high value and we encounter a stall, then, first, we have no idea what value the reserves are set to, and second, we have no idea what operation caused the reserves to be increased. We fix this problem by promoting the log reports of reserve increases from DEBUG level to INFO level and by attaching a stack trace to those reports. This isn't optimal since the messages are used for debugging, not for informing the user about anything important for the operation of the node, but I see no other way to obtain the information. Ref #13930. Closes scylladb/scylladb#15153
This commit is contained in:
committed by
Tomasz Grabiec
parent
4af585ec0e
commit
ee9cc450d4
@@ -2924,10 +2924,10 @@ void allocating_section::on_alloc_failure(logalloc::region& r) {
|
||||
r.allocator().invalidate_references();
|
||||
if (r.get_tracker().get_impl().segment_pool().allocation_failure_flag()) {
|
||||
_lsa_reserve *= 2;
|
||||
llogger.debug("LSA allocation failure, increasing reserve in section {} to {} segments", fmt::ptr(this), _lsa_reserve);
|
||||
llogger.info("LSA allocation failure, increasing reserve in section {} to {} segments; trace: {}", fmt::ptr(this), _lsa_reserve, current_backtrace());
|
||||
} else {
|
||||
_std_reserve *= 2;
|
||||
llogger.debug("Standard allocator failure, increasing head-room in section {} to {} [B]", fmt::ptr(this), _std_reserve);
|
||||
llogger.info("Standard allocator failure, increasing head-room in section {} to {} [B]; trace: {}", fmt::ptr(this), _std_reserve, current_backtrace());
|
||||
}
|
||||
reserve(r.get_tracker().get_impl());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user