Page MenuHomePhabricator

Merge GC daemon into Trigger daemon
ClosedPublic

Authored by epriestley on Feb 24 2015, 2:41 AM.
Tags
None
Referenced Files
F14412990: D11872.id28623.diff
Tue, Dec 24, 1:41 PM
F14412457: D11872.diff
Tue, Dec 24, 1:05 PM
Unknown Object (File)
Sat, Dec 21, 10:02 PM
Unknown Object (File)
Sat, Dec 21, 3:21 PM
Unknown Object (File)
Mon, Dec 2, 9:18 AM
Unknown Object (File)
Fri, Nov 29, 12:34 PM
Unknown Object (File)
Fri, Nov 29, 6:20 AM
Unknown Object (File)
Nov 22 2024, 1:17 AM
Subscribers

Details

Summary

Fixes T7352. This reduces the memory footprint for instances by combining these two similar daemons into one daemon which handles the responsibilities of both.

The fit isn't 100% perfect here but it's pretty close, and the GC daemon is fairly trivial.

Test Plan
  • Adjusted all the numbers to small numbers (5 second sleep, 120 second GC length).
  • Added a ton of logging.
  • Started trigger daemon.
    • Saw it run a GC cycle.
    • Saw it reschedule another cycle after 120 seconds (adjusted down from 4 hours).
  • Reverted all the logging/small numbers.
  • Ran bin/phd start, saw stable trigger daemon running.
  • Grepped for removed daemon class name.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Merge GC daemon into Trigger daemon.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.

What's the rough footprint reduction?

This revision is now accepted and ready to land.Feb 24 2015, 5:00 PM

The base weight of a PHP process is about 25MB, which is most of the footprint here. Before any of these changes, the minimum footprint per instance was:

  • 1 Garbage
  • 1 Trigger
  • 1 PullLocal
  • 2 TaskMaster
  • 5 Overseer

So a total of 10 processes, or a minimum of 250MB per instance. I was able to save:

  • 4 Overseers (by using one overseer for all daemons)
  • 1 Taskmaster (by autoscaling taskmaster pools)
  • 1 Garbage (by merging into Trigger, here).

So the minimum is now 4 processes (Trigger, PullLocal, Task, Overseer) or about 100MB. This change, specifically, took us from about 125MB to about 100MB. Overall, I increased the number of instances we can put in the same amount of memory by 2.5X.

The repo hosts (where daemons live) are currently m3.large instances with 7.5GB of RAM, of which the daemon will have access to maybe 6GB. So we can put about 50-ish mostly-idle instances on a box now instead of 20-ish.

Presumably we won't have very many instances with only 1-2 users who never log in or do anything, so this isn't really that big of a deal, but it gives us a lot more headroom.

I'm going to rub my hands together and re-read that last comment a few times. :D

This revision was automatically updated to reflect the committed changes.