WorksEngineering
Locational Marginal Pricing of Compute: Co-optimizing Compute and Energy for Transparent Data Center Flexibility
Abstract
Demand from data centers and AI compute is growing rapidly and is increasing stress on the power grid. This load could be flexible through user adjustments and provide relief during energy scarcity events, yet today its flexibility is provided through utility call-ups or system-operator load shedding, and is invisible to the users whose workloads are being curtailed. In this work, we propose to quantify and couple the prices of compute and energy in a single optimization problem. The resulting compute price reflects the marginal cost of the binding constraints and decomposes into components indicating which grid, power, hardware, or service requirement causes a price surge. The economic interpretation updates the price with real-time conditions and gives users a signal for potential flexibility provision. The co-optimization ultimately connects compute and energy markets while providing a signal for relief of stress on both the grid and the compute resources.
Introduction
Data center and AI compute demand has been growing at a rapid pace. The projections forecast this demand to make up to 12% of the U.S. electricity demand by 2028 [1] and increase two-fold globally by 2030 [2]. Such substantial growth can create stress on the grid system, impacting grid infrastructure and cost allocation [3] as well as electricity prices [4].
Recently, data centers have been argued to be a flexible load, relieving the system during stress periods. A variety of works provide proposals for temporal and spatial workload shifting [5, 6, 7]. Recent work demonstrates the effectiveness of power cap management through the utility event call-up [8] and coordination between the utility and data center sides [9].
Yet, the flexibility approaches proposed are limited. In the current configuration, users are not exposed to the operational conditions of the serving infrastructure, nor have an incentive to provide demand response. The majority of the current pricing contracts can be described with the following attributes: a) constant price throughout a day with very slow movement on an interday basis; b) constrained on several compute metrics (i.e., promised deliverable time and available capacity); c) usually billed on a $/GPU-hr or $/token basis.
While the customers are shielded from the volatility of operating conditions and obtain service on promise, this prevents users from providing valuable flexibility.
Related Work
Prior work on data center flexibility falls into three groups. Geographic load balancing routes requests across sites to lower the operator’s cost under exogenous electricity prices [10, 11, 12]. A second group places data centers inside the grid model and guides spatial and temporal shifting with LMPs and market clearing [13, 14, 15, 16, 17, 18]. These works price electricity and the flexibility to shift it, but not compute. A third group co-optimizes compute and power within the fleet, using DVFS, storage, replica commitment, or iteration with the system operator [19, 20, 21, 22], yet users still pay a fixed service price. Compute pricing has emerged only recently. Billimoria and Byers Billimoria and Byers [23] infer the value of compute from posted cloud prices, and Sanabria Sanabria [24] derives a shadow price of LLM queries on a single system. Closest to ours, Liu Liu [25] decomposes a dual $/token price over a token-flow network, but with exogenous electricity prices and fixed energy per token.
Table I summarizes the comparison. To our knowledge, no prior work forms the compute price as a dual of a joint clearing with an endogenous grid. Hence, our contributions are as follows: (i) we couple compute demand and data center power demand in a single clearing problem; (ii) we form the compute price transparently as the dual of the binding constraints, decomposed into components that reflect actual grid, power, hardware, and service conditions; and (iii) we extend co-optimization from electricity to joint compute and energy clearing, giving a benchmark toward which system and fleet operators could coordinate by exchanging prices and quantities.
| Compute price | Grid endogenous (OPF) | Network/latency | Operating modes (batch size) | SLO reserve (queueing) | Elastic demand | |
| Rao et al. [10]; Liu et al. [11, 12] | – | – | ✓ | – | (✓) | – |
| Lindberg et al. [13, 14] | – | ✓ | – | – | – | – |
| Lin et al. [15] | – | ✓ | – | – | – | – |
| Zhang et al. [16, 17] | – | ✓ | – | – | – | ✓ |
| Gu and Qin [18] | – | ✓ | – | – | – | – |
| Ding et al. [21] | – | ✓ | – | – | – | – |
| Liu et al. [22] | (✓) | ✓ | – | – | ✓ | – |
| Liu, Shin, and Deka [19] | – | – | – | ✓ | – | (✓) |
| Du et al. [20] | – | – | ✓ | – | (✓) | – |
| Billimoria and Byers [23] | (✓) | – | – | – | – | ✓ |
| Sanabria [24] | ✓ | – | – | (✓) | (✓) | (✓) |
| Liu [25] | ✓ | – | ✓ | – | – | (✓) |
| This work | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Table 1. Comparison with the related work. ✓: addressed; (✓): partially or as an extension; –: not addressed.
Methodology
We clear compute and electricity in a single co-optimization problem. The power side is a DC optimal power flow (DC-OPF), whose duals are the locational marginal prices (LMPs) of electricity, i.e., the energy price plus a congestion component. The compute side serves requests from demand regions at data-center sites ; its duals are the prices of compute. The two sides are coupled because every request served at site is a power withdrawal at the bus of that site. The intervals are hourly at seconds.
Requests as the unit of demand
An LLM request consists of an input (prompt and context, processed in the prefill phase) and an output (generated in the decode phase). The two phases utilize the hardware differently: prefill is compute-bound and decode is memory-bound. However, a request has no value unless both are served. We therefore measure demand in requests and let each request consume both prefill and decode resources.
We create different request classes that differ in their latency requirements. Each class has an average input and output tokens per request and a request rate (requests/s) from region . We assume elastic demand, represented by bid segments on a demand curve. We split into bid segments with willingness to pay per token. The prices are spaced geometrically between the lowest and highest posted prices, and , for the same model. Assuming a constant price elasticity (1 in our case), the share of demand still buying at price is . The segment share is the drop in this share between consecutive prices, and the top segment keeps the remainder . A request in segment is worth its token count times the segment price:
We also assume the bids to be identical for input and output tokens.
Resources used by one request
Prefill is modeled by one throughput (input tokens/s per GPU) and one energy per input token. Decode is modeled by operating modes , which depend on batch size . This results in different output throughput (tokens/s per GPU), an energy per output token , and a 95th-percentile inter-token latency (ITL) . Larger batches give more tokens per GPU and less energy per token, but slow generation. Serving a class- request in mode takes GPU-seconds and energy:
A mode may serve class from region at site only if it meets the ITL target , the network round-trip budget , and the GPU memory limit. The memory limit comes from the proxy model of the key-value (KV) cache. A replica with bytes of free memory and bytes of cache per token holds at most sequences:
We assume that each running sequence holds its input and, on average, half of its output. The admissible set is
For each class, is the highest utilization at which of requests wait less than .
Clearing problem
The decision variables are: 1) the served request rate for each ; 2) the accepted demand ; 3) the powered-on GPUs ; 4) the site power ; 5) the generator outputs ; 6) the load shedding of other customers at bus .
The net injection at bus is:
The problem maximizes welfare:
We set VOLL = $50,000/MWh. At this value, we check that every compute bid is below VOLL per MWh, so compute can never outbid other customers’ load. The objective function is subject to, for all (duals in brackets):
The site power is the facility power of busy GPUs plus the idle power of all other powered-on GPUs:
Power Usage Effectiveness (PUE) is chosen to be a constant multiplier. The constraints are the following:
(8)–(9) balance served and accepted requests.
(10) keeps busy GPUs plus headroom within the powered-on GPUs, while (11) limits to the installed .
(12) is the site power limit.
(13)–(16) are standard DC-OPF constraints in the Power Transfer Distribution Factor (PTDF) formulation.
The rest of the load is shed according to the VOLL. The term is the tie-breaking cost for routing.
Price of compute
The dual ($ per request) of (8) is the marginal price of a class- request in region . The LMP at bus is
Consider site serving this request in mode , with as the site’s bus. Dropping the indices , , , and , the stationarity conditions for and give
where is the GPU time reserved for the request and is its facility energy, including the idle power of its headroom. Thus, a request pays for energy at the local LMP, for the site power limit when it binds, and for GPU time. Sites that do not serve the request have a weakly higher cost, as with generators out of merit. tbl:II separates this price into components that identify the scarce resource.
Since and are sums of input and output parts, the price splits the same way. For , the price per token is
| Component | Value |
| Grid energy | |
| Grid congestion | |
| Site power | |
| GPU scarcity | |
| SLO headroom |
Table II. Components of the compute price, before dividing by .
where and use and in place of and . The ratio of output to input prices therefore approximately follows when energy or site power is scarce, and when GPUs are scarce.
Experiments
Setup
We construct a toy example of the co-optimization problem for demonstration purposes.1
Grid. We use the IEEE 30-bus system from [26, 27] in PTDF form. We place three data center sites, DC0, DC1 and DC2, connected at buses 3, 8 and 21 respectively (Figure 1). Each has a 25 MW rating, and their PUEs are 1.2, 1.2 and 1.35. Region is local to site . For the network round-trip time (RTT), we assume 10 ms to the local site, 60 ms to a neighboring site, and 120 ms to the furthest site. The time offsets are not assumed to represent distances on the 30-bus network.

Figure 1. IEEE 30-bus system with the three data-center sites. Red lines are loaded at or above 80% at the peak hour without data center.
Compute Load. The primary link between power and compute comes from ML.ENERGY [28]. We choose Llama-3.1-70B [29] on H100 GPUs with 4-way tensor parallelism. We process tables of , quantifying the relationship between power and decode of output tokens, latency, and batch size, and apply a factor of 1.3 for the CPU and additional hardware overhead. We model prefill throughput at 50% model-FLOPs utilization of the dense BF16 peak, while energy also follows from [28]. We assume that an idle GPU draws 0.12 kW, and sizing for each site follows GPUs, where is the maximum GPU power draw.
Demand. Request rates and lengths come from the Azure 2024 LLM inference traces [30]: conversation for conversation and offline requests, and code for agentic requests. We take the median weekday at 5-minute resolution and average it to hours. Offline demand is flat over the day. The class mix is 50/30/20%. Regions take 50/30/20% of demand and are shifted by 0, 1, and 2 hours. Demand is scaled so that, at the peak, the GPUs needed, including headroom, fill 90% of the fleet. The latency targets enter the clearing as for items outside (5).
Events. We study three representative events. At DC1 during 14:00–20:00 UTC: “GPU failure” represents 60% of GPUs offline, “power limit” represents reduced site power from 25 to 10 MW, and “grid event” limits the lines into bus 8 to 30% of their rating.
| Conversation | Agentic | Offline | |
| Trace for lengths (ratio) | 16 | 114 | 16 |
| Share of requests | 50% | 30% | 20% |
| ITL target (ms) | 30 | 50 | – |
| RTT budget (ms) | 50 | 100 | – |
| Wait target (s) | 1 | 10 | – |
| Utilization | 0.85 | 0.98 | 0.95 |
| Bid range ($/M tokens) | 0.40–3.00 | 0.40–3.00 | 0.20–0.45 |
Table III. Request classes. Bids use and segments.
Results
Clearing. Figure 2 shows that supply is flat at the marginal cost of energy for the base case. The events create supply scarcity. The clearing moves onto the bids: the price is set by the willingness to pay of the marginal segment, and the lowest-value segments are curtailed. Table IV summarizes the peak hour results and their clearing.
| Event | Base | GPU failure | power limit | grid event |
| LMP at DC1 ($/MWh) | 56.6 | 55.3 | 55.9 | 2,413.3 | ||||
| DC1 power (MW) | 21.8 | 7.66 | 10.0 | 12.1 |
| Conversation price | 0.007 | 0.400 | 0.316 | 0.270 |
| Agentic price | 0.005 | 0.235 | 0.229 | 0.197 |
| Offline price | 0.006 | 0.262 | 0.255 | 0.219 |
| Conversation served (%) | 100 | 90.6 | 96.9 | 100 |
| Agentic served (%) | 100 | 100 | 100 | 100 |
| Offline served (%) | 100 | 72.3 | 76.3 | 86.2 |
| Welfare loss (k$/day) | 0 | 75.5 | 34.5 | 5.03 |
Table IV. Results at the peak hour. Prices are for region 1 in $/M-tokens; served shares are fleet-wide.

