Skip to content

Commit

Permalink
Show issue about memory usage when using large tuples (#2127)
Browse files Browse the repository at this point in the history
  • Loading branch information
yngvar-antonsson authored Aug 2, 2023
1 parent 7020e11 commit 4341b39
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ Fixed
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Fix operation priority in Raft failover.

- Typo in ``cartridge.cfg`` option ``enable_synchro_mode``.

- Show issue about memory usage when using large tuples.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Deprecated
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
4 changes: 4 additions & 0 deletions cartridge/issues.lua
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,13 @@ local function list_on_instance(opts)
local items_used_ratio = slab_info.items_used / (slab_info.items_size + 0.0001)
local arena_used_ratio = slab_info.arena_used / (slab_info.arena_size + 0.0001)
local quota_used_ratio = slab_info.quota_used / (slab_info.quota_size + 0.0001)
local total_used_ratio =
(slab_info.arena_used + slab_info.quota_used - slab_info.arena_size) / (slab_info.quota_size + 0.0001)

if items_used_ratio > vars.limits.fragmentation_threshold_critical
and arena_used_ratio > vars.limits.fragmentation_threshold_critical
and quota_used_ratio > vars.limits.fragmentation_threshold_critical
or total_used_ratio > vars.limits.fragmentation_threshold_critical
or items_used_ratio >= vars.limits.fragmentation_threshold_full
or quota_used_ratio >= vars.limits.fragmentation_threshold_full
then
Expand All @@ -354,6 +357,7 @@ local function list_on_instance(opts)
elseif items_used_ratio > vars.limits.fragmentation_threshold_warning
and arena_used_ratio > vars.limits.fragmentation_threshold_critical
and quota_used_ratio > vars.limits.fragmentation_threshold_critical
or total_used_ratio > vars.limits.fragmentation_threshold_warning
then
table.insert(ret, {
level = 'warning',
Expand Down

0 comments on commit 4341b39

Please sign in to comment.