From 8eae5ae14b85ada465578006d5d49efa0ab9eea1 Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Fri, 24 Nov 2023 15:07:43 +0100 Subject: [PATCH] Allow running slightly more parallel analysis compile jobs On build machines with little memory, such as the ARM VMs we have been allocated, compiling with the previous formula takes much too long (5 hours just for O2Physics). On those machines, reserving 4 GiB for the system is overkill and cuts down the number of build slots unnecessarily. Reducing this to 2 GiB allows us to squeeze in one more build slot, bringing the total to 3 instead of 2. The peak memory use per analysis build process looks accurate at around 4 GiB. In theory, this change should reduce the time taken for analysis compilation on those machines by 1/3. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3867c70c077..1fc8f1d5088 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) set_property(GLOBAL PROPERTY REPORT_UNDEFINED_PROPERTIES) cmake_host_system_information(RESULT _totalmem QUERY TOTAL_PHYSICAL_MEMORY) -math(EXPR _total_analysis_jobs "(${_totalmem}-4096)/4096") +math(EXPR _total_analysis_jobs "(${_totalmem}-2048)/4096") if(_total_analysis_jobs LESS_EQUAL 0) set(_total_analysis_jobs 1) endif()