Page MenuHomePhabricator

Improve taskmaster behavior on empty queues
ClosedPublic

Authored by epriestley on Feb 15 2015, 6:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 27, 3:00 PM
Unknown Object (File)
Sat, Apr 20, 7:56 PM
Unknown Object (File)
Sat, Apr 20, 7:56 PM
Unknown Object (File)
Sat, Apr 20, 7:51 PM
Unknown Object (File)
Sat, Apr 20, 7:30 PM
Unknown Object (File)
Tue, Apr 16, 1:44 AM
Unknown Object (File)
Fri, Apr 12, 5:29 AM
Unknown Object (File)
Apr 2 2024, 10:20 AM
Subscribers

Details

Reviewers
btrahan
Commits
Restricted Diffusion Commit
rP2cd77b5b5817: Improve taskmaster behavior on empty queues
Summary

Right now, taskmasters on empty queues sleep for 30 seconds. With a default setup (4 taskmasters), this averages out to 7.5 seconds between the time you do anything that queues something and the time that the taskmasters start work on it.

On instances, which currently launch a smaller number of taskmasters, this wait is even longer.

Instead, sleep for the number of seconds that there are taskmasters, with a random offset. This makes the average wait to start a task from an empty queue 1 second, and the average maximum load of an empty queue also one query per second.

On loaded instances this doesn't matter, but this should dramatically improve behavior for less-loaded instances without any real tradeoffs.

Test Plan

Started several taskmasters, saw them jitter out of sync and then use short sleeps to give an empty queue about a 1s delay.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Improve taskmaster behavior on empty queues.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.
This revision is now accepted and ready to land.Feb 16 2015, 7:22 PM
This revision was automatically updated to reflect the committed changes.