Skip to content

Commit

Permalink
Save unique_set_size when saving process info
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jrafanie committed Nov 30, 2017
1 parent f06d16c commit 87ac247
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/miq_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 87ac247

Please sign in to comment.