From 2573cae8a186f84a1c89fabb43e35a917dd315de Mon Sep 17 00:00:00 2001 From: Ole Kristian Morud Date: Mon, 15 Jan 2024 03:50:24 +0100 Subject: [PATCH] Use 70% of available RAM --- entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 4db97d2..bf92496 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -11,10 +11,10 @@ memory_heuristic () { local total_memory=$(free | awk '/Mem:/{print $2}') # Below 8 GB we assume this is running on a dedicated server, so we - # allocate all but 10mb of the RAM. Otherwise allocate 30%. This is not - # based on any profiling or testing + # allocate 75% of the RAM. Otherwise allocate 30%. This is not based on any + # profiling or testing if [[ total_memory -lt 8388608 ]]; then - memory_heuristic_cache=$((total_memory - 10240)) + memory_heuristic_cache=$((total_memory * 75/100)) else memory_heuristic_cache=$((total_memory * 3/10)) fi