Manuscript Offprint
arXiv:2610.33334Joint Service Depth and Priority Design in Queueing Systems
Adam N. Elmachtoub
Department of Industrial Engineering and Operations Research and Data Science Institute, Columbia University, New York, NY 10027, adam@ieor.columbia.edu
Yash Kanoria
Graduate School of Business, Columbia University, New York, NY 10027, ykanoria@columbia.edu
Jonathan Y. Tan
Department of Industrial Engineering and Operations Research, Columbia University, New York, NY 10027, jyt2123@columbia.edu
In many service systems, including data centers serving AI jobs, the server can choose the amount of processing effort, which we call the service depth. Deeper reasoning can improve output quality, but it also consumes computing resources for longer and increases congestion. The realized processing time depends on the chosen service depth, but remains random because AI models are probabilistic and tasks vary in complexity. Motivated by these applications, we study the joint design of service depth and priority in a single-server queue with customers who differ in delay sensitivities, under a welfare-maximization objective. The decision maker determines, for each customer type, both a service priority and a service depth, where service times are exponentially distributed with means equal to the chosen service depths.
We consider a setting with two types of customers and a setting with a continuum of types of customers. In the setting with two types, we characterize the optimal joint service depth and priority assignment. We find that, in the centralized setting, counterintuitively, the decision maker's optimal policy prioritizes the patient type if a sufficiently large fraction of customers are patient. In the decentralized setting, the optimal incentive compatible price menu never prioritizes the patient type. Consequently, there can be a welfare gap between the centralized decision maker's optimal control policy and the optimal decentralized pricing mechanism. In the setting with a continuum of types, we show that the centralized optimum is achieved by a service depth assignment that allocates weakly smaller service depth and gives priority to more delay-sensitive customers. As a result, the optimal allocation can be implemented by an incentive compatible pricing menu under strategic customers with private delay sensitivities. We then calibrate an agentic AI service system using published coding-agent trials from DeepSWE and numerically examine priority inversion, the value of joint design, and the welfare gain from personalization.
Key words: queueing system; service value; priority; strategic customer; pricing
1. Introduction
Many modern service systems decide not only which customer to serve next, but also how much service to provide for each job. Completion is not governed by a fixed service requirement; instead, the provider has discretion over how much time, attention, or computation to devote to processing the job. In such systems, service effort is both value-producing and capacity-consuming: a deeper diagnosis, a more careful customization, or a longer computational search generates greater value for the customer, but it also occupies the service capacity and delays other customers (Deshmukh and Jain 1977, Anand et al. 2011). We refer to this controllable processing effort as the service depth. Service depth directly enters customers' utility, so it can also affect customers' strategic behavior and contract choices.
AI-agent service systems provide a contemporary motivation for this problem. With the rapid growth of Large Language Models (LLMs) and Generative AI (GenAI), AI agents can now act as domain experts in specialized fields and be applied in many Internet service systems, ranging from customer support to software development (Huang et al. 2024, Sapkota et al. 2025). These systems offer a new form of operational flexibility. Unlike human service providers, whose skills, availability, and task assignments are usually difficult and costly to adjust, it is possible for AI-agent service systems to adjust the service depth (reasoning effort) and switch between different types of tasks at lower cost, enabling service systems to respond differently to changing task requirements.
However, AI agents introduce several important operational challenges. LLM requests are heterogeneous and difficult to predict in advance, making it difficult for centralized planning and control (Mitzenmacher and Shahout 2025). In addition, the quality of LLM output is highly dependent on the processing time, introducing a trade-off between the service quality and the congestion of the system: faster responses may reduce waiting times and operating costs, whereas deeper reasoning requires longer processing time but yields higher accuracy and better service outcomes (Wei et al. 2022, Snell et al. 2025).
Classical priority rules rank jobs using fixed primitives, such as delay costs and service requirements, which may be suboptimal when service depth is endogenous. This motivates a joint design problem that has received comparatively little attention:
How can we develop efficient policies to control the service depth and priority in service systems?
We investigate this question through a stylized queueing and mechanism design model. Specifically, we model the system as a preemptive queue in which both service depth and service priority are controllable variables. Customers arrive to a single-server queue according to a Poisson process and differ in their delay sensitivities, represented by the delay cost they experience. For each customer type, the decision maker determines the service depth to provide and the priority with which its jobs are served. Service depth assignments are type-dependent and do not depend on the current state of the queue. Conditional on a chosen service depth x, the realized service time is exponentially distributed with mean x, and the service value generated is . A larger service depth generates a greater service value, but also increases workload and delays other customers. Thus, service depth captures the server's ability to adjust processing effort, while preemption captures scheduling flexibility. This framework isolates the key operational primitives that arise in AI-agent services and many other service systems: heterogeneous demand, flexible service allocation, and endogenous service depth.
Throughout the paper, the objective is to maximize long-term average social welfare, defined as service value net of delay costs. We study two informational regimes. In the centralized benchmark, the decision maker observes each customer's type and directly assigns service depth and priority. In the decentralized setting, the delay sensitivity of a customer is private information. The provider then offers a menu of service depth, priority, price options, and customers choose the options that maximize their expected surplus from the menu. Therefore, we focus on finding the optimal menu that satisfies the incentive compatibility and individual rationality constraints.
-
In a two-type model, we characterize the welfare-maximizing policy for the centralized decision maker. For linear service values, the optimal policy has three regimes: the more delay-sensitive type may be excluded, the more delay-sensitive type may be prioritized, or the less delay-sensitive type may be prioritized. The last regime is counterintuitive: when a sufficiently large fraction of customers are patient, the centralized decision maker optimally assigns them a smaller service depth and serves them first. Thus, the optimal priority order is not determined by delay sensitivities alone; it also depends on the prevalence of each type. We further show that such a phenomenon exists for nonlinear concave value functions as well.
-
In the two-type model with linear service values, we characterize the optimal menu when delay sensitivity is private information. Incentive compatibility requires the more delay-sensitive type to receive a weakly shorter sojourn time, and any service policy that satisfies this property is implementable in an incentive compatible way. Therefore, a centralized allocation that prioritizes the less delay-sensitive type cannot be implemented by a self-selecting price menu. Hence, there is a welfare gap between the centralized and decentralized optimal policies. We further derive an upper bound of the welfare gap based on worst-case analysis: the optimal decentralized menu achieves at least 75% of the centralized welfare, and this bound is tight.
-
In a continuous-type model, we show that the welfare-maximizing policy for the centralized decision maker has a monotone structure: more delay-sensitive customers receive weakly smaller service depth and higher priority. This monotonicity is exactly the ordering required for incentive compatibility: more delay-sensitive customers also receive weakly shorter sojourn times. Hence, whenever the centralized optimum is attained, it can be implemented by an incentive-compatible pricing menu. This contrasts with the two-type case and shows that finer control over service depth assignment can align the operational priority order with decentralized implementation.
-
We complement the theory with a case study calibrated from GPT-5.6 Sol trials on DeepSWE at five reasoning-effort levels. The two-type experiments exhibit a welfare loss from incentive compatibility of up to 53.4%. With many customer types, the experiments show how the value of priority and depth changes with congestion: priority alone can match joint design at lower load, while personalized depth sustains service near capacity. Personalization also produces an implementable allocation with higher welfare than the coarse centralized optimum.
Although we focus on maximizing social welfare in this paper, our analysis in the two-type model and for regular distributions in the continuous-type model also applies to revenue maximization. The general idea is, under incentive compatibility, the revenue objective can be rewritten as a welfare-like objective in which the true delay sensitivities are replaced by virtual delay sensitivities. We provide an analysis for revenue maximization in Section 8.1.
The remainder of this paper is organized as follows. Section 2 reviews the literature. Section 3 introduces our model and states our two different settings: the setting where delay sensitivities are known to the decision maker, and the setting where delay sensitivities are customers' private information. Section 4 studies the two-type model where delay sensitivities follow a two-point distribution. Section 5 studies the continuous-type model where delay sensitivities follow a continuous distribution. Section 6 presents some numerical examples on different value functions. Section 7 presents a case study of an agentic AI service system calibrated from published software-engineering trials. Section 8 presents some extensions of the model. Section 9 concludes the paper and provides directions for future work.
2. Literature Review
Our study bridges three topics in queueing systems: service rate control, priority control and pricing, and queueing for AI systems.
Service rate control. This paper contributes to the queueing literature on service rate control. Classical service rate control studies how a decision maker should adjust server speed, service capacity, or effort in response to congestion. Weber and Stidham Jr (1987) analyze optimal service rate control in queueing networks, showing that the optimal service rate is monotone with respect to the congestion level. This is further extended by a number of papers establishing similar monotonicity results (Stidham Jr and Weber 1989, Veatch and Wein 1992, George and Harrison 2001).
A related line of work studies service control and pricing when customers are self-interested. Ha (1998) provides an incentive compatible pricing mechanism via steady-state analysis in a setting where customers choose their service times, and this framework is further extended to a multiclass setting in which customers are heterogeneous (Ha 2001). Regarding the real-time control setting, Ata and Shneorson (2006) study dynamic control of arrival and service rates and characterize the optimal pricing policy with respect to the length of the queue.
It is worth mentioning that these prior works differ fundamentally from our setting. In the existing literature, faster service is obtained by adding capacity at an operating cost, and the service rate is primarily a tool for managing system congestion. In contrast, our model has no explicit cost of changing service depth. Instead, choosing faster service entails an opportunity cost: it lowers the service depth and therefore reduces the value delivered to the customer. Service depth directly affects the utility received by customers, affecting their behavior and creating a trade-off between service quality and congestion. More closely related to our setting, Anand et al. (2011) consider the model in which adjusting service speed affects customers' utility, and Lin et al. (2023) study wait-time-based pricing in queues with customer-chosen service times, where customer utility depends on service time.
Priority control and design. Priority control studies how the decision maker should schedule the service order of different tasks in congested systems. Cobham (1954) is one of the earliest papers on priority assignment in waiting-line systems. Kleinrock (1965) derives a conservation law for a broad class of queueing disciplines, showing how expected waiting times can be redistributed across customer classes under work-conserving policies. Coffman Jr and Mitrani (1980), Shanthikumar and Yao (1992) further characterize the achievable-region of waiting times in queueing system. Regarding the optimal priority allocation, Smith (1956) shows that -rule is optimal in a deterministic, static environment, and is extended to different queueing settings by Klimov (1975), Van Mieghem (1995). For more general settings in M/G/1 queues, Scully and Harchol-Balter (2021) provide a general proof showing that the Gittins Policy is optimal.
When customers have private information, priority auctions or pricing policies have been developed to construct efficient priority allocations. Kleinrock (1967) is one of the first papers to study priority auction. Each customer bids a price, and will be placed into a position in front of all customers with lower bid and behind all customers with higher bid. Lui (1985) extended the model by deriving customers' bid functions in equilibrium. Afèche and Mendelson (2004) further study social welfare- and revenue-maximizing auctions under generalized delay cost, and Kittsteiner and Moldovanu (2005) study priority auctions when the job processing time is private information.
More recently, Yang et al. (2017) study how to design mechanisms for customers to trade their positions in the queue. Regarding priority pricing in queues, Mendelson and Whang (1990) provide an optimal mechanism assuming customers with private information on expected service times and waiting sensitivities. Following this, Van Mieghem (2000) develops incentive compatible scheduling rules under more general delay-cost curves. Afèche (2013), Afèche and Pavlin (2016) consider revenue maximizing policies, showing that strategically delaying patient customers can increase the seller's revenue under certain conditions. Lin et al. (2024) show strategic delay can also increase the revenue in a dynamic setting. Freund and Weng (2024) analyze the Dedicated Docket in U.S. immigration courts, which creates a separate fast-track queue for certain immigration proceedings. Afèche et al. (2019) show that demand-frequency heterogeneity can make it optimal to prioritize one customer class over another even when the two classes have identical waiting costs. Their results provide a similar insight to ours: delay sensitivity is not the only driver of priority.
The key difference between our model and priority design literature is that service requirements are typically primitives, whereas in our model they are chosen by the decision-maker. As a result, the priority order is endogenous: changing service depth changes both the congestion externality and the priority order.
Queueing for AI Systems. There is growing interest in LLM scheduling and queueing theory for AI systems. Zheng et al. (2023), Fu et al. (2024), Bari et al. (2025) develop algorithms to efficiently schedule different jobs for LLM inference. Mitzenmacher and Shahout (2025) survey recent work on queueing systems with predictions and discuss open problems in LLM scheduling, emphasizing predicted service times, variable inference durations, memory constraints, and preemption. Li et al. (2025), Ao et al. (2025) model LLM inference into a queueing problem, providing algorithms to achieve optimal or near-optimal throughput. Lee et al. (2024), Legros and de Véricourt (2026), Yang and Roet-Green (2026) consider human-AI interaction in queueing systems, providing insights on how AI impacts congestion.
Recent work at the intersection of AI service operations and pricing studies how providers route requests, allocate service capacity, and design contracts under quality uncertainty and congestion. Guo et al. (2026) formulate the allocation of requests across LLM models as a routing problem and characterize the optimal routing policy. Lobel et al. (2026) study pricing AI as a service, and compare two different pricing mechanisms: conversation-based pricing and outcome-based pricing. Feldman et al. (2026) further consider the pricing problem in human-AI services, showing the relationship between congestion, human capacity, AI capability and AI observability. More closely related to our setting, Abdolmaleki et al. (2026) study a queueing model for agentic AI service systems in which customers differ in their valuations of service. They show that, under the optimal mechanism, higher-value jobs receive weakly longer sojourn times and more inference-time compute. Our model differs from theirs in several important aspects. First, we model customer heterogeneity through delay sensitivities rather than service valuations. Second, they assume that service quality is determined directly by the realized service time, whereas we introduce service depth as a decision variable and model the realized service time as a random outcome conditional on the chosen service depth. Finally, they use a fluid approximation to study the structure of the optimal policy, whereas we derive exact structural characterizations through steady-state analysis.
3. Problem Formulation
3.1. Queueing Framework
We consider a single-server queue where customers arrive according to a Poisson process with arrival rate . Each customer brings a task that will be processed by the server. Each customer is assigned a service depth , representing the amount of effort devoted to processing the task. A larger service depth corresponds to more intensive processing and potentially higher service quality. We assume that when , the actual service time is exponentially distributed with a service rate , so that the expected service time equals . The case represents no service: the customer leaves the system immediately and receives zero service.
A customer assigned service depth generates service value upon completion. Notice that the value function depends on the service depth, not the actual service time of a customer. We assume that is (weakly) increasing, (weakly) concave, continuous and twice-differentiable on , with . These assumptions capture that service value is nonnegative and that larger service depth generates weakly higher service value, with weakly diminishing returns.
Customers are price- and delay-sensitive and heterogeneous in their delay sensitivities. A customer's type is represented by , which denotes the cost per unit time while the customer is present in the system. We assume that is drawn independently from a known distribution . Let denote the set of possible delay sensitivities among customers. In Section 4, we assume that , and follows a two-point distribution, while in Section 5, we assume that , and follows a continuous distribution.
In this paper, we focus on the social welfare maximization problem. Social welfare is the long-term average service value generated by the system, net of customers' delay costs. For any feasible policy, let and denote the service depth and expected sojourn time received by type under that policy. If type does not enter the system, we set . The social-welfare objective is then
Welfare maximization chooses a stable and operationally achievable allocation to maximize W. We assume that the arrival rate , the value function and the distribution of customers' types F are public information.
3.2. Centralized Benchmark
We first study a centralized benchmark in which the decision maker directly observes customer types and implements a stationary policy along two dimensions:
-
Service depth assignment. The centralized decision maker selects a type-dependent service depth to each type of customers. We restrict attention to assignments that depend only on customer type and not on the current queue state.
-
Priority rule. The centralized decision maker selects a scheduling policy governing which customer is served at each point in time. We allow a broad class of preemptive scheduling policies, including pure priority rules, randomized scheduling policies, and non-work-conserving policies that may intentionally idle the server or strategically delay certain customer types.
We emphasize that our formulation of the priority rule is more general than pure priority orderings. For example, when two customer types are present, the decision maker may implement FCFS, randomize over which customer type receives priority, or intentionally delay serving one type even when the server is available. Pure policies that always prioritize one type over the other are special cases of our formulation. Note that under our assumption of service time being exponential in x, the remaining service times for all jobs of a given customer type are i.i.d., and without loss of generality we assume that the server serves them in the first-come, first-served order.
Although the primitive decision includes the priority rule, the priority rule affects the objective only through the expected sojourn times it induces. Therefore, the decision maker's allocation can be represented by two type-dependent functions:
The function maps a customer with delay sensitivity to a chosen service depth , and maps a customer with delay sensitivity to their steady-state expected sojourn time . This representation can be interpreted as follows. The decision maker directly chooses the service depth assignment and a priority rule. Together, these two choices generate a sojourn time function . For social welfare, the detailed identity of the priority rule matters only through this induced function, so we can equivalently optimize over pairs , provided that is consistent with some priority rule under the chosen service depths.
Under this representation, we must ensure that the pair is feasible. First, the service depth assignment must satisfy the stability condition
so that the long-term workload brought to the server is less than its capacity. We also require the second moment
to ensure sojourn times for every type of customers are finite. Such conditions are stated as Assumption 1 for the continuous-type model. Moreover, the sojourn-time function must be operationally feasible: there must exist a priority rule such that, under the service-depth assignment , the induced expected sojourn time of type- customers is exactly . We characterize this by the achievable region approach developed by Coffman Jr and Mitrani (1980).
3.3. Decentralized Mechanism
We next consider a decentralized setting in which a customer's type is private information. In this setting, the decision maker can set service prices to influence customers' behavior. For a type- customer, let w denote the expected sojourn time of the customer and p denote the service price paid by the customer. Given a service depth x, the customer receives expected surplus
We allow the payment p to be negative, representing a transfer from the server to the customer. Prices do not enter the welfare objective because they are transfers between customers and the service provider.
When the decision maker does not observe directly, we adopt a direct-mechanism approach. The decision maker offers a menu of contracts from which customers select. Upon arrival, the customer observes the menu and reports their delay-sensitivity , and then the server assigns the corresponding option to them. We assume that customers do not observe the current state of the queue and make their decisions solely based on their expected surplus.
Similar to the centralized policy, the menu must be operationally achievable. Moreover, the menu must be truthfully implementable. We impose these requirements as follows. First, under truthful reporting, the induced queue must be stable. Second, under truthful reporting, the announced sojourn time in the menu must coincide with the steady-state expected sojourn time of customers who report . Third, truthful reporting must be an equilibrium of the induced steady-state system. More precisely, customers make their decisions based on the announced sojourn times, and these decisions must be the best responses to the induced steady state, in which the announced sojourn times are exactly the steady-state expected sojourn times generated by the given service-depth assignment and priority rule. Such consistency requirements are standard in the literature (Afeche 2013, Afeche and Pavlin 2016). To ensure participation and truthful reporting, the menu must satisfy the individual rationality (IR) and incentive compatibility (IC) constraints:
If a customer is indifferent among multiple reports, we assume that they report their type truthfully.
4. Two-Type Model
In this section, we assume there are two types of customers in the system, indexed by . Type 1 is more delay sensitive than type 2, with delay cost parameters ; equivalently, type 1 can be interpreted as the impatient type and type 2 as the patient type. For notational simplicity, we write , , for . Customer types are i.i.d., with probability of being the impatient type and probability of being the patient type. Accordingly, the type-specific arrival rates are
All proofs in this section are deferred to Appendix A.
First, we characterize all feasible policies in the two-type model. For a given service depth assignment , let denote the workload generated by type customers. The service depth assignment is stable only if . To mathematically characterize all the priority rules, we directly apply Theorem 2 from Coffman Jr and Mitrani (1980) that gives all the operationally feasible sojourn times :
4.1. Centralized Optimum
The centralized welfare-maximization problem can be written as
where the first three constraints ensure the sojourn time is operationally feasible and the last constraint ensures the queue is stable.
Lemma 1 states the classic result that -rule is the optimal priority rule for an M/M/1 queue with fixed service depth and delay sensitivities, which was first developed by Cox and Smith (1961).
LEMMA 1 (cμ-rule). Fix an admissible service depth assignment . Among all feasible priority rules, an optimal rule is work-conserving and gives priority to the type with the smaller ratio .
The classic result applies because the only thing remaining once the service depths are fixed is to minimize delay costs. It is classical in form but new in its implication here. In standard priority models, service requirements are primitives, so the index ranks fixed types. In our setting, Lemma 1 implies that, once is fixed, the priority rule is pinned down endogenously to one of the two pure priority orderings, and the expected sojourn times are functions of . Hence the centralized problem can be analyzed by comparing the two candidate priority regimes induced by the service depth assignment. For simplicity, when the two types are tied under the -rule, we assume type 1 customers receive priority.
If service depths were fixed exogenously, the -rule would prioritize the type with smaller . Since type 1 customers have larger delay sensitivity, one would expect type 1 customers to receive priority whenever service depths are comparable. However, this intuition no longer holds when service depth is an endogenous decision variable. Proposition 1 shows the characterization of the welfare-maximizing policy when the value function is linear.
PROPOSITION 1. Suppose with . The centralized optimum has the following structure:
-
If , then it is optimal to set and .
-
If , then both types receive strictly positive and finite service depth. Moreover, there exists a unique threshold such that when , the optimal service depth assignment satisfies
(2)
and type 1 customers are prioritized; when , the optimal service depth assignment satisfies
and type 2 customers are prioritized. Moreover, the threshold c is decreasing with respect to a, and .
Proposition 1 characterizes three different regions of the optimal policy, which is also illustrated in Figure 1a. When the delay sensitivity of impatient customers is too high (the green region in Figure 1a), it is no longer valuable to keep them in the system, therefore type 1 customers receive zero service depth; when the delay sensitivity of impatient customers is lower than a certain threshold, it is still valuable to keep them in the system. In this regime, however, the resulting priority structure splits into two distinct cases. When patient customers are scarce (the blue region in Figure 1a), the intuitive ranking prevails: the impatient type receives priority. However, when patient customers are sufficiently abundant (the red region in Figure 1a), the decision maker optimally gives the patient type smaller service depth and serves them first. Figure 1b further illustrates the reason why such a threshold exists when . Each curve represents the maximum social welfare achievable under a given priority rule, where service depths are chosen optimally. As increases, the value of prioritizing type 2 customers increases, while the value of prioritizing type 1 customers decreases. Consequently, when is above a certain threshold, social welfare is larger if patient customers are prioritized.
Figure 1 Visualization of Proposition 1.
(a) Different Regions of the Optimal Policy.

