Homec4science

Implement memory reserves in autoscale pools

Authored by epriestley <git@epriestley.com> on Feb 23 2015, 19:28.

Description

Implement memory reserves in autoscale pools

Summary:
Ref T7352. If an autoscale pool specifies a memory reserve, don't scale the pool up unless the machine has at least that proportion of its RAM free.

This is off by default because it doesn't impact most users and we may not be able to get memory information on some systems (e.g., FreeBSD).

Test Plan:
Changed "HighIntensity" daemon to:

  • Always remain busy.
  • Use 512MB of RAM for no reason.

Changed phd debug --autoscale to:

  • Specify a reserve of 0.15.
  • Specify a pool size of 1024.

Then, observed:

  • Pool expanded up to 6 daemons, bringing reserve down from 30% of system RAM to 13%.
  • Pool stopped expanding at this point and remained at a fixed size.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7352

Differential Revision: https://secure.phabricator.com/D11864

Details

Committed
epriestley <git@epriestley.com>Feb 24 2015, 23:49
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU4f2da5719488: Support daemon autoscaling in libphutil
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHUe6cc2aaa36f7: Implement memory reserves in autoscale pools (authored by epriestley <git@epriestley.com>).Feb 24 2015, 23:49