From e388b42f32da1cbf7fab0b18a812e91f91fc3781 Mon Sep 17 00:00:00 2001 From: Imaanpreet Kaur Date: Fri, 30 Aug 2024 12:33:42 -0600 Subject: [PATCH] update puma threads tunings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply suggestions from code review looks good. thank you guys! Co-authored-by: Aneta Šteflová Petrová --- guides/common/modules/con_puma-threads.adoc | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/guides/common/modules/con_puma-threads.adoc b/guides/common/modules/con_puma-threads.adoc index 9254e6e7700..fe8e3bf5a2d 100644 --- a/guides/common/modules/con_puma-threads.adoc +++ b/guides/common/modules/con_puma-threads.adoc @@ -1,21 +1,13 @@ [id="Puma_Threads_{context}"] = Puma threads -Number of Puma threads (per Puma worker) is configured by using two values: `threads_min` and `threads_max`. +To configure the number of Puma threads (per Puma worker), use these values: `threads_min` and `threads_max`. Value of `threads_min` determines how many threads each worker spawns at a worker start. Then, as concurrent requests are coming and more threads is needed, worker will be spawning more and more workers up to `threads_max` limit. We recommend setting `threads_min` to same value as `threads_max` as having fewer Puma threads lead to higher memory usage on your {ProjectServer}. -For example, we have compared these two setups by using concurrent registrations test: - -[width="100%",cols="50%,50%",options="header",] -|=== -|{Project} VM with 8 CPUs, 40 GiB RAM |{Project} VM with 8 CPUs, 40 GiB RAM -|`--foreman-foreman-service-puma-threads-min=0` |`--foreman-foreman-service-puma-threads-min=16` -|`--foreman-foreman-service-puma-threads-max=16` |`--foreman-foreman-service-puma-threads-max=16` -|`--foreman-foreman-service-puma-workers=2` |`--foreman-foreman-service-puma-workers=2` -|=== - -Setting the minimum Puma threads to `16` results in about 12% less memory usage as compared to `threads_min=0`. +For example, we have compared these two setups on a virtual machine with 8 CPUs and 40 GiB RAM using concurrent registrations test. +They both used `--foreman-foreman-service-puma-threads-max=16` and `--foreman-foreman-service-puma-workers=2`. +Setting the minimum Puma threads to `16` by using `--foreman-foreman-service-puma-threads-min=16` results in about 12% less memory usage as compared to `0`.