From 87ac247cae831dd45cfdc27a0618d8f72effdd13 Mon Sep 17 00:00:00 2001 From: Joe Rafaniello Date: Thu, 30 Nov 2017 11:51:10 -0500 Subject: [PATCH] Save unique_set_size when saving process info Why? USS is a more reliable mechanism for tracking workers with runaway memory growth. PSS is great, until the server process that forks new processes grows large. As each new worker is forked, it inherits a share of the large amount of the parent process' memory and therefore starts with a large PSS, possibly exceeding our limits before doing any work. USS only measures a process' private memory and is a better indicator when a process is responsible for allocating too much memory without freeing it. --- app/models/miq_worker.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/miq_worker.rb b/app/models/miq_worker.rb index e0ccb641d6e5..77b5982c67bf 100644 --- a/app/models/miq_worker.rb +++ b/app/models/miq_worker.rb @@ -32,7 +32,7 @@ class MiqWorker < ApplicationRecord STATUSES_STOPPED = [STATUS_STOPPED, STATUS_KILLED, STATUS_ABORTED] STATUSES_CURRENT_OR_STARTING = STATUSES_CURRENT + STATUSES_STARTING STATUSES_ALIVE = STATUSES_CURRENT_OR_STARTING + [STATUS_STOPPING] - PROCESS_INFO_FIELDS = %i(priority memory_usage percent_memory percent_cpu memory_size cpu_time proportional_set_size) + PROCESS_INFO_FIELDS = %i(priority memory_usage percent_memory percent_cpu memory_size cpu_time proportional_set_size unique_set_size) PROCESS_TITLE_PREFIX = "MIQ:".freeze