Introduction

Background processing can finish quickly while making interactive requests slower. When both workloads share a virtual machine, operators must balance application responsiveness against batch completion deadlines. This case study compares systemd CPU quotas, quota enforcement periods, and relative CPU weights on an Oracle Linux 10 – x86 virtual machine running on Oracle Cloud Infrastructure (OCI).

At 40 requests per second, relative CPU weights produced a median run p95 latency approximately 26.2 percent lower than unrestricted contention, with a similar median batch duration. A quota with a 10 ms enforcement period produced lower latency, but batch completion took approximately 2.86 times as long. These observations describe the tested synthetic workloads and configuration; they are not production performance guarantees.

Logical OCI controlled lab environment topology. A separate OCI Compute x86 virtual machine generates HTTP requests and coordinates the Oracle Linux 10 x86 virtual machine hosting the application and batch workloads. Both VMs use the same private subnet.

Figure 1. Logical OCI controlled lab environment topology. A separate OCI Compute x86 virtual machine generates HTTP requests and coordinates the Oracle Linux 10 x86 virtual machine hosting the application and batch workloads. Both VMs use the same private subnet. Service symbols are schematic.

The application and batch job compete for CPU resources on one host. Running the request generator on a separate VM avoids consuming the workload host’s CPU to generate its own test traffic.

Controlled Lab Environment and Measurement Method

Controlled Lab Environment and Measurement Method

The single-worker Python HTTP application performs 100,000 PBKDF2-HMAC-SHA256 iterations per /work request. The batch job uses four worker processes, each completing 2,000 tasks with the same iteration count per task. Every compared batch completes 8,000 tasks. Equal task counts do not imply equal CPU time or elapsed time across runs.

The single-worker Python HTTP application performs 100,000 PBKDF2-HMAC-SHA256 iterations per /work request. The batch job uses four worker processes, each completing 2,000 tasks with the same iteration count per task. Every compared batch completes 8,000 tasks. Equal task counts do not imply equal CPU time or elapsed time across runs.

The client schedules requests at a fixed rate for 30 seconds and validates each response. Reported latency extends from the scheduled request start to response completion, including client scheduling and queue delays. Successful-request percentiles use the nearest-rank method; request failures are reported separately. The coordinator verifies that the complete client execution window falls within batch execution and waits for the batch to finish before recording its duration.

Policies Under Comparison

A control group, or cgroup, accounts for and controls a group of processes. systemd places the application and batch services in sibling cgroups under system.slice. The batch quota applies collectively to its parent process and all workers. A 100 percent quota allows one logical CPU’s worth of CPU time; it does not reserve a physical core. Relative weights influence CPU distribution among competing sibling groups without guaranteeing a fixed allocation or response time. These principles also apply to earlier Oracle Linux releases.

A control group, or cgroup, accounts for and controls a group of processes. systemd places the application and batch services in sibling cgroups under system.slice. The batch quota applies collectively to its parent process and all workers. A 100 percent quota allows one logical CPU’s worth of CPU time; it does not reserve a physical core. Relative weights influence CPU distribution among competing sibling groups without guaranteeing a fixed allocation or response time. These principles also apply to earlier Oracle Linux releases.

Measured Application and Batch Results

The initial experiments at 10 requests per second exposed variability: a 100 percent quota with the default enforcement period produced per-run p95 values from 15.667 to 28.162 ms, despite average batch consumption of approximately one logical CPU. Subsequent tests with a 10 ms period produced a narrower observed range. Repeated measurements therefore qualified the favorable result from the first pilot.

Table 1. Tests at 10 requests per second. Each row summarizes three runs; the application-only row uses the baseline recheck. Latency values are medians of per-run percentiles, not percentiles calculated from pooled requests.

Tests at 10 requests per second. Each row summarizes three runs; the application-only row uses the baseline recheck. Latency values are medians of per-run percentiles, not percentiles calculated from pooled requests.

Standalone calibration completed at 20, 30, and 40 requests per second without reported failures. The final comparison used 40 requests per second, with three repetitions per policy in a rotating order. All nine scenarios reported complete measurement overlap and 1,200 successful responses each: 10,800 validated requests with no reported errors.

Table 2. Higher-demand comparison at 40 requests per second. Each value is the median of three per-run measurements. Latency percentiles cover successful requests only.

Higher-demand comparison at 40 requests per second. Each value is the median of three per-run measurements. Latency percentiles cover successful requests only.

Compared with unrestricted contention, relative weights lowered median run p95 latency by approximately 26.2 percent while median batch duration increased by approximately 1.4 percent. The quota with a 10 ms period lowered median run p95 latency by approximately 40.2 percent, while median batch duration was approximately 2.86 times the unrestricted result. These descriptive comparisons establish neither statistical significance nor a universally optimal policy.

Kernel evidence is consistent with quota enforcement. Higher-demand quota runs averaged approximately one logical CPU equivalent; unrestricted and weighted runs averaged approximately 3.2 to 3.4 over batch execution. CPU counters span the complete batch, whereas HTTP measurements cover a shorter window within it. The tests did not isolate processor frequency, SMT placement, or the causes of run-to-run timing variation.

Configure and Verify Service Policies

Use systemd service drop-ins to configure resource controls instead of modifying systemd-managed cgroup files directly. For example, the batch policy with a 10 ms enforcement period is:

[Service]
CPUQuota=100%
CPUQuotaPeriodSec=10ms

For the weight policy, set CPUWeight=1000 on the application and CPUWeight=100 on the batch, and clear conflicting CPU quotas and period overrides. Apply batch configuration changes while the batch is stopped, run systemctl daemon-reload, and verify the effective properties. Restart the application during a controlled test window when applying its configuration. Check cpu.max and cpu.weight inside the running service cgroups. A 1000-to-100 weight ratio is a relative preference among competing siblings, not a guaranteed 10-to-1 share of the VM.

Preserve effective service configurations, script hashes, per-request CSV files, batch checksums, timestamps, kernel quota snapshots, and CPU counter deltas. Classify interrupted tests separately and restore the saved configuration after testing. The reproduction package should identify every active drop-in because later files can override earlier settings.

Performance Disclosure and Limitations

Results are illustrative measurements from the stated controlled lab environment configuration and synthetic workloads. Actual performance and resource consumption may vary between systems, environments, workloads, and individual runs. Factors include processor architecture and frequency, SMT, VM shape, available capacity, host contention, kernel and software versions, security settings, CPU placement, network conditions, request timing, background activity, and configuration choices.

The results do not constitute a warranty, performance guarantee, service-level commitment, or production sizing recommendation. They do not establish that one Oracle Linux release outperforms another. Validate policies with representative traffic, supported configurations, application response-time objectives, and batch completion deadlines before production use. This article does not modify applicable contractual terms or service commitments.

Each configuration has only three repetitions, and the HTTP measurement windows are short. At 10 requests per second, each run contains 300 requests, making p99 sensitive to a small number of responses. Fixed-rate arrivals may interact with periodic CPU enforcement; the experiment did not establish that interaction as a root cause. Maximum capacity, customer applications, memory pressure, and storage contention were outside scope. Accumulated cgroup throttling time is not directly additive to batch wall-clock duration.

Apply The Findings to Your Workload

Define an application response-time objective and a batch completion deadline before selecting a policy. Relative weights offered a useful compromise in this controlled lab environment, while the quota with a 10 ms period delivered lower application latency at the cost of substantially longer batch execution. Compare both outcomes using representative workloads and retain the complete range of results.

Supporting Evidence From The Instrumentation Pilot

The supplied screenshot below records a 200 percent quota instrumentation check at 10 requests per second. It is separate from the repeated policy comparisons and does not represent the 100 percent quota with a 10 ms period.

Instrumentation pilot evidence. The batch averaged 1.953 logical CPU equivalents with cpu.max of 200000 100000. Evidence parameter Recorded value

Figure 2. Instrumentation pilot evidence. The batch averaged 1.953 logical CPU equivalents with cpu.max of 200000 100000.
Evidence parameter Recorded value

the instrumentation check; the adjacent table provides selectable values. CPU accounting, throttling counters, and application latency describe different quantities and measurement windows.

The screenshot supports the instrumentation check; the adjacent table provides selectable values. CPU accounting, throttling counters, and application latency describe different quantities and measurement windows.

Supporting Evidence From The Higher Demand Suite

The supplied terminal capture records completion of all nine higher-demand scenarios and restoration of the preceding configuration. Each scenario reports zero request errors and complete measurement overlap. The results were also supplied as a comparison CSV.

Higher-demand suite summary and individual policy results at 40 requests per second. The capture documents this experiment and is not a general performance claim.

Figure 3. Higher-demand suite summary and individual policy results at 40 requests per second. The capture documents this experiment and is not a general performance claim.

Summary

CPU resource controls provide different ways to balance application responsiveness and background processing. In this controlled lab environment, relative CPU weights reduced median run p95 latency at 40 requests per second by approximately 26.2 percent while median batch duration remained close to the unrestricted result. A 100 percent quota with a 10 ms enforcement period reduced median run p95 latency by approximately 40.2 percent, but the batch took approximately 2.86 times as long.

The repeated default-period quota tests also showed why a CPU ceiling alone is insufficient evidence of application latency protection. Verify enforcement in the kernel, measure both workloads, and report unfavorable results alongside favorable ones. Neither quotas nor weights reserve an isolated physical core or establish an application service-level guarantee.

Choose a policy against explicit latency objectives and batch deadlines, then validate it in your own environment. Start with the Oracle Linux control-group documentation linked below and repeat the comparison with representative traffic before production deployment. Results may vary by system, configuration, and workload; no single setting is recommended for every deployment.


Oracle Linux 10 control groups and systemd documentation
Oracle Linux 10 resource management documentation