From 4c7989e7e4c95ccfbdc189abc5bdea9aa9e90b02 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 7 May 2021 16:41:39 +0100 Subject: util.startup: Set more aggressive defaults for GC Testing has demonstrated that the default GC parameters are not sufficient to prevent runaway memory growth when running under Lua 5.2 and Lua 5.3. Setting the GC speed to 500 was tested on Lua versions 5.1->5.4 and did not display unbounded memory growth. --- util/startup.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'util/startup.lua') diff --git a/util/startup.lua b/util/startup.lua index c1f4ec8b..b3857830 100644 --- a/util/startup.lua +++ b/util/startup.lua @@ -12,7 +12,13 @@ local dependencies = require "util.dependencies"; local original_logging_config; -local default_gc_params = { mode = "incremental", threshold = 105, speed = 250 }; +local default_gc_params = { + mode = "incremental"; + -- Incremental mode defaults + threshold = 105, speed = 500; + -- Generational mode defaults + minor_threshold = 20, major_threshold = 50; +}; local short_params = { D = "daemonize", F = "no-daemonize" }; local value_params = { config = true }; -- cgit v1.2.3