Which is not to agree with the claim that latency queues and priorities can't achieve latency goals. Your hard requirements establish a minimum viable capacity, and you fill in the bubbles with softer work. Priorities let you distinguish between hard and soft, and to offer fairness among soft.
Background job queues and priorities may be the wrong path
31–40 of 52 posts
Re: Background job queues and priorities may be the wrong path
#32IMHO, the problem is that it's really hard for people to think in terms of "I want my job that takes 10 CPU seconds to be done in 300 wall clock seconds". In turn, what batch processing frameworks do, is they can estimate these things, and figure out where to place work. You can also do stuff like deny requests if there isn't capacity (because you know all the scheduled work for the next quanta).
Re: Background job queues and priorities may be the wrong path
#33Re: Background job queues and priorities may be the wrong path
#34The article is a bit unclear because it's lacking the proper vocabulary. Priorities and deadlines (what the article calls "SLOs") are both valid ways to approach scheduling problems with different tradeoffs. The fixed priority systems the article talks about trade off optimal "capacity" utilization for understandable failure dynamics in the overcapacity case. When you're over capacity, the messages that don't go thro…
Re: Background job queues and priorities may be the wrong path
#35Re: Background job queues and priorities may be the wrong path
#36Just quickly skimmed this, but it seems the conclusion is wrong: A job needs two attributes to define when it should be started: run_at and max_latency. That means the job worker only needs to order them by run_at + max_latency, and takes the first. It seems both flexible and simple. Just considering two jobs (run_at=10,max_latency=15), (run_at=11,max_latency=13), it's clear that following that approach, the first ta…
Re: Background job queues and priorities may be the wrong path
#37Earlier quoted context omitted.
Yeah, I don't see how deadlines/SLOs does any better when there's insufficient capacity to meet those of queued jobs at their concurrency. > I don’t think it’s possible to meet a latency target through prioritization when there is a fundamental lack of capacity. This seemingly implies that it would be achievable with target deadlines/SLOs. At capacity I don't see a better solution than give each priority (or target l…
Under deadline scheduling, every pending job _eventually_ has highest priority as time elapses. (Assuming new jobs can’t arrive with deadlines in the past.) Every job is eventually serviced. The “pain” experienced in an overload situations is spread among all late jobs. Contrast this with fixed-priority scheduling, where lowest priority jobs will be starved completely, until the overload is resolved.
Re: Background job queues and priorities may be the wrong path
#38But what if I run background jobs to protect resources that can't easily scale wide like DB writes or calls to SAAS services that are API throttled.
Re: Background job queues and priorities may be the wrong path
#39Re: Background job queues and priorities may be the wrong path
#40What is missing from this picture is idleness. For example, suppose I have a SLO 10 sec job A and SLO 5 min job B. If I only get a few Bs sporadically, I may want to define queue X=A only, and queue Y=A,B to use the idle compute to process more As. In the wild, this is a delicate balancing act.
You need either dedicated workers for low latency tasks or some sort of preemption to meet SLOs with such heterogeneous tasks.