From 2452e74f843c5d47a7813108720de83b232ef22d Mon Sep 17 00:00:00 2001 From: Konstantin Osipov <kostja@tarantool.org> Date: Mon, 13 Apr 2015 15:47:30 +0300 Subject: [PATCH] box.cfg{}: change slab_alloc_arena default to 1.1 Provide a good memory footprint out of the box. --- src/box/lua/load_cfg.lua | 2 +- test/app/float_value.result | 2 +- test/app/init_script.result | 2 +- test/box/admin.result | 2 +- test/box/cfg.result | 10 +++++----- test/wal_off/oom.result | 12 ++++++------ 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/box/lua/load_cfg.lua b/src/box/lua/load_cfg.lua index 55ee8e14fd..dd93c9a6c2 100644 --- a/src/box/lua/load_cfg.lua +++ b/src/box/lua/load_cfg.lua @@ -31,7 +31,7 @@ local default_cfg = { slab_alloc_arena = 1.0, slab_alloc_minimal = 64, slab_alloc_maximal = 1024 * 1024, - slab_alloc_factor = 2.0, + slab_alloc_factor = 1.1, work_dir = nil, snap_dir = ".", wal_dir = ".", diff --git a/test/app/float_value.result b/test/app/float_value.result index 603693b2eb..f592757013 100644 --- a/test/app/float_value.result +++ b/test/app/float_value.result @@ -1,7 +1,7 @@ box.cfg 1 snapshot_count:6 2 pid_file:box.pid -3 slab_alloc_factor:2 +3 slab_alloc_factor:1.1 4 rows_per_wal:50 5 background:false 6 logger:tarantool.log diff --git a/test/app/init_script.result b/test/app/init_script.result index b1cac69abd..03ef3f3517 100644 --- a/test/app/init_script.result +++ b/test/app/init_script.result @@ -5,7 +5,7 @@ box.cfg 1 snapshot_count:6 2 pid_file:box.pid -3 slab_alloc_factor:2 +3 slab_alloc_factor:1.1 4 slab_alloc_maximal:1048576 5 background:false 6 logger:tarantool.log diff --git a/test/box/admin.result b/test/box/admin.result index 973347aa1b..30217aee9a 100644 --- a/test/box/admin.result +++ b/test/box/admin.result @@ -20,7 +20,7 @@ box.cfg --- - snapshot_count: 6 too_long_threshold: 0.5 - slab_alloc_factor: 2 + slab_alloc_factor: 1.1 slab_alloc_maximal: 1048576 background: false slab_alloc_arena: 0.1 diff --git a/test/box/cfg.result b/test/box/cfg.result index fc615be3ed..bab6b13c6f 100644 --- a/test/box/cfg.result +++ b/test/box/cfg.result @@ -12,7 +12,7 @@ t --- - - 'snapshot_count: 6' - 'too_long_threshold: 0.5' - - 'slab_alloc_factor: 2' + - 'slab_alloc_factor: 1.1' - 'slab_alloc_maximal: 1048576' - 'background: false' - 'slab_alloc_arena: 0.1' @@ -46,7 +46,7 @@ t --- - - 'snapshot_count: 6' - 'too_long_threshold: 0.5' - - 'slab_alloc_factor: 2' + - 'slab_alloc_factor: 1.1' - 'slab_alloc_maximal: 1048576' - 'background: false' - 'slab_alloc_arena: 0.1' @@ -117,7 +117,7 @@ box.cfg{sophia = {threads = "threads"}} box.cfg.slab_alloc_arena, box.cfg.slab_alloc_factor, box.cfg.sophia.threads, box.cfg.sophia.page_size --- - 1 -- 2 +- 1.1 - 5 - 131072 ... @@ -132,7 +132,7 @@ box.cfg.slab_alloc_arena, box.cfg.slab_alloc_factor, box.cfg.sophia.threads, box box.cfg.slab_alloc_arena, box.cfg.slab_alloc_factor, box.cfg.sophia.threads, box.cfg.sophia.page_size --- - 0.2 -- 2 +- 1.1 - 5 - 131072 ... @@ -147,7 +147,7 @@ box.cfg.slab_alloc_arena, box.cfg.slab_alloc_factor, box.cfg.sophia.threads, box box.cfg.slab_alloc_arena, box.cfg.slab_alloc_factor, box.cfg.sophia.threads, box.cfg.sophia.page_size --- - 0.2 -- 2 +- 1.1 - 10 - 131072 ... diff --git a/test/wal_off/oom.result b/test/wal_off/oom.result index d029f02252..4619a92beb 100644 --- a/test/wal_off/oom.result +++ b/test/wal_off/oom.result @@ -15,11 +15,11 @@ while true do i = i + 1 end; --- -- error: Failed to allocate 22911 bytes in slab allocator for tuple +- error: Failed to allocate 24643 bytes in slab allocator for tuple ... space:len(); --- -- 5722 +- 6155 ... i = 1; --- @@ -29,11 +29,11 @@ while true do i = i + 1 end; --- -- error: Failed to allocate 4203 bytes in slab allocator for tuple +- error: Failed to allocate 5187 bytes in slab allocator for tuple ... space:len(); --- -- 6767 +- 7446 ... i = 1; --- @@ -43,12 +43,12 @@ while true do i = i + 1 end; --- -- error: Failed to allocate 1043 bytes in slab allocator for tuple +- error: Failed to allocate 2751 bytes in slab allocator for tuple ... --# setopt delimiter '' space:len() --- -- 7022 +- 8128 ... space.index['primary']:get{0} --- -- GitLab