Homec4science

Reverse meaning of task priority column

Authored by epriestley <git@epriestley.com> on Nov 24 2014, 20:10.

Description

Reverse meaning of task priority column

Summary:
Ref T6615. Mixing ASC and DESC ordering on a multipart key makes it dramatically less effective (or perhaps totally ineffective).

Reverse the meaning of the priority column so it goes in the same direction as the id column (both ascending, lower values execute sooner).

Test Plan:

  • Queued 1.2M tasks with bin/worker flood.
  • Processed ~1 task/second with bin/phd debug taskmaster before patch.
  • Applied patch, took ~5 seconds for ~1.2M rows.
  • Processed ~100-200 tasks/second with bin/phd debug taskmaster after patch.
  • "Next in Queue" query on daemon page dropped from 1.5s to <1ms.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: aklapper, 20after4, epriestley

Maniphest Tasks: T6615

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

Details

Committed
epriestley <git@epriestley.com>Nov 24 2014, 20:10
Pushed
aubortJan 31 2017, 17:16
Parents
rPH7e1c31218395: Add `bin/worker flood`, for flooding the task queue with work
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHb5f7e9eec60a: Reverse meaning of task priority column (authored by epriestley <git@epriestley.com>).Nov 24 2014, 20:10