Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use USS (unique set size) instead of PSS for all the things #16570

Merged
merged 3 commits into from
Dec 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/models/miq_server/status_management.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def status_update
def log_status
log_system_status
svr = my_server(true)
_log.info("[#{svr.friendly_name}] Process info: Memory Usage [#{svr.memory_usage}], Memory Size [#{svr.memory_size}], Proportional Set Size: [#{svr.proportional_set_size}], Memory % [#{svr.percent_memory}], CPU Time [#{svr.cpu_time}], CPU % [#{svr.percent_cpu}], Priority [#{svr.os_priority}]") unless svr.nil?
_log.info("[#{svr.friendly_name}] Process info: Memory Usage [#{svr.memory_usage}], Memory Size [#{svr.memory_size}], Proportional Set Size: [#{svr.proportional_set_size}], Unique Set Size: [#{svr.unique_set_size}], Memory % [#{svr.percent_memory}], CPU Time [#{svr.cpu_time}], CPU % [#{svr.percent_cpu}], Priority [#{svr.os_priority}]") unless svr.nil?
end

def log_system_status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def validate_worker(w)

return true unless worker_get_monitor_status(w.pid).nil?

# Proportional set size is only implemented on linux
usage = w.proportional_set_size || w.memory_usage
# Unique set size is only implemented on linux
usage = w.unique_set_size || w.memory_usage
if MiqWorker::STATUSES_CURRENT.include?(w.status) && usage_exceeds_threshold?(usage, memory_threshold)
msg = "#{w.format_full_log_msg} process memory usage [#{usage}] exceeded limit [#{memory_threshold}], requesting worker to exit"
_log.warn(msg)
Expand Down
2 changes: 1 addition & 1 deletion app/models/miq_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ def status_update
end

def log_status(level = :info)
_log.send(level, "[#{friendly_name}] Worker ID [#{id}], PID [#{pid}], GUID [#{guid}], Last Heartbeat [#{last_heartbeat}], Process Info: Memory Usage [#{memory_usage}], Memory Size [#{memory_size}], Proportional Set Size: [#{proportional_set_size}], Memory % [#{percent_memory}], CPU Time [#{cpu_time}], CPU % [#{percent_cpu}], Priority [#{os_priority}]")
_log.send(level, "[#{friendly_name}] Worker ID [#{id}], PID [#{pid}], GUID [#{guid}], Last Heartbeat [#{last_heartbeat}], Process Info: Memory Usage [#{memory_usage}], Memory Size [#{memory_size}], Proportional Set Size: [#{proportional_set_size}], Unique Set Size: [#{unique_set_size}], Memory % [#{percent_memory}], CPU Time [#{cpu_time}], CPU % [#{percent_cpu}], Priority [#{os_priority}]")
end

def current_timeout
Expand Down
4 changes: 2 additions & 2 deletions lib/tasks/evm_application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def self.output_servers_status(servers)
s.drb_uri,
s.started_on && s.started_on.iso8601,
s.last_heartbeat && s.last_heartbeat.iso8601,
(mem = (s.proportional_set_size || s.memory_usage)).nil? ? "" : mem / 1.megabyte,
(mem = (s.unique_set_size || s.memory_usage)).nil? ? "" : mem / 1.megabyte,
s.is_master,
s.active_role_names.join(':'),
]
Expand All @@ -104,7 +104,7 @@ def self.output_workers_status(servers)
w.queue_name || w.uri,
w.started_on && w.started_on.iso8601,
w.last_heartbeat && w.last_heartbeat.iso8601,
(mem = (w.proportional_set_size || w.memory_usage)).nil? ? "" : mem / 1.megabyte]
(mem = (w.unique_set_size || w.memory_usage)).nil? ? "" : mem / 1.megabyte]
end
end

Expand Down