Figure 2. Demand bids (black) and residual supply (colored) for region 1 at the peak hour, per event. Intersections mark the cleared quantity and price.
Prices over the day. Figure 3 shows that, outside the event window, all prices stay at the marginal cost of energy. Within the window, prices rise only in the hours when DC0 and DC2 can no longer absorb the work moved from DC1. The surge therefore lasts longest for the GPU failure, which removes the most capacity, and shortest for the grid event. The three compute prices follow nearly the same path because offline work absorbs most of the curtailment: its bid sets the value of the scarce resource, and each class pays the value in proportion to its use.

Figure 3. Compute prices in region 1 and the electricity LMP at the DC1 bus over the day. The shaded area is the event window.
Decomposition. Figure 4 shows which constraints bind. In the base case, every price is almost entirely energy. During the events, conversation from region 1 is still served only at DC1. Its 50 ms round-trip budget is met only by the local site, since DC0 and DC2 are 60 ms away. Its price therefore reveals the constraint that binds at DC1: GPUs in the GPU failure, site power in the power limit, and congestion in the grid event. Agentic and offline requests from region 1 move to DC0 and DC2 instead. The moved work fills the GPUs at DC0 and DC2, and once those sites are full, the lowest offline bids are curtailed and set the value of a GPU-hour there. GPU scarcity therefore dominates their prices in every event, including the grid event, where DC1 is limited by grid congestion.

Figure 4. Components of the input- and output-token prices in region 1 at the peak hour, per event. Labels give the site serving most of each class.
Discussion & Conclusion
The proposed approach provides a demonstrative example of how the compute price reflects the binding constraints of both the grid and the compute infrastructure. Nevertheless, the concept poses several challenges. First, the compute price is marginal: it prices the short-run use of infrastructure and does not recover capital costs, which dominate GPU and data center economics. Capital recovery must therefore be addressed separately. Second, the approach requires transparency and collaboration between the grid operator and the compute operator. The two sides could potentially clear separately by exchanging prices and quantities rather than full models.
While we acknowledge these practical limitations, we hope to introduce a paradigm in which compute and energy are coordinated rather than disaggregated systems. By grounding the compute price in economic merit, the approach introduces the potential of a transparent way to allocate scarce infrastructure and to turn data center flexibility into a signal that users can see and act on. Moreover, without the network, the same model prices compute for off-grid or behind-the-meter sites.
Many extensions remain. On the grid side, these include AC-OPF formulations, larger fleets and realistic transmission networks, and integration with wholesale market operations at scale. Moreover, each hour is cleared independently, so the price signals when deferral is valuable, but deferral itself is not modeled. On the compute side, they include more rigorous serving constraints, finer compute–power coupling that captures latency distributions, and commitment decisions with appropriate pricing. Finally, dedicated clearing algorithms, possibly in a decentralized way, would be needed to solve the problem at scale.
Acknowledgment
The authors disclose the use of Anthropic Claude to conduct this work. The usage included assistance in writing, literature review, methodology refinement, and code generation and editing. Conceptual ideas, experimental design, implementations, analyses, and conclusions are the authors’ own. The authors take responsibility for all mistakes.
References
- [1]A. Shehabi, A. Newkirk, S. J. Smith, A. Hubbard, N. Lei, M. A. B. Siddik, B. Holecek, J. Koomey, E. Masanet, and D. Sartor, “2024 united states data center energy usage report,” 2024.
- [2]X. Chen, X. Wang, A. Colacelli, M. Lee, and L. Xie, “Electricity demand and grid impacts of ai data centers: Challenges and prospects,” arXiv preprint arXiv:2509.07218, 2025.arxiv.org/abs/2509.07218
- [3]B. Cheng, A. Botterud, T. Levin, S. Nadarajah, D. Zhao, and J. Kwon, “Ai for the grid and ai on the grid: Implications, challenges and opportunities,” The Electricity Journal, vol. 39, no. 2, p. 107547, 2026.DOI
- [4]C. Bogmans, G. Ganpurev, P. Gomez-Gonzalez, G. Melina, A. Pescatori, and S. Thube, “Power hungry: How ai will drive energy demand,” Energy Economics, p. 109278, 2026.DOI
- [5]Y. Chen and X. Zheng, “To defer or to shift? the role of ai data center flexibility on grid interconnection,” in Proceedings of the 2026 ACM Sustainability Week, 2026, pp. 322–327.
- [6]T. Suprakseret, A. Souza, N. Bashir, D. Irwin, and P. Shenoy, “On the limitations of carbon-aware temporal and spatial workload shifting in the cloud,” in Proceedings of the Nineteenth European Conference on Computer Systems, 2024, pp. 924–941.
- [7]A. Radovanović, R. Koningstein, I. Schneider, B. Chen, A. Duarte, B. Roy, D. Xiao, M. Haridasan, P. Hung, N. Care et al., “Carbon-aware computing for datacenters,” IEEE Transactions on Power Systems, vol. 38, no. 2, pp. 1270–1280, 2022.arxiv.org/abs/2106.11750
- [8]P. Colangelo, A. K. Coskun, J. Megrue, C. Roberts, S. Sengupta, V. Sivaram, E. Tiao, A. Vijayakar, C. Williams, D. C. Wilson et al., “Ai data centres as grid-interactive assets,” Nature Energy, vol. 11, no. 2, pp. 254–261, 2026.DOI
- [9]R. Fatima and X. Li, “Unlocking ai data center interconnection capacity through coordinated grid and data center flexibility,” arXiv preprint arXiv:2610.05502, 2026.arxiv.org/abs/2610.05502
- [10]L. Rao, X. Liu, L. Xie, and W. Liu, “Minimizing electricity cost: Optimization of distributed internet data centers in a multi-electricity-market environment,” in 2010 Proceedings IEEE INFOCOM. IEEE, 2010, pp. 1–9.
- [11]Z. Liu, M. Lin, A. Wierman, S. H. Low, and L. L. Andrew, “Greening geographical load balancing,” ACM SIGMETRICS Performance Evaluation Review, vol. 39, no. 1, pp. 193–204, 2011.
- [12]Z. Liu, A. Wierman, Y. Chen, B. Razon, and N. Chen, “Data center demand response: Avoiding the coincident peak via workload shifting and local generation,” Performance Evaluation, vol. 70, no. 10, pp. 770–791, 2013.
- [13]J. Lindberg, Y. Abdennadher, J. Chen, B. C. Lesieutre, and L. Roald, “A guide to reducing carbon emissions through data center geographical load shifting,” in Proceedings of the Twelfth ACM International Conference on Future Energy Systems, 2021, pp. 430–436.arxiv.org/abs/2105.09120
- [14]J. Lindberg, B. C. Lesieutre, and L. A. Roald, “Using geographic load shifting to reduce carbon emissions,” Electric Power Systems Research, vol. 212, p. 108586, 2022.arxiv.org/abs/2203.00826
- [15]L. Lin, V. M. Zavala, and A. A. Chien, “Evaluating coupling models for cloud datacenters and power grids,” in Proceedings of the Twelfth ACM International Conference on Future Energy Systems, 2021, pp. 171–184.DOI
- [16]W. Zhang, L. A. Roald, A. A. Chien, J. R. Birge, and V. M. Zavala, “Flexibility from networks of data centers: A market clearing formulation with virtual links,” Electric Power Systems Research, vol. 189, p. 1067323, 2020.arxiv.org/abs/1910.05443
- [17]W. Zhang and V. M. Zavala, “Remunerating space–time, load-shifting flexibility from data centers in electricity markets,” Applied Energy, vol. 326, p. 119930, 2022.arxiv.org/abs/2105.11416
- [18]N. Gu and J. Qin, “Competitive equilibrium for electricity markets with spatially flexible loads,” arXiv preprint arXiv:2510.26036, 2025.arxiv.org/abs/2510.26036
- [19]S. Liu, S. Shin, and D. Deka, “Watts vs. bytes: Turning data centers into grid assets via storage compute co-optimization,” arXiv preprint arXiv:2605.16190, 2026.arxiv.org/abs/2605.16190
- [20]B. Du, H. Jia, T. Li, Q. Hou, Z. Wang, E. Du, and N. Zhang, “Spatial llm workload shifting needs foresight: Model commitment for ai data center operation under power grid constraints,” arXiv preprint arXiv:2609.09787, 2026.arxiv.org/abs/2609.09787
- [21]Y. Ding, X. Li, Y. Zhao, W. Shi, C. Lyu, J. Ruan, and Z. Xu, “Towards cost-optimal joint electricity-computation management: A novel predict-then-optimize framework,” Applied Energy, vol. 412, p. 127734, 2026.DOI
- [22]Y. Liu, Y. Ding, X. Li, J. Qu, W. Zhang, T. Qian, W. Xiao, Z. Hu, J. Ruan, and Z. Xu, “Peer-to-peer cloud service market for data centers oriented to computation-electricity coordination,” arXiv preprint arXiv:2606.04981, 2026.arxiv.org/abs/2606.04981
- [23]F. Billimoria and C. Byers, “Bits-to-watts: Connecting markets and prices for compute and power,” 2026.DOI
- [24]E. Sanabria, “The shadow price of intelligence: Quality degradation in llm inference as a supply chain problem,” arXiv preprint arXiv:2608.23986, 2026.
- [25]S. Liu, “Locational pricing for generative-ai services via token-flow market clearing,” in Proceedings of the 2026 ACM Sustainability Week, 2026, pp. 258–265.
- [26]IEEE PES Task Force on Benchmarks for Validation of Emerging Power System Algorithms, “IEEE PES Task Force on Benchmarks for Validation of Emerging Power System Algorithms (PGLib-OPF),” https://github.com/power-grid-lib/pglib-opf, 2024, accessed: November 5, 2026.
- [27]S. Babaeinejadsarookolaee, A. Birchfield, R. D. Christie, C. Coffrin, C. DeMarco, R. Diao, M. Ferris, R. Fliscounakis, S. Greene, R. Huang et al., “The power grid library for benchmarking ac optimal power flow algorithms,” arXiv preprint arXiv:1908.02788, 2019.arxiv.org/abs/1908.02788
- [28]J.-W. Chung, J. J. Ma, R. Wu, J. Liu, O. J. Kweon, Y. Xia, Z. Wu, and M. Chowdhury, “The ml. energy benchmark: Toward automated inference energy measurement and optimization,” Advances in Neural Information Processing Systems, vol. 38, 2026.arxiv.org/abs/2505.06371
- [29]A. Grattfiori, A. Dubey, A. Jauhri, A. Pandey, A. Kadian, A. Al-Dahle, A. Letman, A. Mathur, A. Schelten, A. Vaughan et al., “The llama 3 herd of models,” arXiv preprint arXiv:2407.21783, 2024.
- [30]J. Stojkovic, C. Zhang, J. Goiri, J. Torrellas, and E. Choukse, “Dynamollm: Designing llm inference clusters for performance and energy efficiency,” in 2025 IEEE International Symposium on High Performance Computer Architecture (HPCA). IEEE, 2025, pp. 1348–1362.DOI