You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently a memtable is always backed by a single arena, sized according to the current MemTableSize. With flushable ingests, Options.FlushDelayDeleteRange and Options.FlushDelayRangeKey we can rotate memtables before using all of the arena's allocated memory. In Cockroach, we set a MemTableStopLimit of 4 to avoid allocating more than 256 MB for memtables. Together, these can produce memtable stalls despite low usage of memtable memory.
When a rotated memtable's arena is sufficiently under-utilized, we could instead use the remainder for the next memtable in addition to a new arena. If we additionally add a byte-limiting variant of MemTableStopLimit we can allow accumulation of more memtables without stalling. I think we would still want to keep MemTableStopLimit to prevent accumulating an excessive count of flushables that must be merged at read time.
There are complications that would need to be worked out, because nodes within the arenaskl skiplist use relative offsets within the arena to serve as pointers. I think we could reserve a bit for denoting which arena a pointer refers to.
This may not be worth doing if memtable stalls are infrequent, even with flushable ingests.
Currently a memtable is always backed by a single arena, sized according to the current MemTableSize. With flushable ingests,
Options.FlushDelayDeleteRange
andOptions.FlushDelayRangeKey
we can rotate memtables before using all of the arena's allocated memory. In Cockroach, we set aMemTableStopLimit
of 4 to avoid allocating more than 256 MB for memtables. Together, these can produce memtable stalls despite low usage of memtable memory.When a rotated memtable's arena is sufficiently under-utilized, we could instead use the remainder for the next memtable in addition to a new arena. If we additionally add a byte-limiting variant of
MemTableStopLimit
we can allow accumulation of more memtables without stalling. I think we would still want to keepMemTableStopLimit
to prevent accumulating an excessive count of flushables that must be merged at read time.There are complications that would need to be worked out, because nodes within the
arenaskl
skiplist use relative offsets within the arena to serve as pointers. I think we could reserve a bit for denoting which arena a pointer refers to.This may not be worth doing if memtable stalls are infrequent, even with flushable ingests.
Relates to #2388 and #2376.
Jira issue: PEBBLE-200
The text was updated successfully, but these errors were encountered: