Manuscript Offprint
arXiv:2610.24655Tight weighted paging with delay via mirror descent
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
We give an -competitive randomized algorithm for weighted paging with delay. This improves upon the -competitive algorithm of Gupta, Kumar, and Panigrahi (STOC 2020, SICOMP 2022) by removing the dependence on the number n of pages. Without delay, the optimal competitive ratio of randomized algorithms is , and since the lower bound carries over, our bound is tight. Our algorithm is fractional and combines mirror descent, used by Bubeck et al. (STOC 2018) for weighted paging without delay, with preemptive service, introduced by Azar et al. (STOC 2017) for online service with delay: when a request is served, an increase in the mirror descent potential is offset by preemptive service to other pending requests, with a budget derived from the mirror descent path. To obtain a randomized algorithm, we use the online rounding of Bansal, Buchbinder, and Naor (FOCS 2007) from classical paging.
1 Introduction
Paging is one of the most fundamental problems in online computation. In weighted paging, a cache holds up to k of n pages, and a requested page that is not in the cache must be fetched, at a cost equal to its weight, while another page is evicted. Classical paging requires every request to be served immediately. In many applications of caching, however, requests can wait for some time, for example in prefetching, cloud computing, or video-on-demand streaming. An algorithm can then save cost by batching requests to the same page instead of fetching it repeatedly. In paging with deadlines, waiting is free, but every request must be served by its deadline. More generally, in paging with delay, every request accrues delay cost until it is served, and the goal is to minimize the total fetch cost plus delay cost. Paging with delay belongs to an active line of work on online problems with delay, including TCP acknowledgment [DGS01], matching [EKW16], online service with delay [Aza+21], multi-level aggregation [Bie+16; Buc+17], and network design [AT19; AT20].
When all pages have the same weight, delay does not make paging harder, since unweighted paging with delay reduces to classical paging [Aza+21]. For general weights, however, the best known randomized algorithm, due to Gupta, Kumar, and Panigrahi, is -competitive [GKP22], where the number n of pages can be much larger than k. Without delay, the optimal competitive ratio of randomized algorithms is [Fia+91; BBN07], and the lower bound carries over to paging with delay. The factor comes from one step of the LP-based approach of Gupta, Kumar, and Panigrahi. The natural relaxation over fractional cache states has integrality gap , and Gupta, Kumar, and Panigrahi circumvent this with a hitting-set relaxation that records when pages are fetched and evicted, but not the cache contents. This requires a separate step that decides online which pending requests to serve and when, which costs only a constant factor offline, but a factor online. They leave closing the gap to the lower bound as an open problem [GKP22].
We give an -competitive randomized algorithm for weighted paging with delay, in the same clairvoyant model as [GKP22]. This matches the lower bound, does not depend on n, and also applies to deadlines. Hence, weighted paging with delay is as hard as without delay, up to constant factors. For deterministic algorithms, this was already known, with optimal competitive ratio [ST85;
*Technical University Darmstadt. Email: born@mathematik.tu-darmstadt.de. Supported by DFG grant DI 2041/2-2.
Technical University Darmstadt. Email: disser@mathematik.tu-darmstadt.de
Technical University Darmstadt. Email: thelen@mathematik.tu-darmstadt.de. Supported by a doctoral scholarship from the Studienstiftung des deutschen Volkes.
CL91; Aza+21]. We establish the same equivalence for randomized algorithms, where the optimal competitive ratio is .
Our algorithm combines mirror descent, used by Bubeck et al. for classical weighted paging [Bub+18], with preemptive service, a standard tool for online service with delay [Aza+21]. With delay, the potential function in the analysis of mirror descent can increase when we serve a request, because OPT may serve the same request at another time than we do. We compensate for this increase by preemptive service: when serving a request, we also serve other pending requests, with a budget derived from the mirror descent path. To our knowledge, this is the first use of mirror descent for a problem with delay. Since the fractional cache states of our algorithm also determine when requests are served, no separate step has to decide this, and the classical online rounding for weighted paging [BBN07] applies with only a constant loss.
We state our result formally below, and outline our technique in Section 1.2.
Theorem 1. There exists a clairvoyant randomized online algorithm for weighted paging with delay with competitive ratio .
Together with the lower bound of from classical paging [Fia+91], this gives a tight bound on the competitive ratio of randomized weighted paging with delay and deadlines. We obtain this result by combining the mirror descent technique from [Bub+18] for classical paging with a preemptive service approach typical for online service with delay [Aza+21]. The resulting algorithm PMD is explicit (Algorithm 1) and handles delay directly, with three rules: when to serve (once the delay of a page is large compared to the cost of serving it), how to serve (along a mirror descent path in closed form), and what else to serve (pending requests in order of urgency, paid from budgets).
1.2 Technique
Fractional model. Instead of defining a randomized algorithm for paging with delay that makes randomized decisions about which pages to fetch and evict, we design a fractional algorithm. This approach was first introduced by Bansal, Buchbinder, and Naor for weighted paging [BBN07] and later reused by Gupta, Kumar, and Panigrahi for paging with delay [GKP22]. A fractional algorithm maintains, at every time, a fractional state , where the antimass represents the fraction of page that is not cached. Equivalently, is the fractional cached mass the algorithm has on page . Throughout the execution, we maintain that the fractional state satisfies , meaning that the total cached mass is at most . Bansal, Buchbinder, and Naor showed for classical paging that the state of a fractional algorithm can be transformed online into a randomized integral paging algorithm realizing the state as its marginal probabilities, i.e., the probability of page being cached is [BBN07, Theorem 4.1]. In the design of our algorithm, we ensure that a requested page has at some time, so that the resulting randomized algorithm caches almost surely at this time.
Mirror descent in classical paging. Bubeck et al. [Bub+18] demonstrated how a fractional solution for classical paging (without delay) can be defined via a mirror descent path, recovering the tight bound already proven in [BBN07]. Upon a request to an uncached page p, their algorithm redistributes cached mass from other pages to p by following a path x through fractional states defined by the differential inclusion
Here, is the vector with entry 1 at and 0 at all other pages, denotes the set of possible states with , is the normal cone of at , and is a strongly convex function called the mirror map. Intuitively, is defined to reduce the antimass at (via the term ), while being forced into the possible state space (via the term ), and following some distortion defined by . It can be shown that this mirror descent path indeed reduces the antimass at , while increasing the antimass at all other pages. The algorithm by Bubeck et al. follows this path until is cached. Upon each request, a new mirror descent path is followed and the resulting paths are concatenated to give a full execution of the algorithm.
To analyze this algorithm, [Bub+18] use the Bregman divergence
as a potential function. Using the weighted entropy function as the mirror map, an analysis of mirror descent paths with the Bregman potential shows that
Here, is the weighted -norm, , so that, for a given differentiable path of fractional states, is the cost of transitioning through the fractional states along when moving mass into or out of page costs , and is the Lipschitz constant of on the state space . The terms and are called the service cost of the algorithm and the optimum, respectively, and is the movement cost of the optimum. Writing for the negative part of the derivative of , Bubeck et al. moreover show that the negative movement cost of the algorithm is bounded by its service cost, yielding
for each request to some page p.
In classical paging, every algorithm has to serve each requested page immediately. Therefore, when page is requested, it holds that , and hence the optimum's service cost is zero. Note that this is not the case for paging with delay, which we discuss below. The competitive guarantee of then follows immediately from (2). On the full state space , the Lipschitz constant of the weighted entropy turns out to be unbounded. In particular, on a domain , the Lipschitz constant is . To get a better competitive guarantee, [Bub+18] therefore follows the mirror descent path only until for some small threshold , at which point the page is considered served. Finally, they apply a fixed transformation that maps to zero, so that the requested page is truly served when . The competitive ratio then is .
Adapting mirror descent for paging with delay. A natural approach to reusing the analysis of [Bub+18] for paging with delay would be to act as if a page has to be served once it has accumulated large delay compared to the cost required to serve it. In contrast to classical paging, however, when fetching such a page, we cannot assume that OPT has the requested page p cached at the same time that we fetch it. OPT may serve the same request earlier or later than we do. In this case, (2) gives the competitive ratio L only with an additive term per fetch (the optimum's service cost). In the analysis leading to (2), this additive term stems from an increase of the Bregman potential while fetching the page.
This is a fundamental obstruction to reusing the analysis as is: the increase is real, as we move away from OPT's state, but OPT may pay nothing at this time, since it pays for p earlier or later with additional delay. The key ingredient of our analysis therefore is to charge this potential increase to costs that OPT incurs at other times. In particular, we relate the optimum's service cost back to the algorithm's positive movement cost, proving that
where . By itself, this does not yet yield a competitive guarantee but it shows that investing an additional cost of changes the algorithm's cost by a constant factor, thus not deteriorating the competitive guarantee. In particular, if this additional investment is for actions whose cost can be charged to OPT, we can cover the increase of the Bregman potential and remain -competitive.
We achieve this by adding preemptive service: besides the page whose delay triggers a fetch, we also serve other pending requests, as long as an internal budget covers the cost of doing so. Preemptive service is a key component of many existing algorithms for online service with delay [BKS18; Aza+21; Tou23]. Usually, preemptive service is performed for roughly the cost of the triggering service and in order of increasing urgency. A request triggering critical service has either arrived after the last critical service, in which case OPT could not have batched the request with others and therefore paid for it in full, or it was already present at the last preemptive service, in which case it might not cause cost for OPT. In this case, since preemptive service is in order of increasing urgency, all preemptively served requests were more urgent than the current triggering request, and the current triggering request did not fit within the budget to be preemptively served. This certifies that either, the algorithm performed its entire budget worth of preemptive service, or the previous preemptive service did not fully use its budget because the current service is more costly than the previous one. In the first case, the cost can be charged directly to OPT, and in the second case, the cost of one service is charged to that of the next service. This creates a chain of increasingly heavy pages and the competitive ratio then measures the depth of such charging chains.
In our case, most cost is already covered through the Bregman potential, and the quantity to be bounded is instead the excess term . When a page is fetched due to high delay cost, we measure the length of the mirror descent path it follows and declare this amount as a budget for preemptive service to pending requests. This length is at least the excess term and can be bounded as in (3), altering the cost of the algorithm by at most a constant factor. Unlike in the previous work on online service with delay, the excess to be bounded here can be much larger than the cost of the service, and this cannot be easily predicted. Therefore, we allow every service to trigger preemptive services with high cost, irrespective of its own cost. Moreover, every service can deposit budget for high-cost preemptive services, and we keep track of these budgets over the span of the entire execution, instead of per service or per page.
As usual in online service with delay, we perform preemptive service to pending requests in order of increasing urgency. Here, urgency is defined by the time at which the pending delay on a page exceeds the cost of serving it. If this time has already passed, either OPT has served the pending request already, incurring the same fetch cost as we do, or OPT serves it later and pays the same cost in delay. Either way, we can show that OPT's cost covers the cost of our preemptive service. In cases where budget was deposited by a service that increased the Bregman potential, we can show that almost the entire preemptive budget is spent on visits to such urgent requests, so that the increase in the potential is covered by the cost of OPT.
Online rounding. To transform the resulting sequence of fractional states into a feasible one with for every requested page at some point, we apply a fixed map to our fractional states, analogously to the approach in [Bub+18]. To maintain the competitive guarantee, this map may not distort the cost of the resulting state transitions by more than a constant factor. The distortion can be measured by the norm of the transformation map's derivative. To optimize the competitive guarantee, we choose maximal such that we can define a transformation mapping mass to 0 with bounded derivative. The optimal choice turns out to be (see also Section B), giving the mirror map Lipschitz factor and competitive guarantee .
1.3 Related work
Paging with delay can be seen as a special case of the online service with delay (OSD) problem, where k agents serve requests in a metric space, which arrive over time and accrue delay cost while waiting to be served. Weighted paging with delay can be understood as OSD on a star metric, and weighted paging with deadlines is the special case where delay costs remain zero up to the deadline, at which point they start growing rapidly. A ray of the star then corresponds to a page with weight proportional to the ray's length, and the k agents represent the k cache slots.
Online service with delay was introduced by Azar et al. in 2017 [Aza+21] together with a randomized -competitive clairvoyant algorithm for general metric spaces of size , which is based on a deterministic -competitive clairvoyant algorithm for hierarchically separated trees (HSTs) of depth , combined with a randomized embedding of general metrics into HSTs. In particular, since any star metric is an HST of depth 1, this implies a clairvoyant deterministic -competitive algorithm for paging with delay or deadlines. For unweighted stars, Azar et al. give a simple reduction to classical paging, providing an bound for unweighted paging with delay. The authors complement this with a lower bound of for the competitive ratio of deterministic nonclairvoyant weighted paging with deadlines with in the case of . In [Krn+20] and [MTW26], the competitive ratio of both clairvoyant and nonclairvoyant unweighted paging with delay has since been shown to lie in .
For online service with delay on general metrics, the upper bound for the competitive ratio of deterministic clairvoyant algorithms has been reduced to in the case of [Tou23], while no better bounds have been proven for general . In the nonclairvoyant case, a deterministic upper bound of can be achieved [Tou25]. For randomized algorithms, Gupta, Kumar, and Panigrahi [GKP21] gave an improved dependence on through an -competitive algorithm, where is the size of the metric space and is the metric's aspect ratio . In [GKP22], Gupta, Kumar, and Panigrahi present an -competitive randomized clairvoyant algorithm for paging with delay or deadlines through a primal-dual approach. We improve the competitive ratio to for this setting.
We can recover the classical paging problem as a special case of paging with delay by giving all requests immediate deadlines. In particular, this implies that the lower bounds of for deterministic algorithms [ST85] and for randomized algorithms [Fia+91] transfer directly to both clairvoyant and nonclairvoyant paging with delay, leading to a tight analysis of deterministic weighted paging with delay and a gap between the known randomized upper and lower bounds, which we close in this paper.
Our algorithm uses the mirror descent technique, which was initially introduced in the context of convex optimization [NY83] and has recently seen many applications in randomized online decision making [BCN14; Bub+21; BCC25]. Notably, Bubeck et al. [Bub+18] used the continuous-time mirror descent framework to derive an -competitive randomized algorithm for the k-server problem on HSTs. In their paper, they demonstrate how mirror descent can be used to recover the guarantee for randomized online paging already achieved through the primal-dual analysis in [BBN07].
2 Problem definition
An instance of weighted paging with delay is given by a finite sequence of requests where is the requested page, is the request's arrival time, and is its delay cost function. Delay cost functions are nondecreasing, continuous and unbounded, with . We consider the clairvoyant version of the problem where delay functions are revealed upon the arrival of a request.
An algorithm holds a set of up to pages at any given time in its cache, and every algorithm, as well as the optimum, starts with a fixed initial cache of pages. The algorithm may alter its cache instantaneously at any time, and may go through multiple cache configurations at one instant of time. Each page is associated with a weight and fetching a page incurs a cost equal to its weight. The eviction of pages does not incur any cost. A request is served at time if is the first time such that is cached at time (i.e., it is part of some cache configuration that the algorithm goes through at time ). The request then incurs delay cost . The cost of an algorithm is its total fetch cost plus its total delay cost.
An algorithm is online if its actions at time t depend only on the requests with arrival time at most t. Furthermore, if its actions at time t do not depend on the trajectory of the delay cost curves beyond t, the algorithm is nonclairvoyant, otherwise it is clairvoyant.
An algorithm is -competitive if, for every input , its cost satisfies , where is the cost of the optimal offline algorithm on , and is a constant that is independent of the input sequence. A randomized algorithm is -competitive if its expected cost satisfies , where the expectation is taken over the algorithm's random choices.
For the analysis we use the following convention of order. At a time t, first the requests with arrive, then the optimal offline schedule performs its cache updates and finally the online algorithm updates its cache. “Before” and “after” refer to this order.
Furthermore, we assume w.l.o.g. that the optimum schedule is lazy in the sense that every eviction is delayed until the next fetch, so that the cache is full at all times, and every eviction is immediately followed by a fetch. This does not increase its delay or fetch cost: The lazy schedule caches a superset of the pages of the original schedule at all times and fetches every page at the same time as the original schedule, or not at all.
3 Algorithm definition
In this section, we define our algorithm PMD (Preemptive Mirror Descent) for weighted paging with delay. The pseudocode of PMD is given in Algorithm 1. For the definition of PMD, we assume that all weights are powers of two (see the proof of Theorem 1). Moreover, we assume w.l.o.g. that the minimum page weight is 1. Throughout, we fix the threshold and let , where is the natural logarithm.
PMD keeps a fractional state , starting with the initial cache. A request for page is served at the first time at which , and it is pending from its arrival until it is served. Because we define the randomized algorithm after applying a transformation that maps to 0 (Proposition 30), every realization of the randomized algorithm has cached with probability 1 at time . In case a page's antimass is strictly positive, it may be cached even before this time in some realizations of the algorithm.
PMD remains idle until the delay of pending requests pays for serving some page. We then call this page critical, and two types of service are performed. First, the critical page is served during a critical service, which is followed by preemptive services to other pending requests.
Critical service When a page p becomes critical (see below), PMD serves it by following a mirror descent path. We call this part of the execution a critical service to p and say that it has level , where is the weight of page p.
To serve , PMD decreases the antimass at and increases it at all other pages. It does so by virtually following the mirror descent path from [Bub+18] defined in (1). We denote this path by and write when we need to make the critical page and the start state explicit. To simplify the analysis, we specify the path explicitly as
and let PMD transition to the state with chosen minimally such that . We refer to as the length of the critical service, which is the time it takes to serve page along the mirror descent path. Note that such a time exists because the mirror descent path is continuous, is nonincreasing, , and as . Therefore, is well defined and serves all pending requests for .
Intuitively, the mirror descent path evicts mass from all pages at rate , i.e., proportional to their current antimasses divided by their weights. This way, PMD favors evicting light pages that hold a lot of antimass, intuitively following a cheap path towards a state where the antimass is divided equally among all pages.
Technically, the initial cache does not have for the cached pages, so PMD immediately moves to a valid initial state . Since this is a one time movement of cost at most , this is irrelevant to the competitive ratio.
Algorithm 1: PREEMPTIVE MIRROR DESCENT (PMD)
for each and page , // initialize budgets and claims upon page becoming critical (i.e., (5) holds): CRITICALSERVICE( ) for each level : if and | PREEMPTIVESERVICE( )
procedure CRITICALSERVICE( ): for each page with // claim delay, total increase for each level // deposit budget // serve , reset claim
procedure PREEMPTIVESERVICE( ): for each page with // open a hole, total increase // pay for closing the hole ordered by increasing deadline( ) // eligible pages while and : // get and remove first page from // pay for the round trip // set to and back (serve ), reset claim // close the hole
During the critical service, only decreases, and the total incurred fetch cost therefore is
When to turn a page critical A natural rule would turn page critical once the delay of its pending requests equals the cost of serving it, therefore balancing fetch and delay cost. This delay pays for fetching , but not for making room for . While evictions are free by themselves, they can cost the algorithm later when an evicted page needs to be re-fetched (Example 34). We therefore wait until the delay covers both the cost of serving the request and of re-fetching the heaviest page evicted to make space. To determine the heaviest such page, we observe that the mirror descent path has evicted a page once it reaches length : Using that , it holds that
Therefore, the critical service to displaces all pages of weight up to . To cover the possible re-fetching of these pages in addition to fetching , PMD waits until the delay is at least .
However, if many light pages are simultaneously pending and the cache is filled with heavy pages, following this rule for each page individually means that we let each pending request incur a very large delay cost. Displacing a heavy page to serve all light pages may be much cheaper than waiting for each light page to accumulate sufficient delay to warrant evicting a heavy page on its own (Example 35). Thus, instead of waiting for the delay of a single request for p to cover , we consider all pages of weight at most . To denote the aggregated delay cost of all pending requests for a page q at time , we define
Finally, we need to prevent delay from being charged multiple times, causing more critical service than it can pay for. Thus, for each page q, we keep track of the amount of its delay that has been claimed to make another page critical and only unclaimed delay contributes to making pages critical. Whenever q is cached, resets to 0 because there is no more delay to track.
Putting the above components together, instead of waiting for the delay on beyond to reach , we wait for the overshoot
of all lighter pages to reach this threshold, i.e., a page p turns critical when
Note that there is a well defined first time at which (5) is satisfied, because x and remain constant between two steps of PMD and the overshoots are continuous, as delays are continuous and new requests initially have 0 delay.
Once (5) is satisfied, PMD increases the corresponding values by in total and by at most each, and performs a critical service to .
Preemptive service After a critical service, PMD performs preemptive services to pending requests. A preemptive service has an assigned weight level W (described below) and serves pending requests of weight at most W in order of increasing urgency. This urgency is measured in the time until the delay of pending requests on a page reaches the weight of serving them. Formally, for each page q we define its effective deadline at a time t as
so that for all . PMD performs preemptive service to pages in order of increasing effective deadlines.
To do so, it first evicts mass of pages of weight at most W by increasing for these pages (opening a hole), uses this mass to serve pending requests on pages q by decreasing to and back (round trips), and then returns to its previous configuration (closing the hole).
Preemptive services take no time and happen at the same time as the critical service that triggered them. To determine to what extent preemptive service should be performed for level W, PMD tracks a budget for each level W throughout the execution. PMD starts a preemptive service for every weight level, i.e., every power of two , for which the pages of weight at most W hold a total of at least cached mass, i.e. (so that there is sufficient mass to open a hole), and the budget is at least (i.e., the budget can cover the cost of closing a hole and serving some requests). It then performs round trips as long as , so that the budget can cover each round trip.
Each budget starts with and can increase during critical service. To see by how much, we split the parameter range of the mirror descent path into disjoint intervals . By (4), only pages heavier than are evicted during . Moreover, we later prove that the rate of weighted eviction is at least throughout (see the proof of Lemma 5). So if , then during the relatively light page causes the eviction of pages heavier than . If light pages cause this repeatedly, PMD may keep evicting a heavy page for light requests, whereas it might have been cheaper to serve the light requests ahead of time and keep the heavy page cached afterwards. Therefore, we dedicate the length of the mirror descent path in to preemptive service at level .
To this end, we write for the length of the part of in , and increase the budget of every level by . Since the intervals are disjoint, a critical service with path deposits at most into all budgets in total. Note that, since the rate of weighted eviction is at least throughout, the deposit is at most three times the weighted eviction (Lemma 5). As the total weighted eviction and fetch cost are equal up to an additive term independent of the input, preemptive service only alters the cost of the algorithm by a constant factor.
3.1 Feasibility of PMD
We establish that PMD is feasible in the sense that throughout the execution, we never cache more mass than k, budgets stay nonnegative, and every request is eventually served.
Lemma 2. PMD is feasible in the following sense:
(a) Throughout the execution, it holds that , and . Between steps and after every critical service, it holds that .
(b) Every request is served.
Proof. (a) By definition of the mirror descent paths we have and during critical service. When opening a hole during preemptive service, the condition guarantees that this is possible without violating the bounds . In particular, it gives , so that every stays at most 1.
During a round trip to page i, decreases no further than . This decreases by at most , which is offset by the total increase of from opening the hole.
When closing the hole PMD returns to the state from before the preemptive service, which we just showed satisfies the assumptions.
Decreases to only occur after conditions that ensure covers the decrease: closing the hole costs , and a round trip on costs .
(b) Each call of CRITICALSERVICE(p) performs a critical service to a page with a pending request and serves this request. Suppose some request r for a page p is never served. After the last critical service, x and remain constant, while (by unboundedness of the delay cost functions), so . Therefore, (5) eventually holds and PMD serves the request.
4 Reducing to fetch cost of critical service
The aim of this section is to show that it suffices to analyze the fetch cost of critical services of PMD, where is the set of critical steps and is the path of the critical service performed in step (Section 4.1). More precisely, we define the fractional fetch and delay costs of PMD, show that their sum corresponds to the expected cost of the randomized algorithm that PMD is transformed into, and prove that all costs incurred by PMD are bounded by a constant multiple of
i.e., the fetch cost of critical services and an additive term independent of the input (Proposition 12). To do so, we show the following result in Section 4.1.
Lemma 3. The total length of the critical services of PMD satisfies
Algorithms incur two types of costs: delay costs and fetch costs. PMD generates fetch cost during critical and preemptive services. Since we want to reduce to the fetch costs of critical services, we only need to consider delay costs and the fetch costs of preemptive services. PMD's preemptive services are paid for by the budgets and therefore incur at most the total increase of as fetch costs. Since every critical service increases the by at most its length, the total deposit is at most the length of critical service and we can apply Lemma 3.
Using as the delay cost of PMD for a request r is not sufficient for our analysis, as we discuss in Section 4.3, where we also define the correct notion.
Writing and for the fractional fetch and delay costs of PMD, defined below, we formally show
and Lemma 3 converts the lengths into fetch cost of critical services. We begin by proving Lemma 3.
4.1 Proof of Lemma 3
A fractional algorithm traverses a finite sequence of states . For PMD, is the initial state, for a critical service with path there is a state and for every preemptive service there is a state after opening the hole, a state when the page of a round trip is cached, a state after returning, and the state after closing the hole. All these states are in the order in which they occur in PMD. We call the move from to step . If it is a critical service to a page , we call step critical and write for its path. Let be the set of critical steps.
Definition 4 (fractional fetch cost). The fractional fetch cost of a fractional algorithm traversing the states is
The fractional fetch cost of the critical steps is .
In particular, every critical step contributes exactly fetch( ), so the fractional fetch cost of critical steps is .
We prove Lemma 3 in two steps. First, we compare the length of each critical service with the weighted eviction during it and, second, we compare the total weighted eviction during critical services with their total fetch cost. We define the weighted eviction during an interval of a critical service as
and write for the total weighted eviction along .
Lemma 5. For every state with and every page , .
Proof. Let and let be the set of pages fully evicted at ,
For , , and all other coordinates are constant or nonincreasing, so . By definition of the mirror descent path for all and , so if there were at least pages in then , but the definition of ensures . Thus, there can be at most pages in and consequently, there are at least pages . Hence, it holds for all that
Integrating over gives .
We argue that the total weighted eviction during critical services differs from their total fetch cost by at most an additive term independent of the input.
Lemma 6. Over the entire execution, the total weighted eviction during critical services satisfies
Proof. Let be the path of some critical service to . By definition, is nondecreasing for and only decreases, so the integral defining EV evaluates to
Summed over all critical services, the right-hand side telescopes to at most , since every preemptive service ends in the state from before it (proof of Lemma 2). Thus, over the entire execution, the total weighted eviction is .
Together, the two lemmas yield Lemma 3.
Lemma 3. The total length of the critical services of PMD satisfies
Proof. By Lemmas 5 and 6,
4.2 Bounding Fetch Cost
In this section we show the first inequality of (7), i.e., we bound the fractional fetch cost of PMD in terms of the length of critical services. The critical steps contribute to and the remaining fetch cost is incurred by preemptive services.
Proposition 7. The fractional fetch cost of PMD satisfies
Proof. As discussed above, PMD incurs fetch cost during critical and preemptive services. Thus, it suffices to bound the latter by the length of critical services.
Opening the hole and returning from a round trip only increase coordinates of , so a preemptive service at level incurs fetch cost only during round trips and to restore the original state, both of which are paid for by a decrease in : Round trips on pages with are only performed as long as and paid for immediately, while closing the hole costs at most , which was paid at the start of the preemptive service. Thus, it suffices to bound the total decrease of all budgets, or, because , the total increase.
A critical service for a page , with path , increases the budget by for all . Since the intervals are disjoint, the total increase is at most . Over the entire execution, the increase is hence bounded by , which bounds the contribution of preemptive services to , and the claim follows.
4.3 Bounding Fractional Delay Cost
Having bounded , it remains to show the second inequality in (7), i.e.,
To define the fractional delay cost , consider some request and let be the time at which is served, i.e., the first time since the release for which . We could naively define the delay cost to be , but that would ignore the fact may already be cached with some probability when is released. In this case, some realizations of the randomized algorithm would not incur any delay cost at all thus lowering the expected cost of the algorithm. Hence, the naive definition does not represent the expected delay cost of the randomized algorithm. Instead, we weigh the delay by the factor representing the antimass of when arrives, i.e., the probability of the request not being served upon arrival.
Definition 8 (fractional delay cost). For a request , let be the state of PMD right before arrives at time . Let be the missing mass on at that time and let be the time at which is served. The fractional delay cost of is and the total fractional delay cost of PMD is defined as
We will show later that this definition captures the delay cost of the randomized algorithm corresponding to PMD up to a factor of 3 (Proposition 30). We want to consider the delay not as a sum over requests but as a sum over steps. To this end, we define a visit to p as a step such that before but after, write for the set of visits, and make the following observation, which is immediate by the algorithm's definition.
Observation 9. Between two visits of a page p its antimass never decreases. In particular, every request r on p satisfies until it is served.
Right before PMD visits a page in a step , the overshoot is , so the delay of all pending requests to is bounded by
where is the set of all requests served in step . In particular, we can bound the fractional delay cost of all as
i.e., the delay cost of all requests served with a visit is at most the cost of fetching the page, its claimed delay and its overshoot. Since all requests are served in some step, we can sum this over all visits to a page to get
With this, it suffices to bound the last sum in terms of . This is easy for the summand . Because is set to 0 after every visit, any increase in is counted at most once and the claims only increase by in total for a critical service with path . Thus, the entire sum is bounded by .
Bounding is more involved. We charge the overshoot paid by all visits at a time to the lengths of the critical services that PMD performs at the same time .
Let be the state right before the steps of PMD at time . Since the state is constant between moves and no page satisfies (5) right before , by continuity of the overshoots, the overshoots at time have at most just reached the threshold of (5). Thus, at time for every page with , we have with equality for the page whose critical service PMD performs first at time . If PMD performed only a single critical service to a page at time then would be bounded by and we would be done.
The difficulty is that PMD may perform many services at time . After the first critical service, on a page , the state jumps from to some state . The bound on the overshoot of page still refers to the critical service , whereas the service that PMD actually performs on starts in , and might be smaller than . However, the jump from to is caused by a critical service to . It therefore suffices to relate the length change between and to the length of the critical service to . To do so, we start by showing an analog to the triangle inequality for lengths of critical services.
Lemma 10. Let be a page and let and be the states before and after a critical service to is performed. Let be another page with . Then performing a critical service to from is no more expensive than performing the service to and then the service to from , i.e., .
Proof. Let and , so and for .
For a page , the critical service continues the mirror descent path that took: if 's antimass reached 1, it stays constant. Otherwise, , so . In particular, for all .
For , the two mirror descent paths have different starting points , and since 's weight does not change, the paths always satisfy . At , we have
so . As is continuous and nonincreasing, and is defined as the first with , it follows that .
Using the above lemma, we can now bound the fractional delay cost of PMD in terms of the fetch cost and the length of critical services.
Proposition 11. The fractional delay cost of PMD satisfies .
Proof. We follow the plan outlined above. Every request with is served by a visit of its page. Since no requests arrive during the steps of PMD at a time , every page is visited at most once at time . Consider a visit of at time , and let and be the state and the claimed delay of right before it. By Observation 9, the served requests have , and their delays sum to , where is the overshoot right before the steps at time . So the delay of all requests served by the visit is at most and therefore summing over all visits we get
The claim now follows from
which we show by grouping the steps by the time at which they happen. As above, let be the state right before the steps at some time and let be the heaviest page with that is visited at time (if no such page exists the sum of overshoots is zero and there is nothing to show). As (5) was not satisfied for before time we have
Note that this sum contains the overshoots of all visits at time because is the heaviest page, so we aim to bound it by , where is the set of critical steps at time . Let be the state in which PMD starts the service that visits , and let be the critical steps at time before this service. Since preemptive services end in the state in which they start, is obtained from by following . Applying Lemma 10 times we have
If the visit to q is a critical service, then we have
If is visited by a round trip of a level- preemptive service, we show . In other words, if we served with a critical service instead of a preemptive service, the path would have length at most . This holds precisely because we ensure light pages can be evicted to make space. Formally, preemptive service only happens if . Subtracting we get that the remaining pages hold at least weight . These pages are evicted along the mirror descent path and by (4), all of them are fully evicted at . Since is fetched by the amount that the other pages are evicted, it is fully loaded and the path ends, i.e., . Plugging this in gives
where we used and . Note that is the payment of this preemptive service for closing its hole. If we now sum (10) or (11) for every time , depending on how the heaviest page is served, we get
where is the total payment of all preemptive services for closing the hole. Since is paid from the budgets , it is bounded by their total increase, which (as we already argued in the proof of Proposition 7) is bounded by .
Putting everything together we find
4.4 Combined bound
Finally, we combine the bounds on the fetch and delay cost in (7) with Lemma 3 to reduce the analysis of PMD to bounding the fetch cost of critical services.
Proposition 12. If for every problem instance for some , then the fractional fetch cost and the total fractional delay cost of PMD satisfy
Proof. We combine our results to get
and the claim follows by the assumption .
5 The Bregman potential
As shown in the previous section, it suffices to bound in terms of OPT. To do so, we use a potential argument based on the Bregman divergence. For a state x let
This is the Bregman divergence of the weighted entropy function between OPT's state and and can be used as a measure for the difference between PMD's and OPT's cache. We use the Bregman divergence as a potential for analyzing PMD and denote it for short when the state is clear from context. For a critical service with path , we let denote the change of during this service.
To bound the total cost of PMD against OPT's cost, note first that we can equivalently charge OPT's evictions instead of its fetches.
Observation 13. The total cost of OPT’s evictions is at most the fetch cost of OPT plus , since each eviction is either of a previously fetched page or of a page of the initial cache.
To begin the potential argument, we first observe that the potential increases by at most per unit of cost that OPT incurs.
Lemma 14. The total increase of caused by OPT's moves is at most .
Proof. When OPT evicts i, D changes by
When it fetches i, D changes by , so the claim follows by Observation 13.
Next, we analyze the potential change on a move of PMD. Recall that we only consider critical services. For this, we make a case distinction based on whether the critical page is in OPT's cache at the time of the service (so that it contributes only to the second sum of D), or not (so that it contributes to the first sum).
Definition 15 (hit and miss services). A critical service to page is a hit service if and a miss service if . We use these terms also for its step, and write and for the sets of hit and miss steps, so that . Their fractional fetch costs and then satisfy .
For miss services, it turns out that the potential can increase during the service, so that we have to bound this additional increase in our potential argument. We give a name to this excess term that needs to be bounded independently:
Definition 16 (excess). For a miss service on page p in step , with the lightest weight in OPT, the excess of this service is
The total excess is .
This term mirrors the excess term in (2) as 1 integrated over the path length. However, we only account for the parts of the path that are in intervals with , and bound the remainder separately.
Finally, we compute the potential change during critical services. The result says that the cost of a hit service is covered by a decrease in potential so that we only need to consider miss services.
Proposition 17. Consider a critical service with path and triggering page , performed in step . If the service is a hit service, . If it is a miss service, .
Proof. Recall that we assume that OPT's cache is constant during the service and that it contains exactly k pages. Moreover, recall that .
The missing mass of all pages is increased, which increases the second sum in and decreases the first. Consider the rate of this change at a point of the mirror descent path. First, observe that pages with are already fully evicted, so their missing mass has a constant contribution to . Define the set of evicted pages as in (9). The missing mass of a page with increases at rate (recall that we set ), which changes at rate if and at rate
if . Together, the pages change D at rate
The function is absolutely continuous, so we may integrate these rates to get the total change in .
If the service is a hit service, then contributes to the second sum in , which decreases by during the service. The remaining pages change at rate , and the claim follows.
If it is a miss service, then contributes to the first sum, hence changing D by
in total. It remains to bound the change caused by the pages by . As we showed above, the remaining pages change at rate
For , (4) shows that the lightest page in OPT is evicted, i.e., it lies in . Therefore, . Hence the total change caused by the pages is
Since , the right-hand side is at most
This proves the claim.
16
☐
6 Charging to OPT
While the potential decrease pays for the cost of hit services, the potential can increase during miss services. In particular, the amortized fetch cost of a miss service on page is . In this section, we argue that the first term can be charged to OPT, and give a charging argument that will later be reused to bound the excess.
By definition of a miss service, OPT does not cache the service's page p at the time of the service. Moreover, since the service was triggered in the first place, the delay of the requests on p has exceeded its weight . If OPT has already served a request on p and evicted the page since, we can charge to OPT's eviction. Otherwise, OPT still has to serve the requests on p and pays at least their delay . Either way, we can charge the quantity to OPT.
To make this precise, we define a notion of chargeable visits. This extends the argument from miss services also to preemptive round trips.
Definition 18 (chargeable visits). A visit of a page p is chargeable if, right before it,
(i) and OPT has served some request on p that is pending for PMD, or
(ii) the total delay cost of OPT for the requests on p that are pending for PMD exceeds .
For visits satisfying (ii), it is easy to see that their weight can be charged to OPT's delay cost. For visits satisfying (i), OPT must have evicted the visited page after serving it. As a consequence, we can charge the weight of the visit to OPT as follows.
Lemma 19. The sum of the weights of all chargeable visits on pages is at most .
Proof. Let be a visit on at time satisfying (i). Charge the cost of to OPT's last eviction of before .
Suppose two visits before on satisfying (i) are charged to the same eviction . Then OPT did not evict between and . Since upon , OPT does not have in its cache between and . Note that every request pending for PMD at must arrive after . In particular, no request pending for PMD at has been served by OPT at , contradicting (i) for . Therefore, each charged quantity corresponds to a distinct eviction of OPT and the total weight of visits satisfying (i) is bounded by the total weight of OPT's evictions. By Observation 13, this is at most the fetch cost of OPT plus .
Every other chargeable visit satisfies (ii), i.e., it serves requests for which OPT pays more than of delay, and distinct visits serve disjoint sets of requests, so these visits have total weight at most the delay cost of OPT.
We next argue that miss services are chargeable, so that we can bound the term of their amortized cost by OPT's cost.
Lemma 20.
Proof. We show that every miss service on a page at time is a chargeable visit, the claim then follows from Lemma 19. By definition of the trigger for critical service, we have at the time of the miss service and therefore delay . If OPT has served some pending request on , then the service satisfies (i), since . Otherwise, OPT pays at least delay in delay cost, so the service satisfies (ii).
We can combine the above lemmas to bound the total fetch cost through a potential argument. The fetch cost of hit services is covered by the potential decrease (Proposition 17). The potential increase caused by OPT's moves is at most times OPT's cost (Lemma 14). The fetch cost of miss services, as well as the term from the potential increase can be charged to OPT directly (Lemma 20). In order to bound the total fetch cost only in terms of OPT, it then remains only to bound the total excess.
Proposition 21. .
Proof. The potential changes only in critical services and at OPT's moves, since preemptive services return to the same with OPT's cache constant. By Lemma 14 and proposition 17 and since throughout, the total decrease in potential is at least , and the total increase is at most
Clearly, the total decrease is at most the total increase plus the initial potential. The initial potential is since and . It follows that
Applying Lemma 20 to the above inequality and to gives
7 Bounding the excess
In this section we bound the total excess in terms of OPT. Recall that the excess contributed by a miss service on page with path is for each level with . This is exactly the deposit of this service into the budget , or times the overshoot it claims, by definition of the algorithm. We bound the excess in two ways: In case OPT has already served light pages with overshoot, we argue that preemptive services see these light pages as candidates, and therefore spend their budget completely on requests that OPT has already paid for. It then suffices to bound the budgets. Otherwise, we argue that OPT has to pay for the overshoot through delay cost, and we charge the claimed overshoot to OPT. To this end, we first make this case distinction precise by defining overdue services, which are those where OPT has already served light pages with overshoot.
Definition 22 (overdue pages and services). A page q is overdue at time t if the pending requests R on q that OPT has served satisfy . A miss service to p with is overdue if some page q with is overdue right before it, and timely otherwise. We use these terms also for its step, and write and for the sets of overdue and timely steps.
Intuitively, in a timely service, OPT has not yet served the pending overshoot on light pages. Therefore, OPT also has to pay the overshoot. By definition of the algorithm, the overshoot the service claims multiplied by L is at least the excess contributed by the service. This way, the excess of timely services can be charged to OPT's delay cost. The following lemma formalizes this argument.
Lemma 23 (timely services). .
Proof. By definition of the algorithm, every critical service with path on a page of weight less than claims of delay and, if performed in step , contributes to the excess. Therefore, it suffices to show that the total amount claimed by timely services is at most OPT. In particular, for every page , we measure the delay claimed from it between a visit of or the start of the input and the last timely service that claims from it before its next visit, and show that this is at most OPT. This accounts for all claims of timely services from , and possibly more.
Fix a page and divide the time into intervals each ending with the next visit to . Since every request is eventually served, there are no requests on after its last visit, so nothing can be claimed from then and it suffices to consider the time intervals ending with a visit. Fix a time interval . Let be the last timely service in that claims a positive amount from , and let be its time. If there is no such service, then the total claimed from by timely services during is 0 and nothing has to be shown.
Otherwise, since a claim increases by at most its overshoot , the claims from up to total at most delay , where delay refers to the requests pending right before . Denote those requests by . Assume that OPT pays delay cost less than for the requests in . Then the total delay of requests in that OPT has served before is more than , so is overdue right before . Since claims a positive amount from , and a service to a page claims only from pages of weight at most , is at most the level of . Hence is overdue, a contradiction. It follows that OPT pays at least in delay cost of , which is at least the total amount claimed from . The requests are served by the visit at , so every request is counted for only one time interval, and the claim follows by summing over all time intervals.
It remains to bound the excess of overdue services through the budgets. As outlined, the excess can be bounded by the total deposit into the budgets. To bound the total excess of overdue services, it therefore suffices to bound the total paid out of budget plus the remaining budget. In particular, we show that, as long as there is still an overdue service of level at most W to come, the budget is spent on chargeable round trips, and the remaining budget is small. We split this argument by periods of OPT, defined by the times between moves of OPT.
First, we formally define periods.
Definition 24 (periods). Let be the times at which OPT performs a walk of positive cost, and . Period is the time interval , with for the last period. OPT's cache is constant from after its walk at until before its walk at . We call this cache configuration (for , the initial cache).
We want to argue that most of the budget is spent on chargeable round trips, except for a small remainder. To make this precise, we introduce the early part of a period w.r.t. some level W and prove that, during preemptive services of the early part, the budget is drained (i.e., budget is spent mostly on round trips, and not only on closing the hole), and all preemptive round trips are chargeable.
Definition 25 (early part). Let be a period and a level. Let be the steps in of period of level , and call their critical services the light services. The early part of period consists of all services in period up to, but not including, the last light service.
Here, the light services are the overdue services that contribute to the excess at level W.
We next show that preemptive services of the early part drain their budget on chargeable round trips. The key argument behind this statement is that, during the early part, the last light service is still to come, and some light page q is overdue. In particular, the deadline of q has already passed. Therefore, level-W preemptive services do not run out of candidates, and instead drain their budget on requests with early deadlines.
Lemma 26. Every level-W preemptive service in the early part of period j performs only chargeable round trips, and ends with .
Proof. Consider some level-W preemptive service in the early part (i.e., before the last light service) and let be a page selected for preemptive service. It is immediate that , as and . If OPT has served some pending request on , the round trip satisfies (i), so it remains to argue that otherwise OPT pays more than of delay for the pending requests on , i.e., that (ii) holds. We show this by arguing that 's effective deadline is no later than period . Since OPT has not served any pending requests on and does not do so until after period , this would imply that the requests on accrue delay of more than for OPT, and therefore (ii) holds.
To this end, let be the time of the last light service, and let be a page with that is overdue right before it. Such a page exists by definition of overdue services. Since is overdue at time , OPT has served some requests on that have total delay more than at time , and are pending at time . Therefore, deadline( . As , and therefore , these requests must have arrived no later than , and are already pending during and eligible for preemptive service. Since is chosen for preemptive service over , it must be that has an effective deadline no later than 's, and therefore no later than .
To show that at the end of preemptive service, note that the considered requests on remain pending throughout , as they are still pending at time , and is eligible for preemptive service. Therefore, the loop of round trips ends before it reaches , which by its condition means that .
We combine the above lemmas into a bound on the excess terms by bounding the total budget spent in the early part, the remaining budget after the early part, and one additional term for the final overdue light service. Write for the sum of over the chargeable round trips of level W in period j to some page p.
Lemma 27. For every period and weight level it holds that
Proof. By definition, each summand is at most LW, and we bound the last summand this way. Each of the other summands is exactly the deposit of the -th light service into . Therefore, it suffices to show that
This inequality is trivial for , so we assume henceforth that . To prove (12), observe that each -th light service with lies in the early part and deposits into the budget , so we can bound the sum of these terms by the total paid out of during the early part (i.e., the cost of preemptive service), plus the budget remaining at the end of the early part.
First, we examine the cost paid out of during level-W preemptive services in the early part. Every such preemptive service starts with budget at least 4W, ends with budget less than W (by Lemma 26) and pays no more than W to close its hole. Therefore, it spends more than 2W on round trips, i.e., more than twice its closing cost. In other words, the total payment is less than times the cost of the round trips. By Lemma 26, every round trip in the early part is chargeable, and their costs sum to no more than .
To prove (12), it now remains only to show that the leftover budget after the early part is at most 4W. Let be the last critical service of level in the early part, which exists since the -th light service is one. After , its page, which has weight , has missing mass , so . Therefore, starts a level-W preemptive service as long as the budget is at least 4W. In this case, since is in the early part, this preemptive service drains the budget to less than W by Lemma 26. Otherwise, already. Subsequent services in the early part have level higher than W and therefore do not increase . This concludes the proof.
We have already established that the cost of chargeable round trips can be charged to OPT. To derive a bound on the total excess, we additionally need to bound the extra summand LW in Lemma 27. To this end, we note that , and we can bound the movements of OPT between periods from below by .
Lemma 28 (lightest weights).
Proof. Since we assume OPT is lazy, the last page fetched in the walk at lies in , so its weight is at least . For , . Summing this and the distinct walks at for all gives the claimed bound.
Finally, we can combine the lemmas from this section to derive a bound on the total excess.
Proposition 29 (total excess). .
Proof. Every step that is in neither nor has and therefore , so . By Lemma 23, timely services contribute at most to the excess. Every step in period contributes to Exc only at levels with , and for each such level, for some . Hence,
Applying Lemma 27 gives
Lemma 19 gives the bound . For the terms , observe that for every , since weight levels are distinct powers of two,
Applying Lemma 28 yields
Combining the above inequalities gives the claimed bound
8 Proof of the main theorem
Combining the results from the above sections gives that PMD has fractional fetch and delay cost
It remains to transform this online into a feasible randomized integral algorithm. We do so by combining the online rounding theorem from [BBN07] with a rounding map similar to the one from [Bub+18]. The proof can be found in Appendix A.
Proposition 30 (rounding; proof in Section A). Let the weights be powers of two, and let and be the fractional fetch and delay cost of PMD (Definitions 4 and 8). Then the states of PMD can be converted online into a randomized integral algorithm that serves every request with probability 1, has expected fetch cost , and expected delay cost at most .
Proof sketch. First, we apply the transformation to the fractional antimass states to get new states describing the cached masses. This transformation maps antimass to cached mass 0, so that every page with antimass is fully cached. Moreover, the total cached mass is at most , and the transformation is 3-Lipschitz (Lemma 33). It follows that the transformed states are valid fractional cache states that respect the serving times we planned.
The online rounding of Bansal, Buchbinder, and Naor then transforms the fractional cache states into random cache choices that contain every page with probability equal to its cached mass and realize the fractional fetch cost up to a constant factor (Corollary 32). In particular, a request on is served at the latest at , when and is cached with probability 1. When arrives, is not cached with probability at most , so the expected delay of is at most . This justifies that the fractional delay cost weights the delay by . The full proof is in Section A.
Applying this rounding scheme gives the desired -competitive randomized algorithm.
Proof of Theorem 1. First, we round the weights up to powers of two. This at most doubles OPT and , and does not decrease the cost of any algorithm. By Proposition 21 and Proposition 29, it holds on every instance that
Proposition 12 with and then gives
By Proposition 30, the states of PMD can be converted online into a randomized integral algorithm that serves every request with probability 1 and has expected cost at most
The additive term depends only on k and the weights, not on the requests, so this algorithm is -competitive.
Disclosure of AI usage
An initial draft of this paper was written by Claude Opus 5.5 based on two proofs written by the authors. The first showed the competitive ratio for an algorithm based on mirror descent for paging with deadlines in two special cases: when there are only two weight classes, and when the loaded page is the heaviest page. The second contained a fully potential-based analysis of the result from [Aza+21], specialized to paging with deadlines, giving a potential that amortizes the cost difference between paging with and without delay, and that was then used in the initial draft of this paper. Claude Opus extended our results to general weights and delays, in particular by introducing weight classes explicitly and depositing preemptive service budgets based on these weight classes. This paper was written entirely by the authors, based on the initial draft written by Claude Opus. The authors independently checked all resulting proofs and take full responsibility for the content and accuracy of the paper, including any errors that may remain.
References
[AT19] Yossi Azar and Noam Touitou. "General Framework for Metric Optimization Problems with Delay or with Deadlines". In: Proceedings of the 60th Annual Symposium on Foundations of Computer Science (FOCS). 2019. arXiv: 1904.07131 [cs.DS].
[AT20] Yossi Azar and Noam Touitou. "Beyond Tree Embeddings – a Deterministic Framework for Network Design with Deadlines or Delay". In: Proceedings of the 61st Annual Symposium on Foundations of Computer Science (FOCS). 2020, pp. 1368–1379. DOI: 10.1109/FOCS46700.2020.00129.
[Aza+21] Yossi Azar et al. “Online service with delay”. In: ACM Transactions on Algorithms (TALG) 17.3 (2021). (STOC 2017), pp. 1–31.
[BBN07] Nikhil Bansal, Niv Buchbinder, and Joseph Naor. "A Primal-Dual Randomized Algorithm for Weighted Paging". In: Proceedings of the 48th Annual IEEE Symposium on Foundations of Computer Science (FOCS). 2007, pp. 507–517. URL: https://www.tau.ac.il/~nivb/download/weighted-paging-focs07.pdf.
[BCC25] Xingjian Bai, Christian Coester, and Romain Cosson. "Unweighted Layered Graph Traversal: Passing a Crown via Entropy Maximization". In: Proceedings of the 2025 Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2025, New Orleans, LA, USA, January 12-15, 2025. SIAM, 2025, pp. 3884–3900. DOI: 10.1137/1.9781611978322.131.
[BCN14] Niv Buchbinder, Shahar Chen, and Joseph Naor. "Competitive Analysis via Regularization". In: Proceedings of the Twenty-Fifth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA). SIAM, 2014, pp. 436–444. DOI: 10.1137/1.9781611973402.32.
[Bie+16] Marcin Bienkowski et al. “Online Algorithms for Multi-Level Aggregation”. In: Proceedings of the 24th Annual European Symposium on Algorithms (ESA). Vol. 57. 2016, 12(17). DOI: 10.4230/LIPIcs.ESA.2016.12.
[BKS18] Marcin Bienkowski, Artur Kraska, and Paweł Schmidt. “Online Service with Delay on a Line”. In: 25th International Colloquium on Structural Information and Communication Complexity (SIROCCO). 2018, pp. 237–248. ISBN: 978-3-030-01324-0. DOI: 10.1007/978-3-030-01325-7_22.
[Bub+18] Sébastien Bubeck et al. “k-server via multiscale entropic regularization”. In: Proceedings of the 50th Annual ACM SIGACT Symposium on Theory of Computing (STOC). 2018, pp. 3–16. DOI: 10.1145/3188745.3188798.
[Bub+21] Sébastien Bubeck et al. “Metrical Task Systems on Trees via Mirror Descent and Unfair Gluing”. In: SIAM J. Comput. 50.3 (2021). (SODA 2019), pp. 909–923. DOI: 10.1137/19M1237879.
[Buc+17] Niv Buchbinder et al. “O(depth)-Competitive Algorithm for Online Multi-level Aggregation”. In: Proceedings of the 2017 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA). 2017, pp. 1235–1244. DOI: 10.1137/1.9781611974782.80.
[CL91] Marek Chrobak and Lawrence L. Larmore. “An Optimal On-Line Algorithm for k Servers on Trees”. In: SIAM Journal on Computing 20.1 (1991), pp. 144–148. DOI: 10.1137/0220008.
[DGS01] Daniel R. Dooly, Sally A. Goldman, and Stephen D. Scott. “On-line Analysis of the TCP Acknowledgment Delay Problem”. In: Journal of the ACM 48.2 (2001). (STOC 1998), pp. 243–273. DOI: 10.1145/375827.375843.
[EKW16] Yuval Emek, Shay Kutten, and Roger Wattenhofer. “Online Matching: Haste makes Waste!” In: Proceedings of the Forty-Eighth Annual ACM Symposium on Theory of Computing (STOC). 2016, pp. 333–344. DOI: 10.1145/2897518.2897557.
[Fia+91] Amos Fiat et al. “Competitive paging algorithms”. In: Journal of Algorithms 12.4 (1991), pp. 685–699.
[GKP21] Anupam Gupta, Amit Kumar, and Debmalya Panigrahi. “A Hitting Set Relaxation for k-Server and an Extension to Time-Windows”. In: Proceedings of the 62nd Annual Symposium on Foundations of Computer Science (FOCS). 2021, pp. 504–515. DOI: 10.1109/FOCS52979.2021.00057.
[GKP22] Anupam Gupta, Amit Kumar, and Debmalya Panigrahi. “Caching with Time Windows and Delays”. In: SIAM J. Comput. 51.4 (2022). (STOC 2020), pp. 975–1017. DOI: 10.1137/20M1346286.
[Krn+20] Predrag Krnetić et al. “The k-Server Problem with Delays on the Uniform Metric Space”. In: Proceedings of the 31st International Symposium on Algorithms and Computation (ISAAC). Vol. 181. 2020, 61:1–61:13. ISBN: 978-3-95977-173-3. DOI: 10.4230/LIPIcs.ISAAC.2020.61.
[MTW26] Darya Melnyk, Linda Thelen, and Yuyi Wang. Two Holes Make a Difference: Deterministic Paging with Delay and Deadlines. 2026. eprint: 2610.18767. URL: https://arxiv.org/abs/2610.18767.
[NY83] Arkadij Semenović Nemirovskij and David Borisovich Yudin. Problem complexity and method efficiency in optimization. Wiley-Interscience, 1983.
[ST85] Daniel D Sleator and Robert E Tarjan. “Amortized efficiency of list update and paging rules”. In: Communications of the ACM 28.2 (1985), pp. 202–208.
[Tou23] Noam Touitou. “Improved and Deterministic Online Service with Deadlines or Delay”. In: Proceedings of the 55th Annual ACM Symposium on Theory of Computing (STOC). 2023, pp. 761–774. DOI: https://doi.org/10.1145/3564246.3585107.
[Tou25] Noam Touitou. “Nearly-Optimal Algorithm for Non-Clairvoyant Service with Delay”. In: Proceedings of the 42nd International Symposium on Theoretical Aspects of Computer Science (STACS). Vol. 327. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2025, 74:1–74:21. DOI: 10.4230/LIPIcs.STACS.2025.74.
A Rounding
For classical weighted paging, Bansal, Buchbinder, and Naor [BBN07] round a fractional algorithm online: they maintain a random cache so that the probability that a page is cached is exactly its fractional cached mass. Their rounding procedure changes the algorithm's cost by only a constant factor.
In this section, we show that their rounding procedure can be applied to the fractional states of PMD after applying a fixed transformation to the fractional states. This yields the desired randomized algorithm with only a constant factor increase in cost.
Theorem 31 ([BBN07, Theorem 4.1]). Let the weights be such that for . There is a subclass of distributions on cache states, along with a map from with the following property: Given any two distributions on pages , and given any satisfying , we can obtain another distribution such that , and .
In Theorem 31, the notation is as follows.
the distinct page weights.
cache state a set of k pages.
probability distributions on cache states, i.e., gives for every cache state the probability that the random cache is .
the vectors with , which [BBN07] call distributions on pages; is the cached mass of page .
the marginals of is the probability that page is in a random cache with distribution .
D a subclass of the distributions on cache states, constructed in [BBN07], whose definition we do not need.
cost(Q, ) the minimum expected cost of a transition from Q to , i.e., of a rule that says, for every current cache state, with which probability to move to each cache state, such that a cache with distribution Q ends up with distribution . Fetching and evicting page i each cost (the convention of [BBN07]).
, the cost of moving fractional mass from to in the same convention.
T the update rule: it picks the next distribution from the current one and the new marginals.
In the notation of this paper, Theorem 31 gives the following.
Corollary 32 (online rounding). Let the weights be powers of two, and let with be given online, where is the indicator vector of . Then one can choose random sets of pages online, i.e., each depends only on and random choices made up to then. They satisfy , for all and all pages , and
Proof. The assumptions of Theorem 31 hold: as the distinct weights are powers of two, , and every lies in . By the proof of [BBN07, Theorem 4.1], contains a distribution with . As is the indicator vector of , gives probability 1 to the cache state , so we can let . Given with distribution , let
and obtain by applying a cheapest transition from to to the current cache . As has distribution , this gives, at expected cost , a cache with distribution . By Theorem 31, , so that this can be repeated, and . As depends only on , the sets are chosen online.
Finally, charges for every fetched page , so by Theorem 31,
The cached masses of our fractional algorithm do not fit Corollary 32 directly: a page with is not fully cached, and the total cached mass may be less than . For the first issue, we stretch the cached mass by , which makes such pages fully cached but may overshoot by , and remove the overshoot by doubling and subtracting 1.
Lemma 33. Let with . Define and . Then , if , , and each is a nonincreasing, 3-Lipschitz function of .
Proof. As , we have and hence . If , then
As a function of , is piecewise linear with slopes 0 and , hence nonincreasing and 3-Lipschitz. We have . If at most pages have , then only those pages have and hence . Otherwise, .
For the second issue, we transform the fractional sequence to be lazy: we keep a state of total mass exactly , and decrease only when its mass is needed on other pages.
Proposition 30 (rounding; proof in Section A). Let the weights be powers of two, and let and be the fractional fetch and delay cost of PMD (Definitions 4 and 8). Then the states of PMD can be converted online into a randomized integral algorithm that serves every request with probability 1, has expected fetch cost , and expected delay cost at most .
Proof of Proposition 30. By Lemma 2, every state of PMD satisfies and has total antimass , so we can apply Lemma 33 to it. Let be as in Lemma 33. Before we can apply Corollary 32, we first need to transform the states into a lazy strategy so that the total cached mass is exactly .
To this end, let , and obtain from by increasing coordinates that are smaller than in until (i.e., mass is only removed from coordinates when the total mass would otherwise exceed ). This transformation is online, since depends only on and . The vectors have total mass and lie in . We let the initial state of PMD be such that for , for some page , and for all other pages. Applying Lemma 33 gives that is the indicator vector of . Therefore, Corollary 32 can be applied and gives an online randomized integral algorithm that starts with the cache and whose cache at the state contains each page with probability .
We now bound the expected fetch cost of this algorithm by . By Corollary 32, it is at most . As every starts at most 1 and stays nonnegative, its total decrease is at most its total increase plus 1, so
By the definition of (Definition 4), it remains to show that increases at most 3 times as much as decreases. As is raised only up to and , it increases at most as much as . As is a nonincreasing, 3-Lipschitz function of (Lemma 33), in turn increases at most 3 times as much as decreases. Hence, for all and all pages ,
Finally, we bound the expected delay cost of every request by . Let be a request on , be the fractional state right before time , so that (Definition 8), and let be the random cache right before . If , then is served at time with no delay cost. Otherwise, is served no later than at , where , so and is cached with probability . The delay cost of then is at most . Therefore, it suffices to show . By Lemma 33, is a 3-Lipschitz function of with value 1 at , hence
Summed over all requests, the expected delay cost is at most .
B Why
The lower bound from classical paging proves that no choice can give a better competitive guarantee than that achieved with . However, to motivate this choice also based on the analysis itself, this section gives a more direct argument that our analysis of PMD cannot be improved by choosing a different .
The threshold enters the analysis of PMD in two places. The fractional analysis loses a factor of order , so it favors a large . This factor is inherent to the potential argument: when OPT evicts a page with antimass , the potential increases by (proof of Lemma 14). The rounding, in contrast, has to treat antimass as fully cached while caching at most pages, which forces : otherwise, the state with antimass on pages and 1 on all other pages has total antimass , but the rounding would have to cache all of these pages. Hence, for every admissible , so no choice of lets this analysis lose less than order .
C Why simpler rules for when to serve fail
The following examples motivate why we use (5) to determine when to perform critical service. For convenience, we recall that p becomes critical when
Example 34 (Dependence on ). This example shows that the rule for performing critical service must not depend only on the weight of the page and its delay.
Let k = 1, and let there be a heavy and a light page h and with weights W and 1, respectively. The pages are requested in alternating order until some time T. The heavy page h is requested at every even time and its delay grows linearly with a very fast rate . Page is requested at every odd time and the delay only grows to some chosen below, remains there until time and then grows at the fast rate , i.e., for , and afterwards.
OPT caches immediately at cost , keeps it until time (incurring no cost from the requests to ) and then serves all requests on , paying at most per request on plus 1 to fetch it. In total, .
Consider any rule that serves once its pending delay exceeds a threshold that depends only on . Choosing forces such a rule to fetch within one time unit after every request on , and the next request on forces it to fetch back at cost or to pay delay of at least . Either way, the cost is per round, so the competitive ratio is . Thus, any rule depending only on the delay and weight of is not sufficient.
Example 35 (Dependence on lighter pages). This example shows that the rule for performing critical service must not depend only on the page to be turned critical.
Suppose all light pages are fractionally evicted and the cache is filled with heavy pages of weight W, while OPT caches a light page of weight 1. Now several light pages receive requests with the same delay function at the same time, and OPT serves them immediately through its light slot, which costs m in total.
A rule that serves each light page once its own pending delay exceeds lets all accumulate delay in parallel until their delay is each, resulting in a cost of .
PMD solves this by letting all lighter pages contribute to when a page becomes critical.
D The mirror descent path in closed form
In Section 3, we define the path of a critical service by a closed formula instead of by the differential inclusion (1), and our analysis uses only this closed form. This section shows that is indeed the mirror descent path of [Bub+18, Section 2.2], traversed at a different speed. The idea is that (1), written componentwise, lets the antimass of every page with grow at the relative rate , where the factor is the same for all these pages. Measuring progress by instead of by removes this factor and gives , the closed form of . We first write (1) componentwise, then determine , and finally verify that , traversed at a suitable speed, satisfies (1).
Throughout, let be the start state, with , and let .
The differential inclusion for each page Recall that the mirror descent path is a path in with that satisfies
where is the normal cone of at . The mirror map has the diagonal Hessian with entries . For with , the only constraints of that can be tight are and , so the normal cone is
Here, 1 is the vector of all ones and is the vector with a 1 in position and 0 elsewhere. Hence, a path with satisfies (1) at time if and only if there are and , with unless , such that
Where the closed form comes from Summing (13) over all pages and using , which keeps y in S, gives
so . Every page with has and, by (13), grows at the relative rate . A page with therefore stays at antimass 1: it cannot exceed 1, and as soon as it dropped below 1, it would grow again. So , i.e., . Substituting this into the sum determines the factor as [Bub+18, (2.8)], where for a state we let
With , integrating gives until reaches 1, i.e., .
satisfies the differential inclusion For , we have , since for and by the choice of . Hence, is positive on , and it is piecewise continuous, with jumps only where a page reaches antimass 1. Let be the inverse of the increasing function , so that , and let . We show (13) with , and for the pages with , and for all other pages. Let be the set of pages whose mass is still changing, and let be a time at which no page reaches antimass 1.
• For , we have , so .
• For , i.e. , the page stays at antimass 1, so .
• For , we have , so by the two cases above and the definition of ,
So satisfies (13), and hence (1), at almost all times. The mirror descent path passes through the same states as , in the same order, and reaches exactly when .