Public knowledge-graph servers protect themselves by cutting every query into short time slices. A system called SaGe runs each query for about 75 milliseconds, saves its progress into a small token, and hands that token back to the client, which resubmits it to continue. Each such pause, which we will call a preemption point, is also a free measurement: it reports how much of the data the query has scanned, how many intermediate rows it has built, and how much server time it has used. Today that information is discarded. Decisions about where work runs, on the shared server or on the user's machine, are made once before execution using fixed thresholds, and every query receives the same slice length. We propose using the first few slices of a query the way scaling-law research uses small pilot training runs. The system fits a simple power-law curve of cost against the fraction of data processed, extrapolates it to the full input, and at each pause decides whether to keep the query on the server, ship its state to the client to finish the joins, or change its slice length.
The borrowed lesson is specific. Work on training-data allocation for language models found that decisions which look optimal at small scale can invert at large scale, and that fitting curves at two or more small scales and extrapolating recovers the right decision. Query splitting has the same structure. Whether a join should run on the client depends on how large its intermediate results grow, and that growth is often sub- or super-linear in the data scanned. A threshold tuned on one dataset size or one concurrency level may be wrong at another. Our central claim is that per-query, online, curve-based extrapolation at preemption points produces better placement and scheduling decisions than static cardinality thresholds or fixed slices. It should also beat naive "assume the current rate continues" re-planning. The gains should grow with dataset size and the number of concurrent clients.
What exists and where this sits
On the systems side, four papers set up the problem. Towards Efficient Query Processing over Heterogeneous RDF Interfaces (hybridSE) sorts triple patterns by selectivity. It then sends low-cardinality lookups to client-side fragment interfaces and high-cardinality joins to the server endpoint, using a hand-set cardinality cutoff. This is the placement policy we aim to replace. SaGe: Web Preemption for Public SPARQL Query Services supplies the mechanism we reuse: preemptable iterators, a fixed 75ms slice, and saved state tokens. It reports suspend and resume overheads around 3% of a slice and plans under 6kb, which means frequent decision points are affordable. Continuation Queries: Embracing Timeouts on Public SPARQL Endpoints (PASSAGE) rewrites a timed-out query into a new query for the missing results. It shows that slicing works even on unmodified endpoints, but it keeps a fixed 60s timeout. Processing SPARQL Property Path Queries Online with Web Preemption extends preemption to path queries, whose cost grows the least linearly and so most needs extrapolation. All four make their decisions statically. None uses observed progress to predict cost-to-complete.
On the allocation side, three papers supply the method and one supplies a warning. AutoScale: Scale-Aware Data Mixing for Pre-Training LLMs fits power laws on small proxy runs and projects optimal allocations from two small scales to large budgets. Our fit over the first slices is the same move applied within a single query. Scaling Laws for Optimal Data Mixtures shows that an additive law, where the allocation only shifts a constant, fails when the allocation interacts multiplicatively with scale. This is why we model placement as changing the exponent of the cost curve, not only its offset. Predictable Scale (Part II) --- Farseer finds that the exponents themselves drift with scale and fits them piecewise. This is our motivation for refitting at every pause and not committing to one curve. The warning comes from How Text Quality Interventions Reshape Neural Scaling Laws. It documents rankings that invert across scales, and it documents fits that collapse numerically with few points, which it controls with regularization. We expect both problems in our setting and adopt its regularized fitting.
The nearest cross-over work is R2R. It routes individual decoding steps between a small and a large language model using a learned entropy-based router. Its two models share one machine, so routing costs no network time, and its router predicts the quality of the next step, not the cost of the remaining work. Our decisions are made per operator, are priced in bytes, client time and server time, and rest on extrapolation, not classification. Approachable Music Composition with Machine Learning at Scale contributes a smaller idea: a one-time device speed test to decide between client and server. We use that to estimate client speed.
Core Claim
Let $s \in (0,1]$ be the fraction of a query's driving index range consumed so far. At each pause the server has observations of three quantities: cumulative server time $T(s)$, intermediate rows held $R(s)$, and output rows emitted $O(s)$. For each quantity we fit a regularized two-term power law, for example
$$ R(s) \approx b\, s^{\delta}, \qquad T(s) \approx a\, s^{\gamma}, $$
where $a, b$ are scale constants and $\gamma, \delta$ are growth exponents. The exponents are refit at every pause. Evaluating these curves at $s=1$ gives projected remaining server time and projected final intermediate size. The planner then chooses, among three actions, the one minimizing
$$ J = \text{completion time} + \lambda \cdot \text{server time}, $$
where $\lambda$ prices the shared server relative to one user's wait. The three actions are: continue on the server, hand the partial state plus remaining joins to the client, or adjust the slice length. Client-side cost is projected bytes divided by measured bandwidth, plus projected client compute scaled by the speed-test ratio.
The claim is falsifiable in a concrete way. If a static threshold, tuned once, does as well as this planner across data scales and concurrency levels, the idea is wrong.
Research Program
We would build the planner on top of a SaGe-style preemptable engine with a hybridSE-style client that can execute the joins handed to it. The work has three parts.
The first part is a prediction study, which comes before any control. We record the trajectories $(s, T, R, O)$ over every pause for every query in the workloads. We then measure how well cost-to-complete can be predicted after $k$ pauses, comparing three predictors: linear extrapolation, a single power law, and a refit power law. Error is mean relative error, mirroring the scaling-law papers. The study needs to show that a curve fit beats linear extrapolation on real joins and paths. It also needs to show how many pauses are required, since every pause spent observing is a pause spent before deciding.
The second part is the decision rule above. It includes a handoff format that ships the state token together with a bounded batch of bindings. The handoff target is either a client-side join or, on unmodified endpoints, a PASSAGE-style continuation query.
The third part is slice sizing. Queries projected to finish soon receive longer slices, and queries projected to run long are kept short or handed to the client. This amounts to shortest-remaining-time scheduling driven by the projections.
Baselines
The naive reference point is fixed SaGe: a 75ms slice, all preemptable operators kept on the server, and unsupported operators on the client, as in the published system. It isolates what any adaptivity buys.
The strongest existing placement method is hybridSE with its cardinality cutoff. hybridSE reports up to 1,000× faster execution than pure client-side brTPF, up to 10,000× less data transfer than standard fragment interfaces, and 5× to 40× higher throughput at 16 clients on WatDiv with 10 million triples. Those numbers are against weak, client-only baselines. We will not compare against them. We compare against hybridSE itself on the same queries.
To be fair to hybridSE, we will grid-search its cutoff using the same tuning budget the planner gets for $\lambda$ and its regularization. That tuning happens on a development split at one data scale. Both systems then run on the same hardware, the same throttled client profiles, and the same network shaping. Beating it means a lower workload completion time and lower server CPU-seconds at matched or lower bytes transferred, at data scales and concurrency levels other than the tuning scale. Matching it only at the tuning scale does not count.
For SaGe, the file states only that it beats Virtuoso on workload completion time and time to first results. No numeric result is reported on Lacuna for SaGe's workload completion time on WatDiv or FEASIBLE-DBpedia, so we will measure SaGe ourselves.
Two ablations isolate the key ingredient. The first replaces the power-law fit with a linear rate extrapolation: "the current rate continues." The second freezes the fit after the first two pauses instead of refitting. If the linear variant matches the full planner, the scaling-law ingredient is unnecessary and the contribution reduces to online re-planning.
Why not just…?
Why not just tune hybridSE's threshold once and keep it? This is the main threat. The text-quality scaling study's finding that rankings invert across scale gives reason to expect a tuned cutoff to stop transferring, but that finding comes from language-model training, not joins. We will test transfer directly. We tune the cutoff at the smallest WatDiv scale and one client, then evaluate at larger scales and up to 32 clients. If the tuned threshold stays within a few percent of the planner everywhere, we will report that and treat the proposal as refuted for selective workloads.
Why not just use a classical cost-based optimizer with better cardinality statistics? Better statistics improve estimates made before execution. However, multi-join and path queries are exactly where those estimates fail, as the hybridSE limitations note. Our method uses the query's own observed growth instead. We will include an oracle variant given true final cardinalities before execution. It bounds what better statistics could ever achieve and shows whether the remaining gain comes from slice scheduling rather than placement.
Why not just re-plan at each pause using the observed rate? This is the linear ablation. It is cheaper and may suffice when cost grows linearly in $s$. The planner should win only on queries whose growth exponents differ clearly from 1, such as path closures and fan-out joins. We will report results split by fitted exponent so the reader can see where, if anywhere, the curve fit pays.
Why not just add server hardware? PASSAGE shows that a public endpoint with a fixed quota returns nothing for some queries. On Wikidata, the citation query timed out after 60 seconds on standard Blazegraph and needed 37 continuation queries over about 37 minutes to return all 1,210 results. Shared endpoints enforce quotas regardless of hardware, so deciding where work runs within a quota remains a real problem.
Proposed Experiments
The workloads are WatDiv generated at 1M, 10M and 100M triples, FEASIBLE-DBpedia query logs, and a Wikidata subset. On Wikidata we run handoff through continuation queries, using PASSAGE's citation and brightest-stars queries as case studies with published completion times. Concurrency is swept from 1 to 32 clients. Client devices are emulated at several speed ratios set by a speed test, with bandwidth shaped between broadband and mobile.
The metrics are:
- workload completion time and time to first results;
- server CPU-seconds;
- bytes transferred;
- HTTP request count, against SaGe's reported scale of roughly 500 requests where fragment interfaces needed over 500,000;
- relative error of predicted cost-to-complete as a function of pauses observed.
The decisive checks are three. First, at the 100M scale and 16 or more clients, the planner must beat the cross-scale-tuned hybridSE cutoff on completion time and server CPU at no extra transfer. Second, it must beat the linear ablation on the subset of queries with fitted exponents far from 1. Third, prediction error after a small number of pauses must be low enough that decisions made from it agree with the hindsight-optimal action on most queries. Failing the first check refutes the claim. Passing it while failing the second means the result is a re-planning win, not a scaling-law win, and we would report it as such.
References
- Towards Efficient Query Processing over Heterogeneous RDF Interfaces
- SaGe: Web Preemption for Public SPARQL Query Services
- Continuation Queries: Embracing Timeouts on Public SPARQL Endpoints
- Processing SPARQL Property Path Queries Online with Web Preemption
- AutoScale: Scale-Aware Data Mixing for Pre-Training LLMs
- Scaling Laws for Optimal Data Mixtures
- Predictable Scale (Part II) --- Farseer: A Refined Scaling Law in LLMs
- How Text Quality Interventions Reshape Neural Scaling Laws for LLMs: Empirical Study
- R2R: Efficiently Navigating Divergent Reasoning Paths with Small-Large Model Token Routing
- Approachable Music Composition with Machine Learning at Scale.