Note: The parameters are , and . We adjust by controlling , and adjust by using different .
(b) Welfare under Different Priority Rules.

Note: The parameters are , , and . We adjust by using different . Here, , , .
Proposition 1 shows that optimal policy is not only determined by the delay sensitivities alone, but also highly related to the size of each customer type. The intuition is that the population size of each customer type plays a crucial role in determining congestion externalities. Increasing the service depth of a high-volume type generates a large increase in aggregate delay throughout the system, i.e., there will be a lot of customers with larger service depth assignments waiting in the queue. As a result, the decision maker has a greater tendency to assign lower service depth to high-volume types. If the patient type is prevalent enough, this service-depth reduction can make its -index larger than that of the impatient type, leading the planner to prioritize the patient type.
Proposition 1 assumes linearity of the value function, but provides insight into when patient customers are prioritized in the optimal centralized policy: impatient customers are valuable to receive service but have relatively small population. Proposition 2 shows that, for nonlinear value functions, similar structure holds.
PROPOSITION 2. Let denote the welfare-maximizing workload when all the customers have delay sensitivity , i.e.,
If the asymptotic value per unit depth satisfies
then there exists such that if , the centralized optimum gives priority to type 2 customers.
Since is non-negative, weakly increasing and weakly concave, is non-negative and weakly decreasing. Therefore, exists. Condition (3) imposes a lower bound on this limit and can be interpreted as requiring that serving type-1 customers remains socially valuable, even when very large service depths are assigned. In the linear value case, Condition (3) becomes , which is equivalent to the condition in which type-1 customers are not excluded.
4.2. Optimal Decentralized Mechanism
When delay sensitivities are private information and customers are self-interested, the server offers a menu of prices and service allocations to maximize the long-term average welfare. In the two-type setting, the menu M needs to contain at most two different options and , where option i is intended for customers with delay sensitivity . Here is the service depth, is the steady-state expected sojourn time, and is the price paid by a customer who chooses option i. We allow either option to be the outside option . The definition of incentive compatibility directly yields Lemma 2, which characterizes the set of all implementable menus.
LEMMA 2. Fix an operationally feasible allocation with service depth and sojourn time pairs and . There exists an incentive compatible price menu with corresponding payments if and only if .
The decentralized welfare-maximization problem can be written as
Compared to (1), one incentive compatibility constraint is added in (4). Any feasible solution of (4) corresponds to a menu , where the prices satisfy
If we fix the payment rule to be (5), we can characterize the optimal decentralized policy. Proposition 3 presents the structure of the optimal menu under linear value function and compares it with the optimal centralized policy.
PROPOSITION 3. Suppose , where . Let denote the priority threshold defined in Proposition 1.
- If , then the optimal menu is
- If then the optimal menu is
where satisfies condition (2). Consequently, when , the optimal price menu gives strictly lower long-term average social welfare than the optimal centralized policy.
Moreover, the payment .
Proposition 3 shows an interesting structure of the optimal menu: type 1 customers are always prioritized. When the optimal centralized policy satisfies , the same allocation rule is achievable by a price menu. When the optimal centralized policy prioritizes type 2 customers, it violates the incentive compatibility constraints. In this case, the decision maker has two natural incentive compatible alternatives. One is to optimize over allocations that prioritize type 1 customers. The other is to keep service depths for which type 2 customers would have higher priority under a centralized decision maker, but then distort the sojourn times to satisfy , which forces the solution to the boundary . Proposition 3 shows that the first alternative always dominates the second. Thus, the optimal menu always gives impatient customers a lower service depth and higher priority.
Proposition 3 reveals a new price of decentralization. It identifies the precise region in which operational efficiency and incentive compatibility conflict. A policy that prioritizes patient customers may be operationally efficient, but it is not incentive compatible as a menu: the decision maker cannot force impatient customers to choose a contract that results in a longer wait. Whenever such a policy is optimal from the centralized decision maker's perspective, a welfare gap emerges between the centralized optimum and the optimal decentralized mechanism.
DEFINITION 1 (WELFARE GAP). Let denote the optimal social welfare achieved by the centralized decision maker, and let denote the optimal social welfare of the server's menu. If , the welfare gap is defined as the normalized difference between and , i.e.,
Otherwise, define .
In the case in which such a welfare gap exists (the red region in Figure 1a), it remains important to understand how good the decentralized mechanism is. Proposition 4 quantifies the welfare gap, showing that loss from the incentive compatibility constraint is bounded.
PROPOSITION 4. Suppose , where . Denote by the optimal social welfare achieved by the centralized decision maker, and the optimal social welfare of the server's menu. Then
Moreover, for any , there exists an instance such that
thus the bound is tight.
Proposition 4 provides a worst-case characterization of the welfare gap. In the decentralized problem, the optimal menu leads to the same welfare as the best policy conditional on prioritizing type 1 customers. Thus, when the centralized optimum instead prioritizes type 2 customers, the welfare gap is the loss from replacing the centralized allocation with the best allocation that prioritizes type 1. In the worst case in which type 1 customers are extremely rare, the decentralized mechanism behaves like the system that drops type 1 and serves only type 2: type 1 customers receive nearly zero service depth and most of the welfare comes from serving type 2. In contrast, in the centralized setting, the decision maker still extracts welfare from rare type 1 customers by giving them deep but slow service. The formal proof compares the limiting welfare of these two policies and establishes a tight bound that shows that, in the decentralized setting, the mechanism can lose up to of the social welfare compared to the centralized benchmark, i.e., the worst-case welfare gap .
5. Continuous-Type Model
In this section, we assume the customer type is drawn from a continuous distribution. A customer's type is their delay-cost parameter , now drawn independently from a commonly known continuous distribution supported on . We assume the probability density function satisfies for all . All proofs in this section are deferred to Appendix B.
A service depth assignment assigns a type-dependent deterministic service depth for each . Mathematically, the service depth is a measurable function
As before, represents instantaneous completion with zero service value.
ASSUMPTION 1. A service depth assignment is admissible if
The first condition is the stability condition. The second condition guarantees finite expected sojourn times under the priority rules considered below. Notice that service times are still exponentially distributed conditional on the assigned mean ; what is deterministic here is the service depth assignment as a function of type.
For a given service depth assignment and a priority rule, let denote the expected sojourn time of a type- customer. In the continuous-type setting, the finite-class achievable region result in Coffman Jr and Mitrani (1980) can be generalized to Lemma 3, which has also been proved in Abdolmaleki et al. (2026).
LEMMA 3. Fix a stable service depth assignment . A nonnegative measurable sojourn-time function with is operationally achievable by some priority rule if and only if for any measurable
5.1. Centralized Optimum
In the centralized benchmark, the decision maker observes each customer's delay sensitivity , chooses a deterministic service depth assignment , and then schedules customers using a priority rule. The decision maker's welfare-maximization problem can be written as
(6)
By the same -rule argument as in Lemma 1, once the service depths are assigned, an optimal priority rule ranks customers in increasing order of . We therefore focus on the service depth assignment problem.
Proposition 5 shows that for a continuum of types of customers, the optimal policy will prioritize customers with larger delay sensitivities and the service depth assignment is non-increasing with respect to .
PROPOSITION 5. Fix any feasible centralized allocation . There exists a feasible centralized allocation with non-increasing that achieves weakly higher long-term average social welfare. Consequently, the optimization problem can be restricted without loss to deterministic non-increasing service depth assignments. Under any such assignment, the decision maker gives priority to customers with larger delay sensitivities.
Proposition 5 says that the decision maker should sort service depth against urgency, where more delay-sensitive customers receive the smaller service depth. Such a structure is fundamentally different from the two-type case. With only two positive-mass types, the decision maker may sometimes move the entire patient type ahead of the impatient type; however, in the continuous-type model, more delay-sensitive customers are always in front of less delay-sensitive customers.
This contrast can be interpreted as the value of personalization. Suppose, for example, that a continuous distribution is concentrated around two regions of delay sensitivities. If the decision maker can still choose service depths separately for each realized type, Proposition 5 applies and the monotone rearrangement remains feasible. If instead the decision maker pools all customers in each region and assigns one common service depth to each pool, then it becomes a two-type model, and the pattern in Proposition 1 may appear. We provide a more detailed comparison between the two-type model and the continuous-type model and show that the rearrangement is available for the two-type model with randomized service depth in Section 8.2.
Under a non-increasing assignment , the ratio is also non-increasing in . Hence the -rule is equivalent to giving higher priority to customers with larger delay sensitivities. The expected sojourn time of type is therefore
The first term is the congestion created by customers with higher priority than type . The second term is the effective service requirement of type after accounting for interruptions by higher-priority arrivals.
Substituting (7) into (6), the centralized problem becomes
where is an admissible and non-increasing function.
Problem (8) optimizes over an infinite-dimensional space, making closed-form solutions difficult to obtain. A trivial case arises when . For every type of customer, the expected sojourn time is at least the service depth. Moreover, by concavity of ,
for every . Hence, the maximum welfare is zero. Therefore, we focus on the nontrivial case in which . Proposition 6 provides conditions that characterize the existence of an optimal solution.
PROPOSITION 6. 1. If , where , then the optimal solution of (8) is degenerate, and the long-term average social welfare supremum is , but is not attained.
- If is continuously differentiable and , then there exists a continuous and non-increasing optimal solution of (8).
When the value function is linear, serving different customers generates the same value per unit of service depth. As a result, it is always better to spend all service capacity to the most patient type of customer and have all other customers leave immediately. This leads to a degenerate service depth allocation: , while for all . The degeneracy does not exist in the two-type model because both types have strictly positive arrival rates. If the decision maker assigns an infinite service depth to one type of customer, the resulting workload diverges and violates the stability constraint. On the other hand, when , the service depths of all types of customers are uniformly bounded. Therefore, the optimal service depth assignment exists.
5.2. Optimal Decentralized Mechanism
We next consider the decentralized setting, where is private information. The server offers a menu
Lemma 4 is the continuous-type counterpart of the two-type incentive compatibility result. It shows that incentive compatibility is governed entirely by the ordering of sojourn times.
LEMMA 4. Suppose type customers choose option . There exists an incentive compatible pricing policy if and only if is non-increasing in . Moreover, if is non-increasing, one implementing payment rule is
Combining Proposition 5 and Lemma 4 gives the main conclusion of the decentralized setting.
PROPOSITION 7. If the centralized welfare supremum in the continuous-type setting can be achieved by some admissible , it can also be achieved by a decentralized pricing menu. In particular, if is the optimal solution of (8), then the menu
is optimal, where is given by (7) and . Moreover, .
Proposition 7 states that in the continuous-type setting, there is no welfare gap between the mechanism and the benchmark. The centralized allocation already has the correct monotone geometry. Queueing efficiency ranks customers by , while incentive compatibility requires sojourn time to be non-increasing in . Under the optimal service depth assignment, both rankings agree: delay-sensitive customers receive shorter service, higher priority, and shorter sojourn time.
6. Numerical Examples
In this section, we provide numerical examples for both the two-type and continuous-type models, where closed-form optimal solutions are generally not available.
6.1. Welfare Gap in the Two-Type Model
In Section 4, we develop theoretical analysis on the welfare gap between the centralized optimum and the optimal price menu, showing a worst-case bound for linear value functions. The numerical results below complement this analysis by examining the magnitude of the welfare gap under different value functions and model parameters. Importantly, the results show that the welfare gap is not an artifact of the linear value function: positive gaps also arise under strictly concave value functions.
Table 1 reports how the welfare gap varies with the population ratio . Across all value functions, the gap is zero when . In this regime, type 2 customers are not sufficiently prevalent, and the centralized optimum already satisfies the incentive compatibility constraints that the impatient type receives a weakly shorter sojourn time, so the centralized allocation can be implemented by a price menu. As increases, it becomes more attractive for the centralized decision maker to assign type 2 customers a smaller service depth and give them priority. When this priority reversal occurs, the centralized allocation violates incentive compatibility and a positive welfare gap can appear.
The magnitude of the gap strongly depends on the value function. For the linear value function , the welfare gap increases as gets larger, reaching when . In contrast, for the concave value functions, the gap is much smaller and need not be monotone in . Intuitively, for linear value functions, the marginal value of service is constant, so the decision maker can assign deep service to type 1 customers while using priority to reduce delay for type 2 customers. However, when the value function is strictly concave, the marginal benefit of assigning very deep service becomes small, reducing the benefit from prioritizing type 2 customers.
Table 1 Welfare gap across under different value functions
| Value function | |||||||
|---|---|---|---|---|---|---|---|
| 0.5 | 1.0 | 2.0 | 4.0 | 8.0 | 16.0 | 32.0 | |
| 0.0% | 0.0% | 3.7% | 8.9% | 12.5% | 14.8% | 16.2% | |
| 0.0% | 0.0% | 0.0% | 0.5% | 0.6% | 0.5% | 0.3% | |
| 0.0% | 0.0% | 0.2% | 1.5% | 1.9% | 1.6% | 1.1% | |
| 0.0% | 0.0% | 0.0% | 0.8% | 1.0% | 0.8% | 0.5% | |
Note: The parameters are , , .
Table 2 presents the welfare gap across different delay-sensitivity pairs when fixing the arrival rates of each customer type. When and are close, the benefit of serving the large patient type first dominates the relatively small difference in delay costs, so the centralized decision maker prefers a priority order that violates incentive compatibility. As the two types have a bigger difference in their delay sensitivities, prioritizing the impatient type becomes increasingly valuable for the centralized decision maker, and the conflict between centralized efficiency and incentive compatibility disappears.
Table 2 Welfare gap across under different value functions
| Value function | ||||
|---|---|---|---|---|
Note: The parameters are , , .
6.2. Examples for the Continuous-Type Model
For a general concave value function , it is difficult to obtain the closed-form optimal service depth assignment. In this subsection, we numerically study the optimal service depth assignment of Problem (8). We consider a discrete version of (8):
over the stability constraint , where represents evenly spaced quantiles of a distribution with cumulative distribution function . For instance, if is a uniform distribution on , then . Problem (10) is equivalent to the problem in which there are different customer types with the same arrival rate and delay sensitivities , conditional on the service depth assignment being non-increasing. In the experiments, we set .
Figure 2 shows the optimal service depth assignment for a square root value function, where Figure 2a presents the optimal solution, Figure 2b presents the corresponding sojourn time, Figure 2c plots the welfare contribution and customer surplus for each type and Figure 2d presents the corresponding payment according to (9). In this case, the service depth is strictly decreasing with respect to . Moreover, all types of customers receive positive service depths. This is because , so no matter how large is, the initial increment in service value for a new customer will dominate customers' delay cost.
To understand how each type of customers contributes to the welfare, Figure 2c plots the welfare contribution for each type of customers. Although less delay sensitive customers receive larger surplus under the implementing menu, the welfare contribution by each type of customer is not monotone in . The intuition is that customers with larger delay sensitivities receive a bundle with two offsetting changes: they receive smaller service depth, which reduces service value, but they also receive shorter sojourn time, which decreases their delay cost. The value of the reduction in sojourn time dominates the loss in service value for less delay sensitive customers, so the welfare contribution initially increases with . For more delay sensitive customers, the loss
Figure 2 Optimal Solution for .
(a) Service Depth.

(b) Sojourn Time.
(c) Welfare & Surplus.
(d) Payment.
Note: The parameters are , .
in service value dominates the value of the additional reduction in sojourn time, so the welfare contribution decreases with .
Figure 2d shows that the payment is also not monotone with respect to . The payment reflects the same two offsetting bundle effects: more delay sensitive customers receive smaller service depth, which pushes the payment downward, but they also receive shorter sojourn time, which pushes the payment upward. The non-monotonicity of welfare contribution and the non-monotonicity of payment are driven by the same underlying trade-off between service value and delay cost, but they are not identical. Since the payment equals the welfare contribution minus the surplus, it subtracts this information rent from the welfare contribution.
Figure 3 shows the results for a logarithmic value function. In this case, we observe that when is above a certain threshold, the optimal policy allocates zero service depth for this type of customers. This is because is finite, so for customers whose delay sensitivities are high, it is not worthwhile to keep them in the system. Similar to the results for the square root function, the welfare contribution and the payment are not monotone with .
Figure 3 Optimal Solution for .
(a) Service Depth.

(b) Sojourn Time.
(c) Welfare & Surplus.
(d) Payment.
Note: The parameters are , .
7. Case Study
To complement the stylized numerical studies in Section 6, we calibrate an agentic AI service system using published trials of a coding agent on software-engineering tasks. We use reasoning effort as service depth, task success as service value, and token-based expenditure as a proxy for service time. We then use these empirically measured quantities to build the queueing model and evaluate different service-depth and priority policies. This experiment provides a closer connection between our theoretical framework and its motivating application to agentic AI systems.
7.1. Data
We use the DeepSWE v1.1 benchmark (Huang et al. 2026), which contains 113 software-engineering tasks across 91 repositories and five programming languages. Each task asks the agent to modify a repository to implement specified behavior; executable verifiers assess the resulting code. For example, a task may require adding configuration-file support to a command-line library. This provides a setting in which a service request involves several steps of code inspection, modification, and testing.
We use the published GPT-5.6 Sol trials under the mini-swe-agent harness. The five service depths correspond to low, medium, high, xhigh, and max reasoning effort; denotes no service. The same 113 tasks are evaluated four times at each depth, giving 452 trials per depth and 2,260 trials in total. Each trial records a binary success outcome, token usage, and monetary cost. Four non-verifiable trials were omitted from the publisher's score due to timeouts. We retain their recorded costs but assign them a service value of 0. Thus every depth is calibrated on the same tasks and number of attempts.
7.2. Empirical Calibration
For task j, repetition r, and depth , let denote the indicator that the agent successfully solves the task. We estimate service value at depth by the empirical success rate
Let be the trial's recorded token-based monetary cost. We use this monetary cost to measure service time, denoted by . This choice is motivated by the fact that token-based expenditure provides a consistent measure of the computational effort required to process a request. We therefore assume that service time is proportional to expenditure:
Benchmark and methodology: https://deepswe.datacurve.ai/blog/deepswe. The versioned trial export is https://deepswe.datacurve.ai/artifacts/v1.1/trials.json.
We choose such that the mean service time across the 2,260 trials equals 1. Table 3 and Figure 4 report the calibration. Increasing reasoning effort from low to max, success rises from 45.4% to 72.3%, while mean service time increases from 0.276 to 2.148.
Table 3 Empirical calibration by reasoning effort.
| Depth | Effort | Mean Cost (USD) | |||
|---|---|---|---|---|---|
| low | 0.454 | 1.074 | 0.276 | 0.094 | |
| medium | 0.611 | 1.862 | 0.478 | 0.297 | |
| high | 0.692 | 3.467 | 0.890 | 1.009 | |
| xhigh | 0.706 | 4.708 | 1.208 | 1.842 | |
| max | 0.723 | 8.370 | 2.148 | 6.632 |
Figure 4 Service Value and Mean Service Time by Reasoning Effort.
(a) Service Value.

(b) Mean Service Time.

Note: Each point averages the 452 trials at that reasoning effort. Service time is with .
Rather than assuming the service time follows an exponential distribution, we use the empirical distribution directly in the case study. Specifically, conditional on assigning service depth , a customer's service time is drawn uniformly at random from the 452 observations, independently of customer delay sensitivity. Figure 5 shows these distributions.
We assume a job's realized service time is unknown until completion. As in the theoretical analysis, we restrict attention to deterministic policies that assign each customer type a service depth. Because the service time is unknown when processing begins, we restrict attention to scheduling rules that use only customer types: FCFS, and nonpreemptive priority order across types. These policies are easier to implement than policies that require tracking the progress of each job in service. Within each customer type, service follows FCFS.
Figure 5 Empirical service-time distributions across reasoning depths.

Note: Each panel contains 452 trials, with service time constructed as . Dashed lines mark the means. Histograms use a common bin width of 0.05.
7.3. Two-Type Results
We first consider two customer types, consistent with Section 4. Each type receives a deterministic depth, and scheduling is FCFS or nonpreemptive priority to either type. We exhaustively evaluate policies: 75 with both types served, 10 with only one type served, and the policy with neither type served. The optimal menu is the best of these policies satisfying incentive compatibility, which requires because type 1 is more delay-sensitive. We also construct prices and verify individual rationality and all incentive constraints.
Figure 6 reports the optimal centralized policy, the optimal incentive-compatible menu, and the resulting social welfare as the arrival rate varies. As demand increases, the decision maker first reduces reasoning effort, and then begins to exclude customers. In three windows, , and , the centralized policy prioritizes patient customers. This is because the impatient type accounts for three quarters of the population and generates most of the service value, making it more valuable to serve this type with larger depths. When demand grows further, the impatient type itself becomes too congested, and the decision maker switches to serving the patient minority with larger depths. Therefore, welfare gaps exist in these windows and lead to a 53.4% welfare loss in maximum.
Figure 7 varies the composition of demand at a fixed total arrival rate, with the same delay sensitivities as in Figure 6. Below a ratio of approximately 1.04, impatient customers receive low
Figure 6 Comparative Statics with Respect to .
(a) Centralized Optimum.

(b) Optimal IC Menu.

(c) Welfare.
Note: , , , and . The shaded regions in panel (a) indicate , including assignments that exclude the patient type. When both types are served, these regions give priority to the patient type. Panel (b) gives the impatient type priority whenever both types are served. Priority is nonpreemptive throughout.
effort and priority, while patients receive medium effort. Above a ratio of approximately 1.10, the assignment reverses: the patient majority receives low effort and priority, and the impatient minority receives medium effort; in between, both types receive low effort. Serving everyone at medium would overload the server, and the decision maker can afford it for only one type. Giving the deeper service to the smaller group saves capacity; once patients form a sufficiently large majority, this saving outweighs the impatient type's higher delay cost. This reproduces the priority inversion in Proposition 1.
The optimal IC menu continues to prioritize impatient customers. It can still give them deeper service, provided their sojourn remains shorter than that of patients. Such a policy leads to a welfare gap that reaches 3.28%. Together, the two experiments illustrate how population composition affects both whom to serve and whom to prioritize.
7.4. Continuous-Type Results
We next consider a continuum of customer types, following the theoretical analysis in Section 5. Similar to Section 6.2, we discretize the population to types with delay sensitivities at quantiles of , each arriving at rate . As in Section 7.3, each type is assigned a service depth in and a priority without preemption.
We first compare the joint design with three benchmarks: depth-only design, which assigns type-dependent depths but serves customers FCFS; priority-only design, which assigns a common depth to all types and prioritizes by delay sensitivity; and a design that does neither. Figure 8a reports the welfare of the four designs as the arrival rate varies. When the arrival rate is low, the four designs are nearly indistinguishable: the server is rarely congested, so neither decision has much to act on. For , priority becomes the more valuable decision. The joint design gives
Figure 7 Comparative Statics with Respect to .
(a) Centralized Optimum.

(b) Optimal IC Menu.

(c) Welfare.
Note: , , and . The ratio ranges from 0.1 to 10, symmetrically around 1 on a logarithmic axis. The shaded region in panel (a) gives priority to the patient type; the impatient type has priority otherwise.
every type medium effort, so priority alone attains the welfare of the joint design. When the arrival rate is extremely high, service depth becomes the decision that matters. Designs with a common depth must serve every customer or none, whereas type-dependent depth keeps the system viable by withholding service from delay-sensitive customers.
Figures 8b and 8c show the mechanism at , where the four designs assign different service depths. The design that does neither give every customer low effort, and priority-only gives every customer medium effort. Both personalized designs give medium effort to the relatively patient customers and low effort to the rest. Under FCFS, every served customer bears the same waiting time, so the congestion from deeper service falls on everyone, and depth-only design gives medium effort only to the 35% most patient customers. Priority shields the most delay-sensitive customers from this congestion: the joint design gives medium effort to the 60% most patient customers, while the sojourn time of the most delay-sensitive customers is 0.44, compared with 0.53 under depth-only design. The joint design attains welfare 0.589, about 7% above depth-only (0.548) and priority-only (0.547). At every arrival rate we evaluate, the joint design has nonincreasing sojourn times and is incentive compatible, in line with Proposition 7.
Finally, we quantify the value of personalization discussed in Section 5. We consider a population concentrated in two narrow clusters: 75% of the population have delay sensitivities uniformly spaced on [0.0295, 0.0305] and the remaining 25% on [0.0220, 0.0230]. The cluster means match the two-type load experiment. We analyze this population in two ways. In the two-type treatment, each cluster is one customer type that receives a single service depth and priority position. In the continuum treatment, the population is discretized into n = 40 types as above, so customers within a cluster may receive different service depths.
Figure 9a shows the resulting welfare. At , the coarse centralized policy excludes patients and attains welfare 1.215, while the optimal coarse IC menu serves patients alone and attains
Figure 8 Value of Joint Design with a Continuum of Types.
(a) Welfare.

(b) Service Depth at .

(c) Sojourn Time at .
Note: and . Panel (a) displays ; panels (b)–(c) use .
0.573. Fine personalization instead serves every patient and 80% of impatient customers, excluding only the most delay-sensitive tail (Figure 9b). This allocation is incentive compatible and attains welfare 1.336, about 9.9% above the coarse centralized optimum. Personalization thus removes the conflict between efficiency and incentive compatibility.
Figure 9 Value of Personalization for a Two-Cluster Population.
(a) Welfare.

(b) Service Depth at .

Note: , with 75% of types at midpoint quantiles of Unif[0.0295, 0.0305] and 25% at midpoint quantiles of Unif[0.0220, 0.0230]. The two-type treatment uses the cluster means and , with and . Panel (b) uses . Fine personalization allows both depths and priorities to vary within each cluster.
8. Extensions
8.1. Revenue Maximization
In this section, we focus on the revenue maximization problem. The revenue objective is
and the feasibility constraints are the same as the welfare maximization problem.
In the two-type model, the revenue maximization problem is written as
PROPOSITION 8. The revenue maximization problem is equivalent to Problem (4) with virtual delay sensitivities , .
In the continuous-type model, the revenue maximization problem is
(12)
We impose an additional assumption that the virtual delay sensitivities are monotone in . This is a common assumption in the mechanism design literature (Afeche and Pavlin 2016, Yang et al. 2017). Under this regularity assumption, the ordering of virtual delay sensitivities agrees with the ordering of true delay sensitivities. Therefore, the structural analysis for the continuous-type welfare problem can be applied after replacing by virtual delay sensitivities.
ASSUMPTION 2. The probability density function f is continuously differentiable on . Moreover, the virtual delay sensitivity
is a strictly increasing function in .
PROPOSITION 9. Suppose Assumption 2 holds. For any operationally feasible and incentive compatible allocation , the maximum long-term average revenue attainable by payments is
where . Consequently, Problem (12) is equivalent to Problem (8) with virtual delay sensitivities.
8.2. Randomized Service Depth in the Two-Type Model
In Section 4 and Section 5, we restrict our attention to policies that assign a deterministic service depth to each type of customers. This restriction creates a welfare gap with two types but not with a continuum of types. The difference stems from the decision maker's ability to tailor service depth assignments across customer types. In the two-type model, each type represents a customer group of positive mass. As a result, changing the service depth assigned to a type necessarily changes the operational role of an entire customer type. When the patient type is sufficiently large, the decision maker may prefer to assign it a smaller service depth and move it ahead in the queue. Although this reduces congestion, it reverses the sojourn time ordering required for incentive compatibility.
The continuous-type model provides substantially greater flexibility. Because types vary continuously, the decision maker can adjust service depth assignments smoothly across the type space. Rather than moving less delay-sensitive customers in front of more delay-sensitive customers in the queue, the decision maker assigns service depths monotonically, so that customers with slightly greater delay sensitivity receive slightly smaller service depth. The queue is still organized according to the same principle, but the service depth assignment can be chosen so that the ordering and the incentive compatible ordering coincide.
Motivated by this, we consider an approach that uses randomized service depths within one type of customer to close the welfare gap. In the two type case with , instead of assigning a fixed service depth to each type of customer, we assign a service depth distribution to each type of customer. When a type-i customer arrives, a service depth x is drawn from , and the realized service time for the customer is still an exponential distribution with mean x. The priority rule and the expected sojourn time will be based on the realized service depths. Proposition 10 states that under this setting, the optimal randomized service depth assignment has a monotone structure similar to the continuous-type model: the patient type receives weakly higher service depth than the impatient type.
PROPOSITION 10. Fix any feasible randomized service depth assignment and any priority rule. There exists a feasible randomized service depth assignment such that
and which, under the -rule, achieves weakly higher long-term average social welfare. Under the -rule gives priority to smaller realized service depth, so all the impatient customers have priority over patient customers.
In the decentralized setting, we implement a menu which may contain more than two options. is the set of offered depths, is the price, and is the expected sojourn time of a customer who selects depth . The provider implements the randomized assignment through contracts: a customer who chooses contract is assigned an option drawn from . We require incentive compatibility to hold after the assignment. That is, for every , a type- customer weakly prefers the assigned option to every other option in and obtains a nonnegative surplus. As before, the announced sojourn times must coincide with the steady-state sojourn times induced by these choices.
LEMMA 5. A feasible randomized assignment with sojourn times is implementable if and only if
In this case, letting , one implementing price rule is
Lemma 5 is the counterpart of Lemma 2: every option chosen by the impatient type must have a weakly shorter sojourn time than every option chosen by the patient type. By Proposition 10, the decision maker can restrict attention to assignments with exactly this property, which gives the main result of this subsection.
PROPOSITION 11. With randomized service depths, any welfare achievable by the centralized decision maker is also achievable by a price menu.
8.3. Dynamic Policies
In practice, a service system may adjust the service depth to congestion, for example by providing shallower service when the queue is long. A fully state-dependent model, in which the service depth of each arriving customer may depend on the types and assigned depths of all customers in the system, is substantially more complex. We therefore consider a simpler class of threshold policies in the two-type model that captures the main effect of congestion-dependent control. The decision maker chooses service depths , a priority rule, and a threshold N. A customer who arrives when the expected workload in the system is receives service depth ; otherwise the customer leaves immediately. The static model corresponds to . Under a threshold policy, the numbers of customers form a Markov chain on a finite state space, so the induced steady-state quantities are well defined for any .
Let denote the steady-state probability that an arrival is admitted, which is the same for both types since they are blocked in the same states, and let denote the expected sojourn time of admitted type-i customers. The social welfare is . Since and have no closed form for general , we compare the two models numerically.
Table 4 compares the optimal static and threshold policies across . Threshold control reduces the congestion of the system and improves welfare, but more importantly, threshold control reduces the welfare gap. The gap vanishes at , where the static policy already prioritizes patient customers, and stays below for larger ratios, compared with up to under the static policy. With the threshold control, the decision maker is able to keep both sojourn times short and the incentive conflict of Section 4 becomes less costly.
Table 4 Static and threshold policies across
| 0.5 | 1.0 | 2.0 | 4.0 | 8.0 | 16.0 | 32.0 | |
| Welfare gap, static policy | 0.0% | 0.0% | 0.4% | 1.7% | 2.2% | 2.0% | 1.5% |
| Welfare gap, threshold policy | 0.0% | 0.0% | 0.0% | 0.1% | 0.2% | 0.2% | 0.2% |
| Welfare improvement, centralized | 13.2% | 13.9% | 14.0% | 13.1% | 13.0% | 13.4% | 14.0% |
| Welfare improvement, decentralized | 13.2% | 13.9% | 14.5% | 15.0% | 15.3% | 15.4% | 15.5% |
Note: The parameters are , , , and . The welfare improvement is the relative increase in optimal welfare from the static policy to the threshold policy, for the centralized decision maker and for the decentralized mechanism respectively.
9. Conclusion
This paper studies the joint design of service depth and service priority in a single-server queue with heterogeneous customers. We characterize how the structure of the optimal policy depends on customers' delay sensitivities and the population sizes of different customer types, and analyze the difference between the centralized decision maker's solution and the optimal mechanism under private information. In the two-type setting, we show that the welfare-maximizing policy can have a surprising structure: the decision maker may optimally prioritize the more patient type, which violates the incentive compatibility constraints and cannot be implemented by a decentralized menu. In the continuum-of-types setting, in contrast, the price menu always matches the decision maker's policy. Our results highlight the importance of accounting for customer population sizes and allowing sufficient personalization of the policy when designing service systems.
Our work shows that increasing flexibility fundamentally changes the nature of queueing systems. In particular, when both service depths and priorities are treated as decision variables, the structure of the optimal policy differs from that in traditional queueing models. This implies that, in modern service environments such as agentic systems, it is important to develop new modeling frameworks and policies rather than relying on classical approaches. For practitioners, our results highlight a fundamental trade-off in service system design: simple mechanisms are easier to develop and implement, whereas more personalized mechanisms can substantially improve system efficiency but are typically more complex to design and operate.
Several promising directions remain for future research. On the theoretical side, it would be valuable to move beyond this framework and study more general settings, such as non-exponential service requirements, multi-server systems, and state-dependent policies. It would also be interesting to study different kinds of heterogeneity. For example, customers may differ not only in their delay sensitivities but also in the types of tasks they require, which may generate different utilities. Similarly, servers may possess varying levels of expertise across different classes of tasks, leading to heterogeneous service capabilities. Another natural extension is to allow unsuccessful or low-quality service to trigger follow up requests, as when an insufficient AI response prompts the user to ask again; service depth would then affect not only value and congestion but also the arrival rate itself, creating a feedback loop between depth choices and demand. On the application side, it remains challenging to apply such policies to real AI-agent systems. It will be meaningful to validate the theoretical insights in practical settings, develop reliable measures of AI service quality, and better understand the relationship between processing time, service quality, and system congestion in real-world agentic systems.
References
Abdolmaleki, Mojtaba, Izak Duenyas, Roman Kapuscinski. 2026. Pricing delayed agentic ai services: When high-value jobs wait longer. Available at SSRN 6721378.
Afeche, Philipp. 2013. Incentive-compatible revenue management in queueing systems: Optimal strategic delay. Manufacturing & Service Operations Management 15(3) 423–443.
Afeche, Philipp, Opher Baron, Joseph Milner, Ricky Roet-Green. 2019. Pricing and prioritizing time-sensitive customers with heterogeneous demand rates. Operations Research 67(4) 1184–1208.
Afeche, Philipp, Haim Mendelson. 2004. Pricing and priority auctions in queueing systems with a generalized delay cost structure. Management Science 50(7) 869–882.
Afeche, Philipp, J Michael Pavlin. 2016. Optimal price/lead-time menus for queues with customer choice: Segmentation, pooling, and strategic delay. Management Science 62(8) 2412–2436.
Anand, Krishnan S, M Fazil Paç, Senthil Veeraraghavan. 2011. Quality-speed conundrum: Trade-offs in customer-intensive services. Management Science 57(1) 40–56.
Ao, Ruicheng, Gan Luo, David Simchi-Levi, Xinshang Wang. 2025. Optimizing llm inference: Fluid-guided online scheduling with memory constraints. arXiv preprint arXiv:2504.11320.
Ata, Bariş, Shiri Shneorson. 2006. Dynamic control of an m/m/1 service system with adjustable arrival and service rates. Management Science 52(11) 1778–1791.
Bari, Agrim, Parikshit Hegde, Gustavo de Veciana. 2025. Optimal scheduling algorithms for llm inference: Theory and practice. Proceedings of the ACM on Measurement and Analysis of Computing Systems 9(3) 1–43.
Cobham, Alan. 1954. Priority assignment in waiting line problems. Journal of the Operations Research Society of America 2(1) 70–76.
Coffman Jr, Edward G, Isi Mitrani. 1980. A characterization of waiting time performance realizable by single-server queues. Operations Research 28(3-part-ii) 810–821.
Cox, DR, Walter L Smith. 1961. Queues. Methuen, London.
Deshmukh, SD, Suresh Jain. 1977. Capacity design and service quality control in a queuing system. Operations Research 25(4) 651–661.
Feldman, Pnina, Ella Segev, Shreyas Sekar. 2026. Pricing human-ai services: The role of observability and congestion. Available at SSRN .
Freund, Daniel, Wentao Weng. 2024. The dedicated docket in us immigration courts: An analysis of fairness and efficiency properties. Available at SSRN 4785713.
Fu, Yichao, Siqi Zhu, Runlong Su, Aurick Qiao, Ion Stoica, Hao Zhang. 2024. Efficient llm scheduling by learning to rank. Advances in Neural Information Processing Systems 37 59006–59029.
George, Jennifer M, J Michael Harrison. 2001. Dynamic control of a queue with adjustable service rate. Operations Research 49(5) 720–731.
Guo, Yuan, Stefanus Jasin, Chen-An Andy Lin. 2026. Congestion-aware static llm cascades: Analysis of a steady-state framework. Available at SSRN 6759238.
Ha, Albert Y. 1998. Incentive-compatible pricing for a service facility with joint production and congestion externalities. Management Science 44(12-part-1) 1623–1636.
Ha, Albert Y. 2001. Optimal pricing that coordinates queues with customer-chosen service requirements. Management Science 47(7) 915–930.
Huang, Wenqi, Charley Lee, Leonard Tng, Serena Ge. 2026. Deepswe: Measuring frontier coding agents on original, long-horizon engineering tasks. arXiv preprint arXiv:2607.07946.
Huang, Xu, Weiwen Liu, Xiaolong Chen, Xingmei Wang, Hao Wang, Defu Lian, Yasheng Wang, Ruiming Tang, Enhong Chen. 2024. Understanding the planning of llm agents: A survey. arXiv preprint arXiv:2402.02716.
Kittsteiner, Thomas, Benny Moldovanu. 2005. Priority auctions and queue disciplines that depend on processing time. Management Science 51(2) 236–248.
Kleinrock, Leonard. 1965. A conservation law for a wide class of queueing disciplines. Naval Research Logistics Quarterly 12(2) 181–192.
Kleinrock, Leonard. 1967. Optimum bribing for queue position. Operations Research 15(2) 304–318.
Klimov, Gennadi P. 1975. Time-sharing service systems. i. Theory of Probability & Its Applications 19(3) 532–551.
Lee, Jiung, Hongseok Namkoong, Yibo Zeng. 2024. Design and scheduling of an ai-based queueing system. arXiv preprint arXiv:2406.06855.
Legros, Benjamin, Francis de Véricourt. 2026. Human-ai interaction in congested service systems: When it improves performance, and when it doesn't. Available at SSRN 5401875.
Li, Yueying, Jim Dai, Tianyi Peng. 2025. Throughput-optimal scheduling algorithms for llm inference and ai agents. arXiv preprint arXiv:2504.07347.
Lin, Chen-An, Kevin Shang, Peng Sun. 2023. Wait time-based pricing for queues with customer-chosen service times. Management Science 69(4) 2127–2146.
Lin, Chen-An Andy, Kevin Shang, Peng Sun. 2024. Dynamic pricing and release time control for service systems. Available at SSRN 5222063.
Lobel, Ilan, Yanwei Sun, Jiahua Wu. 2026. Pricing ai as a service. Available at SSRN 6254459.
Lui, Francis T. 1985. An equilibrium queuing model of bribery. Journal of Political Economy 93(4) 760–781.
Mendelson, Haim, Seungjin Whang. 1990. Optimal incentive-compatible priority pricing for the m/m/1 queue. Operations Research 38(5) 870–883.
Mitzenmacher, Michael, Rana Shahout. 2025. Queueing, predictions, and large language models: Challenges and open problems. Stochastic Systems 15(3) 195–219.
Sapkota, Ranjan, Konstantinos I Roumeliotis, Manoj Karkee. 2025. Ai agents vs. agentic ai: A conceptual taxonomy, applications and challenges. Information Fusion 103599.
Scully, Ziv, Mor Harchol-Balter. 2021. The gittins policy in the m/g/1 queue. 2021 19th International Symposium on Modeling and Optimization in Mobile, Ad hoc, and Wireless Networks (WiOpt). IEEE, 1–8.
Shanthikumar, J George, David D Yao. 1992. Multiclass queueing systems: Polymatroidal structure and optimal scheduling control. Operations Research 40(3-supplement-2) S293–S299.
Smith, Wayne E. 1956. Various optimizers for single-stage production. Naval Research Logistics Quarterly 3(1-2) 59–66.
Snell, Charlie, Jaehoon Lee, Kelvin Xu, Aviral Kumar. 2025. Scaling llm test-time compute optimally can be more effective than scaling parameters for reasoning. International Conference on Learning Representations, vol. 2025. 10131–10165.
Stidham Jr, Shaler, Richard R Weber. 1989. Monotonic and insensitive optimal policies for control of queues with undiscounted costs. Operations Research 37(4) 611–625.
Van Mieghem, Jan A. 1995. Dynamic scheduling with convex delay costs: The generalized c—mu rule. The Annals of Applied Probability 809–833.
Van Mieghem, Jan A. 2000. Price and service discrimination in queuing systems: Incentive compatibility of gc scheduling. Management Science 46(9) 1249–1267.
Veatch, Michael H, Lawrence M Wein. 1992. Monotone control of queueing networks. Queueing Systems 12(3) 391–408.
Weber, Richard R, Shaler Stidham Jr. 1987. Optimal control of service rates in networks of queues. Advances in applied probability 19(1) 202–218.
Wei, Jason, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. 2022. Chain-of-thought prompting elicits reasoning in large language models. Advances in neural information processing systems 35 24824–24837.
Yang, Guanling, Ricky Roet-Green. 2026. On the design of an ai-human service system with strategic customers: Should ai be mandated? Available at SSRN 6475258.
Yang, Luyi, Laurens Debo, Varun Gupta. 2017. Trading time in a congested environment. Management Science 63(7) 2377–2395.
Zheng, Zangwei, Xiaozhe Ren, Fuzhao Xue, Yang Luo, Xin Jiang, Yang You. 2023. Response length perception and sequence scheduling: An llm-empowered llm inference pipeline. Advances in Neural Information Processing Systems 36 65517–65530.
Appendix
A. Proofs for Section 4
A.1. Proof of Proposition 1
By Lemma 1, we only have to consider two priority rules: prioritize type 1 customers or prioritize type 2 customers. We first reformulate the welfare objective in terms of residual capacities. We then establish the exclusion regime and characterize the candidate allocations when both types receive service. Comparing the optimized welfare under the two priority orders yields a unique switching threshold. Finally, we establish the threshold's dependence on a.
Reformulation
Suppose that the decision maker gives priority to type 1. The resulting problem is
Similarly, if the decision maker gives priority to type 2, the resulting problem is
Denote , , and . Denote . If type 1 is prioritized, the decision maker's problem reduces to
If type 2 is prioritized, the decision maker's problem reduces to
Denote as the optimal value of problem (13), and as the optimal value of problem (14).
Optimization under a fixed priority rule.
Since the optimal solution of original problem is given by one of the two priority rules, we first analyze problem (13) and problem (14) separately. Lemma 6 and Lemma 7 give characterizations of the optimal solutions of problem (13) and (14).
LEMMA 6. If , the optimal solution of problem (13) is given by , and . If , the optimal solution of problem (13) is given by
and .
Proof of Lemma 6. When type 1 customers are prioritized, problem (13) is equivalent to
By the AM-GM inequality,
Denote , then a direct calculation gives
If , for all ,
and
Hence
where the last inequality uses . Therefore is non-increasing on , so
Equality is attained at and , which yields
If , notice that has the same sign as
For all , we have . Taking the derivative of gives
Since
and
for all , . Thus, is a strictly increasing function. Since and , There exists a unique such that .
Thus, is minimized when , and the optimal solution of problem (13) is . In this case,
so .
☐
LEMMA 7. If , we have . If and , then the optimal solution of problem (14) is given by
Proof of Lemma 7. We first consider the case . If , the objective of problem (14) is bounded by
where the first inequality holds by AM-GM inequality and the second inequality holds because .
If , notice that
so the objective of problem (14) is strictly bounded above by
If ,
where the first inequality is because the left hand side is decreasing with respect to on and the constraint .
If ,
where the second inequality is due to .
Therefore, .
Next, we consider the case . When type 2 customers are prioritized, problem (14) is equivalent to
If , the optimal solution for is with objective value . Consider solution , the objective value
when is sufficiently small since . Thus, is suboptimal.
If , type 1 customers receive zero service depth. In this case, prioritizing type 1 gives strictly better social welfare. Therefore, is suboptimal.
In conclusion, the optimal policy satisfies , so both types of customers receive strictly positive and finite service depth. Moreover, since the welfare objective goes to uniformly as , the optimal solution of problem (14) is interior and satisfies the first order condition. Similar to the case where type 1 customers are prioritized, the optimal solution of problem (14) satisfies
Properties of the optimal solution.
In order to compare the two optimal solutions, we first show the following properties of and .
LEMMA 8. Suppose . is a strictly decreasing function and is a strictly increasing function. That is, for ,
Moreover, , are continuous functions with respect to r.
Proof of Lemma 8. Denote as the optimal solution of problem (13). Then for ,
The first inequality is strict because is strictly less than 1. Similarly, we can show .
For , ,
When , . Therefore, is continuous. Similarly, is continuous.
LEMMA 9. If , we have
Proof of Lemma 9. For problem (13), the objective is upper bounded by
When , solution gives social welfare
Therefore, .
On the other hand, when , , otherwise . In this case, the objective
The inequality is tight if . Therefore, .
Given the useful lemmas above, we are able to prove the full Proposition 1.
Proof of Proposition 1. Part 1: the case .
When , gives long-term average social welfare
By Lemma 6 and Lemma 7, , thus no policy with type-2 priority can outperform the candidate found above, proving Part 1.
Part 2: the case .
First, we show that both types of customers receive a strictly positive and finite service depth.
By Lemma 6, if type 1 customers are prioritized, the optimal solution can be written as
Since , we have . Similarly, if prioritizing type 2 customers is optimal, by Lemma 7 we have
and , so .
Next, we characterize the threshold for which priority rule is optimal. Denote . By Lemma 8, is a continuous and strictly increasing function. By Lemma 9, , . Therefore, there exists a unique value such that . It follows that type 1 is always optimally prioritized when , whereas type 2 is always optimally prioritized when . When , the two different solutions (one prioritizes type 1 customers and the other prioritizes type 2 customers) gives the same maximum social welfare.
Lastly, we characterize the structure of c. When r = c, problem (13) and problem (14) gives the same optimal value:
Consider the first order condition of on both sides, we have
Denote and , we have
Thus, c is only determined by u and v.
Denote as the function that maps u and v to c, we can further show is increasing with respect to u. Define
then . Moreover, given and , . Let denote the optimal solution of , and denote the optimal solution of . By the envelope theorem,
If , then for , we have
so . It remains to show that
Let . The second minimization problem can be written as
Let . At , the two minimized values are equal. Since the first objective evaluated at equals , the common minimized value is upper bounded by . If , then
therefore, .
For ,
and thus
Optimality gives
which imply . Hence is the unique crossing point of on . The sign pattern is positive for and negative for . Therefore,
If , then by the first order condition we have
However,
which contradicts the first order condition at and . Thus,
Consequently,
On the other hand, for any ,
and the inequality is tight when . Similarly,
However, in this case, the lower bound is not achievable, since it requires and v=1. Hence,
Therefore, there exists such that
which is equivalent to . This implies that , so is unbounded. In other words, .
A.2. Proof of Proposition 2
Proof of Proposition 2. Denote and let . Since is concave and , is non-increasing in , so the limit exists. Let and denote the optimal social welfare when type 1 and type 2 customers are prioritized, respectively. We first characterize the limiting value of as .
Suppose type 1 customers are prioritized. Using and , the welfare can be written as
Define
For any feasible ,
By concavity and monotonicity of V, for all ,
It follows that
Taking the supremum over all feasible gives
On the other hand, setting is feasible, so . Since as , and is continuous at , we obtain
Next, suppose type 2 customers are prioritized. Using and , the welfare can be written as
For any feasible ,
SO
Optimizing over yields
Let , then we have
thus
Therefore, there exists c > 0 such that type 2 customers are prioritized if r > c.
Proof of Lemma 2. Incentive compatibility constraints require
Therefore,
which yields .
On the other hand, if , set
the resulting menu satisfies incentive compatibility constraints.
A.3. Proof of Proposition 3
Proof of Proposition 3. Part 1: the case .
Consider menu . Under this menu, type 1 customers will choose not to enter the system, and type 2 customers will choose to enter the system. As a result, the long-term average social welfare matches that of the centralized optimum.
Part 2: the case and .
By Lemma 2, we only have to prove the optimal centralized policy satisfies . When , type 1 customers are prioritized. Therefore, the optimal policy corresponds to the optimal solution of problem (13), which is
where is the unique solution in such that
In this case,
Notice that , then we have
Part 3: the case and .
By Lemma 2, we first prove the optimal centralized policy satisfies , so that it is not incentive compatible. When , type 2 customers are prioritized for the optimal centralized policy, so we have
By Lemma 1, , so . Then,
Therefore, the optimal centralized policy does not satisfy the incentive compatibility constraints.
It remains to show that in this case, type 1 customers are prioritized. Equivalently, the optimal solution of (4) corresponds to the optimal solution of (13). For a given service depth assignment , there are two different cases.
If , from Lemma 1 the statement already holds.
If , then . The objective
so the long-term average social welfare is maximized when is minimized. By incentive compatibility, . Therefore,
so the optimal priority rule is to set
In this case, the objective
The first inequality follows from (16), the second inequality holds because the quadratic function with respect to is maximized when , and the third inequality holds because .
However, the optimal solution of (13) gives long-term average social welfare at least when we set . Thus, the allocation policy is suboptimal.
Therefore, the optimal decentralized policy will never choose such that , and will give priority to type 1 customers. In this case, the long-term average social welfare
Consequently, the optimal menu of the decentralized problem gives strictly lower social welfare than the centralized case.
Lastly, we show that the payment rule
is non-negative.
If , then
If , we have
Therefore, the optimal solution of (13) satisfies . Then
Regarding the second price,
Notice that
then
Denote
then
0
Therefore, .
A.4. Proof of Proposition 4
Proof of Proposition 4. If , .
If , we have
Then we only have to prove
which is equivalent to
Denote , then and . Then
Notice that
therefore,
On the other hand, let , , , and , then
so the bound is tight.
B. Proofs for Section 5
B.1. Proof of Lemma 3
Proof of Lemma 3. We first prove necessity. Fix any measurable subset of customers . First consider a work-conserving priority rule without holding delays. Remove all customers outside , while keeping the arrival times, realized service requirements, and the relative priority rule for customers in fixed. Under this coupling, every customer in completes no later in the isolated subsystem than in the original system.
The isolated subsystem is stable because . By Kleinrock's conservation law, every work-conserving priority rule satisfies
Since removing customers outside S cannot increase the sojourn time of customers in S, the original system satisfies
The same inequality holds for randomized priority rules by conditioning on the server's randomization and then taking expectations. Non-work-conserving policies and nonnegative type-dependent holding delays can only increase the sojourn times and therefore preserve the inequality.
Finally, the inequality is preserved under the closure, where . Indeed, for any two sojourn-time functions and ,
Thus, the left-hand side of the required inequality is continuous in , which proves necessity for every operationally achievable sojourn-time function.
Next we prove sufficiency. Let A be the set of operationally achievable sojourn-time functions; equivalently, A is the -closure of the mean-sojourn-time functions generated by randomized priority rules, together with nonnegative type-dependent holding delays. This set is nonempty and closed by definition. It is convex because the server can randomize, independently of the arrival and service processes, over any two priority rules and holding-delay policies. It is upward closed because the server can strategically delay any measurable subset of customers by any nonnegative holding time.
Now suppose satisfies all the inequalities for the given . Suppose, toward a contradiction, that . Since is a nonempty closed convex subset of , the separating hyperplane theorem and the duality between and imply that there exists an essentially bounded measurable function such that
Since is upward closed, the separating function must be nonnegative -almost everywhere. Indeed, if on a set of positive -measure, then there exists a subset of positive -measure on which is bounded above by a strictly negative constant. Starting from any element of and adding an arbitrarily large holding delay on this subset would drive the right-hand side of (17) to , which contradicts the strict separation. Thus, after modifying on a -null set, assume that everywhere.
Define
Since , , and are nonnegative,
The denominators are strictly positive because for every ,
On the other hand, consider the work-conserving priority policy that gives priority to customers with larger , with ties broken according to any fixed rule. Let be the sojourn-time function induced by this policy. For every , all customers in have strict priority over all customers outside . Therefore, whenever at least one customer in is present, the server works on a customer in . Consequently, the aggregate workload process of customers in is exactly the workload process of the isolated work-conserving subsystem containing only customers in .
By Kleinrock's conservation law, for every ,
Moreover, applying the same argument to the full type space gives
where the inequality follows from Assumption 1. Hence , and because it is generated by an admissible priority policy, . Then we have
Therefore,
This contradicts (17). Therefore, , which proves sufficiency.
B.2. Proof of Proposition 5
Proof of Proposition 5. Fix any admissible assignment and any operationally feasible sojourn time . Let
denote the aggregate distribution of assigned service depth across all arrivals, and let
be its generalized inverse. Because F is continuous, the quantile map
is measurable and non-increasing in . Moreover, the pushforward of under is exactly . Therefore,
Hence the value term in (6) is unchanged.
On the other hand, if (otherwise the result is immediate), the long-term average delay cost can be written as
Let denote the expected sojourn time under the deterministic assignment under the priority rule that gives higher priority to larger . Because is non-increasing, the ratio is also non-increasing in . Thus this priority rule is consistent with the -rule.
For , define
Under the assignment , the set of types receives exactly the fraction of smallest service depths in the aggregate distribution . Therefore,
Denote and , then
Then for all ,
Thus, using the standard formula for a continuum of priorities,
(18)
where the inequality holds because all the denominators are positive by admissibility.
On the other hand, consider a subsystem consisting only of jobs whose types lie in with service depth means given by . Removing all customers outside cannot increase the sojourn times of customers in , because those customers can only consume the server's capacity and increase congestion for customers in . To prove this, take any sample path and remove all the customers outside . The service epochs assigned to the remaining jobs in the original sample path are feasible in the isolated subsystem, possibly with additional idleness. Hence the aggregate sojourn time of customers in in the original system is at least the minimum aggregate sojourn time achievable in the isolated subsystem.
In the isolated subsystem, the arrival rate is , and customers' aggregate service depth distribution has cdf . Moreover, among customers in this isolated subsystem, the aggregate sojourn time is minimized by the -rule with common delay cost, equivalently by giving priority to smaller service depths. The resulting minimum aggregate sojourn time is
Therefore,
Combining (18) and (19), we obtain the tail comparison
Using the result of (20) for every , we have
Therefore the rearranged assignment weakly lowers the weighted delay-cost term while leaving the value term unchanged. Its welfare is thus weakly higher than that of the original assignment.
Finally, because is non-increasing, the -rule implies that the induced optimal priority rule is equivalent to giving strict priority to customers with larger delay sensitivities.
B.3. Proof of Proposition 6
In order to prove the proposition, we first state Lemma 10 that shows if the marginal service value is lower than the most patient customer's delay sensitivity, serving any customer longer than M will be suboptimal.
LEMMA 10. Suppose is continuously differentiable and . For any admissible and non-increasing service depth assignment , there exists a non-increasing function such that the assignment achieves weakly higher welfare than .
Proof of Lemma 10. Fix an admissible service depth assignment . Denote , then is also admissible and non-increasing. For all , we have
Therefore,
which finishes the proof.
Proof of Proposition 6. Part 1: the case and .
In this case, the long-term average value generated by the server is
and the long-term average delay cost can be bounded as
Therefore, the objective of problem (8) is upper bounded as
Consider function , it is maximized when , thus (21) is further bounded by
Notice that the equality holds only if with probability 1, which is not achievable by any finite support function . On the other hand, consider a sequence of functions such that
Then
and
Thus, the social welfare under is bounded by
Therefore, the sequence of asymptotically achieves the upper bound of social welfare . As , the service depth assignment is degenerate, with and for all .
Part 2: the case is continuously differentiable and .
Since is weakly increasing and weakly concave, there exists such that . By Proposition 5 and Lemma 10, there exists a maximizing sequence such that every is non-increasing and satisfies . We first show that the stability constraints of this sequence are uniformly bounded away from equality. Since the zero assignment is feasible, the welfare supremum is non-negative, so we may assume that the welfare under is lower bounded by -1. Moreover, it is upper bounded by
Therefore,
Since is a uniformly bounded sequence of non-increasing functions, Helly's selection theorem implies that there exists a subsequence, still denoted by , and a non-increasing function such that at every continuity point of . A monotone function has at most countably many discontinuities, so the convergence holds for -almost every . By the dominated convergence theorem,
and , so is admissible.
For every and , the dominated convergence theorem also gives
Furthermore,
and the integrands in the welfare objective are uniformly bounded in absolute value by
Another application of the dominated convergence theorem therefore gives that the long-term average welfare of converges to the long-term average welfare of . Hence is an optimal solution.
It remains to prove that has a continuous representative. Denote by the objective value of (8) for solution . Define
The functions and are continuous and for every . For any bounded measurable function such that is admissible and non-increasing for all sufficiently small , define
Since and are bounded and all denominators remain uniformly bounded away from zero, differentiation under the integral sign is justified by the dominated convergence theorem. Applying Fubini's theorem gives
where
Suppose, toward a contradiction, that has a downward jump at some . Denote
where . Since , and all the cumulative integral terms in (23) are continuous, has one-sided limits at and
The inequality follows because concavity of V implies , while and imply
For , define
The two intervals have the same probability mass, so
Since for and for , for every the function is nonnegative and non-increasing after redefining its value at , if necessary. This redefinition does not affect feasibility or welfare because has no atom at . Moreover, its total workload is unchanged, so it is admissible.
Using (22), we obtain
Since has one-sided limits at ,
Thus, for all sufficiently small . By the definition of the directional derivative, for all sufficiently small , which contradicts the optimality of .
Therefore, has no discontinuity in , because every discontinuity of a monotone function is a jump discontinuity. Since is bounded and monotone, its one-sided limits at and exist and are finite. Redefining and to equal these limits does not affect feasibility or social welfare. The resulting optimal solution is continuous and non-increasing on , which finishes the proof.
B.4. Proofs of Lemma 4 and Proposition 7
Proof of Lemma 4. Let
denote the truthful utility of type . Fix . Incentive compatibility implies
Hence
In particular, , so must be non-increasing.
Now assume that is non-increasing. Define
Then , so the highest type obtains zero utility and individual rationality will follow once incentive compatibility is established. Fix any and . If , then
If instead , then
Thus truthful reporting is optimal for every type, and the truthful utility is exactly . Since , the mechanism is individually rational.
Finally, consider any other incentive compatible and individually rational policy. Since
letting implies for almost everywhere. Therefore,
Hence every incentive compatible payment schedule satisfies
where individual rationality requires .
Proof of Proposition 7. We only consider the case in which the centralized optimal policy exists. Since is a non-increasing function, for ,
Therefore, is a non-increasing function. By Lemma 4, there exists a price menu that is incentive compatible.
Next, we prove that . Take to be right-continuous on . Since is non-increasing and finite-valued, it is bounded, and given by (7) is also bounded and continuous.
Fix . For , consider an alternative service depth assignment
Since and is non-increasing, is non-increasing and . Therefore, is admissible.
Denote by the corresponding sojourn time given by (7). For any and ,
It follows from (7) that for , and for . Moreover, for , the service depth is unchanged while both higher-priority workload integrals are weakly smaller, so .
By the optimality of ,
where the second inequality follows because and for .
Using the definitions of and and changing variables from to , we obtain
Dividing by gives
(24)
By the right-continuity of and ,
Indeed, if , the result follows from the continuity of the finite concave function on ; if , monotonicity implies for every , so the result also holds.
Since , is continuous and strictly increasing, and hence is continuous. Using and Fubini's theorem, we have
For every , the expression in brackets converges to by continuity, and it is bounded by . Therefore, the dominated convergence theorem implies
Letting in (24) gives
which finishes the proof.
C. Proofs for Section 8
C.1. Proofs of Proposition 8 and Proposition 9
Proof of Proposition 8. Fix an operationally feasible allocation . By Lemma 2, the allocation is implementable if and only if . Let denote the truthful surplus of type . The IC constraints are equivalent to
and the IR constraints require . Since revenue equals
the revenue-maximizing utilities for the fixed allocation are and . Therefore, the revenue-maximizing payments are
Substituting these payments into the revenue objective gives
Thus the revenue-maximization problem has the same feasible set as the decentralized welfare problem, but with virtual delay sensitivities
Proof of Proposition 9. The revenue-maximizing payment schedule for the fixed allocation rule is
Therefore,
Applying Fubini's theorem to the last term gives
Thus,
Multiplying by gives the long-term average revenue. The optimization problem is therefore equivalent to maximizing long-term social welfare under virtual delay sensitivities.
C.2. Proof of Proposition 10
Proof of Proposition 10. Fix a feasible randomized service depth assignment and a priority rule, and let denote the expected sojourn time of a type-i customer with realized service depth . Recall that . Let
denote the aggregate distribution of service depth across all arrivals, and let be its generalized inverse. Let be uniformly distributed on . Define as the distribution of conditional on , and as the distribution of conditional on . That is, type 1 customers receive the fraction of smallest service depths in the aggregate distribution, and type 2 customers receive the rest. By construction,
and the aggregate distribution is unchanged, i.e., . Therefore, is feasible, and the value term
is unchanged.
Under , type 1 customers have the larger delay sensitivity and weakly smaller service depths, so the -rule gives priority to smaller realized service depth, with type 1 customers served first when the depths are equal. Let denote the expected sojourn times under this rule. Since a customer with a larger service depth has a longer service time and is preempted by more customers, is non-decreasing in . Hence every type 1 customer has a weakly shorter expected sojourn time than every type 2 customer.
It remains to compare the delay costs. Let and denote the aggregate sojourn times of type customers. The long-term average delay cost can be written as
First, both systems have the same arrival rate and the same aggregate service depth distribution . By the -rule with a common delay cost, the aggregate sojourn time of all customers is minimized by giving priority to smaller service depths. Therefore, .
Second, let and for . Since , we have for all . Under , type 1 customers have priority over all type 2 customers, so by the same argument as in (18),
On the other hand, consider the subsystem consisting only of type 1 customers with service depth distribution . By the same argument as in (19), removing type 2 customers cannot increase the sojourn times of type 1 customers, and the minimum aggregate sojourn time in the isolated subsystem is exactly the right-hand side above. Therefore, .
Combining the two inequalities with , the delay cost under is weakly lower, while the value term is unchanged. Thus the long-term average social welfare is weakly higher.
C.3. Proofs of Lemma 5 and Proposition 11
Proof of Lemma 5. Let . The assignment is implementable if there exist prices such that, for , every maximizes the surplus of type customers over and yields a non-negative surplus.
We first prove necessity. Fix and . Since type 1 customers weakly prefer and type 2 customers weakly prefer ,
Adding the two inequalities gives , hence .
Next we prove sufficiency. Suppose for all and , so that . If some belongs to both supports, then and the two expressions for coincide, so the price rule is well defined. Under this price rule, a type 1 customer obtains surplus 0 from any and surplus
from any . A type 2 customer obtains surplus from any and surplus
from any . Therefore, every option in is optimal for type customers and gives a non-negative surplus, so the assignment is implementable.
Proof of Proposition 11. Combining Proposition 10 and Lemma 5 directly gives the result.