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

Save unique_set_size when saving process info #16569

Merged
merged 1 commit into from
Dec 1, 2017

Conversation

jrafanie
Copy link
Member

@jrafanie jrafanie commented Nov 30, 2017

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.

Depends on:

@jrafanie
Copy link
Member Author

@miq-bot add_label gaprindashvili/yes

@jrafanie
Copy link
Member Author

@miq-bot add_label enhancement

@jrafanie
Copy link
Member Author

@gtanzillo @Fryguy I tested this PR along with it's two dependent PRs in schema and gems pending.

This only stores USS in the database. It does NOT log it, show it in rake evm:status or change the worker monitor code to use USS for the threshold checking. Those will be done next.

@miq-bot miq-bot added the wip label Nov 30, 2017
@Fryguy Fryguy closed this Nov 30, 2017
@Fryguy Fryguy reopened this Nov 30, 2017
@Fryguy
Copy link
Member

Fryguy commented Nov 30, 2017

Merged both dependent PRs.

@jrafanie jrafanie changed the title [WIP] Save unique_set_size when saving process info Save unique_set_size when saving process info Nov 30, 2017
@jrafanie jrafanie removed the wip label Nov 30, 2017
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.
@jrafanie jrafanie force-pushed the add_uss_to_servers_workers branch from 87ac247 to a60fbdd Compare November 30, 2017 21:03
@miq-bot
Copy link
Member

miq-bot commented Nov 30, 2017

Checked commit jrafanie@a60fbdd with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 1 offense detected

app/models/miq_worker.rb

@jrafanie
Copy link
Member Author

@Fryguy This is finally 💚 🎉

@chessbyte chessbyte assigned gtanzillo and chessbyte and unassigned gtanzillo Dec 1, 2017
@chessbyte chessbyte merged commit d50a4d9 into ManageIQ:master Dec 1, 2017
@chessbyte chessbyte added this to the Sprint 75 Ending Dec 11, 2017 milestone Dec 1, 2017
@jrafanie jrafanie deleted the add_uss_to_servers_workers branch December 1, 2017 18:59
simaishi pushed a commit that referenced this pull request Dec 1, 2017
Save unique_set_size when saving process info
(cherry picked from commit d50a4d9)
@simaishi
Copy link
Contributor

simaishi commented Dec 1, 2017

Gaprindashvili backport details:

$ git log -1
commit f37cf886dd953f6a2f5e73d9b9a4258a3f00e384
Author: Oleg Barenboim <chessbyte@gmail.com>
Date:   Fri Dec 1 13:41:04 2017 -0500

    Merge pull request #16569 from jrafanie/add_uss_to_servers_workers
    
    Save unique_set_size when saving process info
    (cherry picked from commit d50a4d9d22b48dbb888f586d549f4ad7b566c456)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants