Beelink Mini PC

Beelink EQi 304: Can Linux Make Proper Use of Its One Fast CPU Core?

Foreground versus background work

A more realistic scheduling challenge is deciding what happens when the processor is already busy with low-priority background work and a normal-priority application suddenly needs CPU time.

For this test I started five OpenSSL SHA-256 workloads at a niceness of 19. With five continuously runnable processes, all five CPU cores were occupied. After five seconds I launched a sixth OpenSSL workload at the normal niceness of 0 and monitored the CPU used by every process at 0.2-second intervals.

This deliberately oversubscribed the processor. The scheduler therefore had to decide whether the newly launched normal-priority task should compete with the background jobs for the LP E-cores or receive preferential access to the single P-core.

The result was unambiguous. The normal-priority process was placed on CPU 0 immediately and remained there for every one of my 292 samples. The five nice-19 background processes were left to share CPUs 1-4.

Workload Niceness SHA-256 throughput
Normal-priority workload 0 3,715,678.36 kB/s
Background 1 19 2,890,952.52 kB/s
Background 2 19 2,893,111.86 kB/s
Background 3 19 3,150,169.91 kB/s
Background 4 19 2,892,034.75 kB/s
Background 5 19 2,943,285.76 kB/s

The normal-priority process accumulated 59.35 seconds of CPU time during its nominal 60-second run. Despite six CPU-bound applications competing for five cores, it effectively received a complete CPU to itself.

The background jobs accumulated around 77-79 seconds of CPU time during their 90-second runs. For most of the test, five background workloads were therefore sharing the four LP E-cores while the normal-priority application occupied the P-core.

Background 3 produced somewhat higher throughput than the other low-priority jobs. This likely reflects differences in placement during the initial five-second background-only period and subsequent migration.

This is exactly the behaviour I wanted to see. When a normal-priority CPU-intensive task appeared on an already saturated system, Linux immediately favoured it over the nice-19 background work and gave it exclusive use of the P-core.

Next page: Page 4 – Does Linux Keep the P-core in Reserve?

Pages in this article:
Page 1 – Introduction and Core Layout
Page 2 – Single-Thread Scheduling and Core Performance
Page 3 – Foreground versus Background Work
Page 4 – Does Linux Keep the P-core in Reserve?
Page 5 – What Happens When Every Core Is Busy?
Page 6 – Conclusions


Complete list of articles in this series:

Beelink EQi 304 Mini PC
IntroductionIntroduction to the series and interrogation of the machine
BenchmarksBenchmarking the Beelink EQi 304 Mini PC
PowerTesting and comparing the power consumption
BIOSThe BIOS, which stands for Basic Input/Output System, plays a crucial role
CoresP-core and LP Efficient-cores examined
NoiseHow quiet is this mini PC?
NPU and LlamaTesting the NPU with Llama models
SchedulingCan Linux use its one fast CPU core efficiently?
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted