HotCarbon 2026

Towards Query-Aware Core-Type Selection on Heterogeneous Multi-core Processors

Xueqing Feng (The University of Tokyo), Yuto Hayamizu (The University of Tokyo), Kazuo Goda (The University of Tokyo)

This transcript was made by AI. The open source speech recognition model Whisper (large-v3-turbo) transcribed the recording with faster-whisper. Names and technical terms were checked against the paper, but it can still contain mistakes. The recording is the reference.

0:00 And we move to the last talk of the session, where we will talk about query-aware core-type selection in heterogeneous systems, and Yuto is going to give the talk. Okay, thank you for the introduction. So, I am the second author of this paper, and I'm presenting this work on behalf of Xueqing Feng, who is my student and could not attend today because of visa constraints, but I can accept your questions. And our paper is Towards query-aware core-type selection on heterogeneous multi-core processors. Modern processors are increasingly heterogeneous. So, instead of a single core-type, they combine different core-types on a single chip. For example, ARM's big.LITTLE and Intel's P-core and E-core. Traditionally, a database treats CPU cores as a homogeneous resource. The query goes to a worker, which OS schedules on any available core.

1:03 On a heterogeneous processor, this abstraction breaks down, and P-core gives higher performance and higher power, while E-core gives less power, but may take longer execution time. So, lower power does not automatically mean lower energy. So, energy depends on both power and execution time. So, this creates a new placement decision. So, best core type can be dependent, depend on the query being executed, not only on the system load or core availability. So, this problem sits between three established research areas. So, database-optimized plan, joins, and parallelism, but assumes cores are interchangeable. Operating systems scheduled across heterogeneous cores, but do not understand database operators and cardinality or data distribution. So, architecture research characterizes P-core and E-core differences, but does not turn them into query-level DBMS decisions. So, the missing layer here is, therefore, a query-aware mechanism inside DBMS.

2:15 So, it connects information already available before execution, such as operator type, data distribution, and cardinality to energy-aware core type choice. So, our key idea is to move core type selection into DBMS and make the decision before query execution. So, in conventional path, query is submitted to a worker and the operating system, operating system assigned to some core, so some available core. From query's perspective, the decision is energy-blind. So, in our proposed path, DBMS uses the query plan and statistics to estimate the energy of two candidates, so running on a P-core and running on a E-core, and then chooses the one with lower predicted energy. So, this helps because energy-optimal core is not fixed, and it changes with query features such as cardinality ratio, skewness, and input pattern.

3:19 The rest of talk shows this behavior for three basic operators, then the selection policy and its energy savings. We study this question on an Intel Core i5 processor running DuckDB. Because database server typically stays powered on between queries, the system continuously draws idle power. And as query curves in this figure shows, query adds workload-dependent power component above this constant idle baseline. So far, for each query, we measure above idle energy, so energy from execution itself. So, above idle energy grows both power and runtime. So, lower average power does not guarantee lower energy. So, each query is pinned to one selected core type and repeated three times. And the energy is measured with a Yokogawa high-precision power meter. We also collect top-down micro-architecture analysis, or TMA, with Linux perf profiler over the same interval.

4:32 In short, TMA breaks down where the CPU pipeline slots go. For example, retiring instruction for useful work or stalling on the memory. So, we can see why execution time changes between the two core types. In the experiment, we use synthetic SQL queries, and each dominated by one of three common analytic operators. For hash aggregation, system groups tuples by a key. So, we vary the group cardinality ratio, which means distinct group over input size, and the key distribution from uniform to the skewed ones. The skewness, we show skew 50 and skew 90, which means one hotkey holds about 50 or 90 percent of the tuples. And for hash join, the system builds a hash table on one relation, and probes it with the other. We vary the build-side cardinality ratio, and the probe key distribution.

5:41 For sort operation, we vary the sort key cardinality ratio, and compare two input patterns, modular repeated, which is a regular repeating key sequence, and pseudo-random, less predictable order. So, we focus on these features because they can be extracted from query plan and database statistics before execution. So, the first observation is that hash aggregation, and in this case, energy depends on both group cardinality and skewness. So, as the group cardinality ratio increases, the query maintains more active groups, and above idle energy rises on both core types. Under the uniform distribution, the increase, the energy increases steeper on E-core. Under skew 90, the two core becomes much closer. The TMA explains the uniform case. As cardinality grows, the E-core becomes much more memory bound, and retires far less useful work, while P-core shifts much less.

6:54 This is not about higher power. So, more memory stalls lengthen the E-core execution. And since energy integrates power over time, the longer runtime explains the steeper energy rise. So, aggregation needs at least the group cardinality ratio and the skew class. So, operator type alone is not enough for energy optimality. The second observation is the hash join. The hash join shows even stronger trends. The preferred core type can be reverse with the probe key distribution. So, with uniform probes, memory access spreads across hash table, and P-core generally uses less above idle energy. So, with highly skewed probes, repeated access to hot keys improves memory locality, and the E-core can become the lower energy choice. The TMA comparison makes this transition visible. So, moving from uniform to skew 90, the E-core becomes much less memory bound, and retires much more useful work, while P-core barely changes.

8:07 So, skew mainly shortens E-core runtime, which drives its energy advantage. For hash join, the policy must consider the both build-side cardinality ratio and the probe key skewness. A fixed operator to core rule would miss this reversal. SORT operation shows that input pattern matters even when the SORT key cardinality ratio is unchanged. For modular repeated input, two core types are often closing above idle energy. For pseudo-random input, the P-core develops a clear energy advantage as cardinality ratio increases. The TMA shows why the pseudo-random input, the E-core becomes increasingly memory bound, while P-core stays stable. So, the widening the runtime gap drives the P-core energy advantage. So, SORT operation needs both the SORT key cardinality ratio and the input pattern. So, together, these operators show that energy-aware placement needs query-specific features, not just operator name.

9:22 So, based on this observation, we prototype a core type selection policy that predicts both candidates before execution. In the offline construction, every query configuration is measured, both P-core and E-core. The paired sample from the same configuration is kept together and split into training, validation, and test set. The model is a simple random forest regressor. And the categorical feature, like operator type, candidate core type, skew class, and input pattern are one-hot encoded, and the cardinality ratio is used as a numeric feature. As runtime, DBMS extracts these features from query plan and statistics, and forms a P-core, E-core, P-core, and E-core energy candidate, predicts their energies, and selects the lower energy one. On the held-out test set, it selects the lower energy core with 81% accuracy, and using only pre-execution information, only pre-execution show information, no online profiling or power query hardware counters.

10:43 So, we compare the learned policy with the default Linux scheduling. For evaluation, we generate query configuration by randomly sampling cardinality ratio, and combining them with operator-specific distribution settings. And this metric, the metric measure is the total above idle energy, system energy across these configurations. Overall, the policy reduces energy by 18%. The largest reduction is for hash join at 22%, consistent with its strong core reversal and the skewness. So, a lightweight pre-execution decision can turn operator-level observation into system-level energy savings. And importantly, the policy does not simply send every query to E-core. So, it selects P-core for 9% for hash aggregation, 29% for hash join configuration, and 70% of SORT configuration. Let's go to E-core. So, this reflects the power runtime trade-off. So, the E-core wins on power.

11:59 The P-core wins when its runtime advantage is large enough. The result supports query-aware selection rather than a fixed mapping from operator-type to core-type. So, to conclude this work, three main takeaways. First, heterogeneous CPU cores should not be treated as interchangeable database resources. So, energy-optimal core can change with query features. And second, the operator name alone is not enough, and the cardinality ratio, skewness, and the input pattern matters. Third, DBMS can use these features before execution to predict the energy of P-core and E-core candidates. So, our prototype reaches 81% core-choice accuracy and reduce total energy, total above-idle energy by 18% compared with the default scheduler. And one last point. This is still an early-stage study. So, the workload is very simple and a realistic complex workload and a multi-threaded execution are still future work.

13:14 But an important finding is that even for simple single-threaded workload, workload-aware core-type selection is already necessary for energy-optimal execution. Okay. Thank you. I'm happy to take questions. Thank you, Yuto. Questions? Judith. Okay, Todd. So, if I understand, kind of the takeaway here is, based on your DBMS queries coming in, I'm curious if you thought about, you know, if I'm designing a rack, is it better for me to put all performance cores in there, in terms of, like, perf per watt, or do you want the heterogeneity and, like, does the 18% here translate almost like one-to-one, or how would you place? So, interesting question. So, as shown in this, our results, so the best, so best core-type changes depending on the workload feature. So, it is not clear to determine the mixture of p-core and e-core. So, that will require analyzing your workload, basically.

15:02 I was just curious as to how the, with your added query-aware scheduling, what the new breakdown of energy consumption during the query resolution looks like? Like, in the sense, how much of it is, what's the overhead of having the actual awareness decision-making and the individual, like, the actual data, and so and so forth? Actually, so, so, in this study, so we just were very, we just used very simple workload features, but, so, so our, so our approach is very lightweight, and it just adds a small amount of computation to the query planning, but, uh, maybe, uh, maybe, uh, in a realistic workload, the workload is more complex and, uh, changing dynamically on runtime. So, in that case, we need some online profiling or something, or, uh, some dynamic control, uh, plane to, so adapt the system, uh, uh, resource allocation.

16:31 So, in that case, the, uh, uh, yeah, the overhead of this kind of, also energy, uh, uh, aware core, uh, core allocation might be, uh, uh, uh, uh, yeah, overhead might be a little bigger, yeah? yeah more questions otherwise i would have one so uh your evaluation was based on single thread um benchmarks if i read the paper right um what would be the next steps to also allow parallelism in your in your dbms so yeah um maybe the next step will be more realistic uh database the workload like TPC-H and also so we are using DuckDB so in DuckDB have a so very so dedicated parallel processing engine so we will evaluate the so the energy optimality of parallel processing yeah okay any more questions then thanks for speaker again you