Headroom Creates Speed: Choosing Servers for the Best Performance

A Web API that usually responds quickly slows down when traffic spikes or data updates overlap. When choosing a different server, the question is where more headroom would reduce that delay.
The clues are in the CPU, RAM, and SSD when the application slows down. The CPU needs time to accept new work. RAM needs room to hold data, reclaim memory, and support caching. The SSD needs room to keep storing and rewriting data. Headroom serves a different purpose in each.
Connect application delays to the work of CPU, RAM, and SSD.

This article uses measurements to explain how headroom affects performance, then connects those mechanisms to the metrics you can observe, capacity calculations, and comparisons between configurations. The same criterion applies to search, data processing, and adjustments to an existing server: choose a configuration that completes the required work on time, including during busy periods.
Choose CPUs for Both Prompt Starts and Fast Completion
Idle CPU time lets new work start promptly. When work overlaps, requests can queue behind earlier tasks, delaying their responses. Average utilization can hide brief bursts. Amazon's operational guidance also describes how contention under heavy load can stop throughput from growing while response times worsen.1
Higher load can also make the computation for a single request take longer. GitHub ran an experiment that held the application's request count constant while a separate program added CPU load. It measured the median CPU time spent on one request, or p50. This differs from the application's overall response time, which also includes communication and other delays.2
More load can lengthen CPU time for the same request.

In this test series, at approximately 78% CPU utilization, median CPU time per request was 45.9% higher than at the low-load baseline. The experiment identifies lower operating frequencies at higher load and shared resources within physical cores through Hyper-Threading as contributing factors. In that environment, computation slowed before utilization reached 100%. Measure the load at which changes appear, and their size, on other CPUs and applications.2
When choosing a configuration, inspect both the overall average and individual cores. If one of eight logical CPUs is at 100% and the others are almost idle, the average is about 12.5%. Yet a critical task concentrated on that one logical CPU has no headroom there. For applications that can distribute work, compare core counts. For work that is hard to distribute, focus on per-core performance and how the processing is organized.
Allocate RAM to Both Data and the Work That Uses It
RAM keeps data ready for immediate use. Accessing data that has left the cache adds time to read it again from storage. In a Java runtime (JVM), the area used to hold objects is called the heap. Garbage collection, or GC, also needs working space to reclaim memory from objects that are no longer needed. The minimum capacity that lets an application run can differ from the capacity that lets it finish its work quickly.
An ASPLOS 2025 study measured 22 DaCapo workloads at different heap sizes using collectors including G1 in OpenJDK 21. It demonstrates a relationship in which a larger heap reduces the execution time for the same work. The experiment varies the application's heap limit, rather than physical RAM utilization. It does not establish that applications without GC should increase their capacity by the same multiples.3
Memory assigned to the application and memory used by the OS to cache files share the same RAM. A larger heap may reduce GC overhead, but it may also reduce the cache and increase time spent waiting for reads. The allocation needs to suit the application's work.
In the FlexHeap paper, Elasticsearch using G1 runs Wikipedia search and document ingestion concurrently within the same available RAM (DRAM) budget, comparing maximum heap settings of 90% and 50%. These percentages are maximum settings relative to available DRAM, not RAM utilization or actual cache occupancy.
Search and document ingestion showed different results.



Search throughput doubled, and p99 response time fell by 62%. Meanwhile, document ingestion throughput fell by 8%, and the Full GC count increased from 1 to 54. This shows a trade-off between the cache that helps reads and the heap that supports document ingestion.4
The p99 value is the time within which 99% of measured searches finish. Full GC reclaims memory across the entire heap, but its count alone does not tell us the pause duration or the application's overall performance.
The 50% setting is not a universal recommendation; the appropriate allocation also changes with the balance between search and updates. RAM outside the heap can be used by the OS cache and other purposes. For your application, check whether the required data fits, together with GC time and pauses, read I/O, and response times for both search and updates. Increasing installed RAM and adjusting how existing RAM is allocated are separate candidates you can test.
Leave the SSD Room to Keep Rewriting Data
While an SSD writes new data, it also works to make space available for subsequent writes. NAND flash cannot overwrite data in place. Writes operate on units called pages, while erasing affects an entire block containing multiple pages.5
When a block contains both data that is still needed and data that is no longer needed, the useful data must first move elsewhere. Erasing the original block then creates room for new writes while preserving the data. This cleanup is the SSD's internal garbage collection. It needs free space at the destination to make progress.
The next write needs room to move existing data.

User OP provides additional reserve space for the SSD controller to use for this internal work. Samsung's white paper measures random-write performance on the 983 DCT with 0%, 10%, and 20% User OP. The test uses QD32, meaning up to 32 I/O requests are made available.5
How does additional reserve space affect write performance?

This is an example of giving up some usable capacity for internal work and gaining write performance. Even at 0% additional User OP, the SSD still has factory reserve space.5
Distinguish these two kinds of space when choosing a server:
- Additional reserve inside the SSD (User OP): space used by the controller. The 0%, 10%, and 20% settings in this experiment refer to this reserve.
- Filesystem free space: room for the application to store data and temporary files. Check it with
dffor the relevant storage location and use it in the capacity plan described below.
The measurements therefore do not mean that deleting 20% of your files will make writes 2.53 times faster. Check both the SSD's write performance and the working space available to the application.
In addition to stored data, allow for temporary space used by updates, compression, and table rebuilds. When moving long-term logs off the server, decide whether data loss before the transfer completes is acceptable. If data must be durable before a transaction or operation is committed, measure performance while preserving that requirement.
Match Application and Server State During Slow Periods
To connect these mechanisms to your own environment, observe application responses and server state during the same period. Record ordinary operation as well as times when incoming traffic increases, data is updated, or backups run. If you do not yet have measurements, start with a trial environment that meets the application's requirements and run the expected volume of data and work.
On Linux, the following displays provide a starting point. These commands observe system state. After checking
htop, press q to exit before running the remaining commands.bash
htop
free -h
vmstat 1 10
df -h
iostat -xz -y 1 10htop
free -h
vmstat 1 10
df -h
iostat -xz -y 1 10When investigating a slow period, run
vmstat and iostat in separate terminals and record the start and end of the observation window. Aggregate p99, successful requests, and failures from application logs covering that window, then compare them with resource state at the same times. Running the list above sequentially does not align the individual observation windows.Use
htop to inspect load on each logical CPU and the application's resident memory (RES), and free to inspect available. The latter estimates how much RAM can be used additionally without swapping. When Linux uses RAM for caching, the unused amount shown as free becomes small. Because RES includes shared pages, avoid simply adding up the values for individual processes.67In
vmstat, r counts processes that are running or waiting for CPU execution. si and so show reads from and writes to swap. The first row includes averages since boot, so use the second and subsequent rows to inspect current activity. Distinguish data remaining in swap from active swap reads and writes.8For the SSD, inspect
Avail and Use% in df for the storage location, together with r_await, w_await, and aqu-sz in iostat. The first two are average read and write completion times including waiting; the last is average queue length. Modern SSDs process I/O in parallel, so %util at 100% alone does not establish that the performance limit has been reached. iostat is part of sysstat and may not be installed in every environment.9Use changes observed at the same time to form a hypothesis, then compare one changed condition. The table suggests initial candidates. For containers, also check configured CPU and memory limits and throttling records, distinguishing those limits from a lack of host capacity.10
| What you observe during the slow period | One condition to compare first | What to check alongside it |
|---|---|---|
| A nonurgent aggregation job runs concurrently, the CPU is busy overall, and waiting also increases | Move the nonurgent aggregation to another time | Whether per-core load and waiting inside the application decrease |
| Average load is low, but the core handling critical work reaches its limit | Run the same work on a configuration with different per-core performance | Whether that task's CPU time and completion time decrease |
available falls, and increased si and so coincide with the delay | Keep the required data volume and try a candidate with more RAM | Whether swap activity and application delays decrease |
| GC time or pauses increase as the heap approaches its limit | Increase the heap limit while leaving room for the OS and cache | Changes in GC, and whether read I/O or other work worsens |
| Increasing the heap raises search read I/O and response time | Compare a lower heap limit | Whether both search and document ingestion meet their required targets |
| Data and temporary work exhaust free space at the storage location | Keep the required amount and try a candidate with more usable capacity | Whether free space remains during temporary work and writes complete |
| During a backup, I/O waits and queues grow even though free space remains | Move the concurrent backup to another time | Whether I/O waiting and application responses improve together |
For example, suppose
w_await and aqu-sz increase only during backups, while application p99 worsens in the same interval. The hypothesis is that simultaneous writes are competing. First change only the backup time and compare with the same input. Check whether I/O waiting and p99 decrease while maintaining the number of successful requests completed on time. This gives you a comparison to make before buying the next configuration. It is a hypothetical diagnostic example, not a measured improvement in a particular environment.Turn Measured Requirements into Capacity Candidates
With observations in hand, you can translate specifications into configurations that suit your application. The RAM and SSD examples below are separate hypothetical plans that illustrate the calculations. They are not measurements from one server.
Start with RAM. If the application's usual resident memory is 4 GB, a 4 GB server is a plan that allocates all capacity to that application alone. Add space for the OS and monitoring, useful cache, growth during busy periods, and reclamation to build a candidate.
Add room for other work to the application's usual memory use.

Here, 4 GB means the application's resident memory, rather than only its live data or virtually reserved space. Avoid counting cache or shared pages again if they are already included in the measurement. Include space needed for GC reclamation and copying in peak growth, and check whether the 2 GB allowance is sufficient. If you cannot separate the components, record host-wide
available and application resident memory, then change either RAM capacity or allocation and compare GC, I/O, and responses.Next, consider the SSD. Add 20 GB of retained logs, 80 GB for temporary work such as updates and compression, and 100 GB of growth until the next review to the current 200 GB of data. The required amount is 400 GB. Leaving free space after that amount is used requires additional capacity.
Build a capacity plan from today's data, upcoming work, and growth.

This 20% free-space allowance is a different percentage from User OP and is not a universal optimum for SSDs. Prioritize the working-space requirements of the database and filesystem you use. Check the advertised capacity, usable capacity after formatting, and display units such as GB and GiB.
For CPUs, first check whether work can be distributed across cores. Assuming equal per-core performance and evenly parallelizable work, an average 60% load on 4 vCPUs represents 2.4 vCPUs of work. On 8 vCPUs, that calculates to an average 30%, giving you one candidate to compare. The 30% is a calculated result, not a recommended utilization target. Operating frequency and shared-resource conditions can change, so measure actual speed after moving the application.
Alongside candidates with more capacity, reconsider the work that runs concurrently. Move nonurgent aggregation to another time, reduce unnecessary retained data, or avoid overlapping temporary work with backups. Each can create headroom in CPU time, RAM, or SSD space. If the current configuration meets response targets during busy periods, keeping it is also a valid decision.
Change One Thing and Verify It with the Same Work
Before comparing, decide what you want to make faster. For a Web API, for example, measure from receiving the request to returning the response. Recording when internal processing starts also separates waiting before execution from execution time. If the application hands work to an external API, distinguish that API's successful response from final completion in the receiving system.
Connect an observation to one change and the next measurement.

Alongside the average, inspect response-time p95 and p99. The p95 value is the time within which 95% of measured operations finish, and p99 covers 99%. In the same observation window, record accepted requests, successful requests completed within the required time, and failures and timeouts. If slow operations fail and disappear from the timing data, the response times of successful requests alone can look shorter. Amazon uses goodput to describe work that finishes without errors within a useful time.1
Give the configurations being compared the same data, work volume, and arrival bursts. Also match the application and settings, destinations, warmup, and observation period, limiting each comparison to one changed condition. If you can only compare production before and after a change, record input counts, data volume, concurrency, backups, and other conditions, then compare intervals with similar conditions.
Keep a record of the configurations and changed condition, input, observation window, response target, and measurement start and end points. Summarize p95 and p99, successful work completed on time, failures and timeouts, and relevant resource values over the same interval.
For a comparison that moves a backup to another time, record
w_await and aqu-sz as well. If the same amount of work produces less I/O waiting and a lower p99, while successful work completed on time is maintained and errors do not increase, the change serves its purpose. Choose based on how quickly accepted work completes, alongside utilization figures.After using short tests to narrow the candidates, also check operation with more data and over longer periods. Once you find a configuration that maintains speed and throughput, its resource usage becomes a guide to the headroom your application needs.
Look Beyond the Specification Sheet
Even with the same vCPU count and RAM capacity, CPU generation, per-core performance, memory bandwidth, storage, and sharing conditions can change the result. For applications that communicate frequently, distance to the destination is another comparison condition. AWS likewise recommends measuring the actual application across configurations when choosing compute resources.11
When comparing VPS and bare metal, assess processing speed and variability alongside the deployment type. Server selection includes whether exclusive use of a physical server benefits your work and whether the cost makes sense once required data protection and recovery are included.
If you are considering ERPC VPS, use the published configurations as a starting point and measure CPU, RAM, SSD state, and response times with your own application. Adjusting capacity, work distribution, and how data is managed one at a time helps reveal whether you next need more cores, faster per-core performance, or more memory. Creating headroom where it is needed is how server selection brings out an application's performance.
References
[1] Amazon Builders' Library, Using load shedding to avoid overload. Contention, response times under heavy load, and goodput.
https://aws.amazon.com/builders-library/using-load-shedding-to-avoid-overload/
[2] GitHub, Breaking down CPU speed: How utilization impacts performance (2024). Changes in p50 CPU time and the effects of frequency and Hyper-Threading.
https://github.blog/engineering/architecture-optimization/breaking-down-cpu-speed-how-utilization-impacts-performance/
[3] Blackburn et al., Rethinking Java Performance Analysis, ASPLOS 2025, Fig. 1. Comparison using the geometric mean of 22 DaCapo workloads.
https://www.dacapobench.org/assets/pdf/dacapo-asplos-2025-with-appendix.pdf
[4] Kolokasis et al., FlexHeap: Dynamic I/O-Aware Heap Resizing for Managed Applications, PLDI 2026, §3.1 and Figs. 1–2; experimental conditions in §5. Comparison of G1-90 and G1-50.
https://zenodo.org/records/20700166
[5] Samsung, Over-Provisioning Benefits for Samsung Data Center SSDs (2019), Fig. 4. Uses the printed 983 DCT values. Approximately 2.53 times is calculated as 119 ÷ 47.
https://download.semiconductor.samsung.com/resources/white-paper/S190311-SAMSUNG-Memory-Over-Provisioning-White-paper.pdf
[6] Linux Kernel Documentation, The /proc Filesystem. Definitions of MemAvailable and caches.
https://docs.kernel.org/filesystems/proc.html
[7] Official htop manual. Logical CPU displays, RES, and shared pages.
https://github.com/htop-dev/htop/blob/main/htop.1.in
[8] procps-ng, vmstat manual, hosted on man7. si, so, and observation intervals.
https://man7.org/linux/man-pages/man8/vmstat.8.html
[9] sysstat, official iostat manual. Definitions of await, aqu-sz, and %util, with caveats for parallel devices.
https://github.com/sysstat/sysstat/blob/master/man/iostat.in
[10] Linux Kernel Documentation, Control Group v2. CPU and memory limits, and CPU throttling records.
https://docs.kernel.org/admin-guide/cgroup-v2.html
[11] AWS Well-Architected, High Performance Computing Lens, Compute architecture. Comparing configurations with the actual application.
https://docs.aws.amazon.com/wellarchitected/latest/high-performance-computing-lens/compute-architecture.html
Related Links
- ERPC VPS: https://erpc.global/en/vps/
- ERPC: https://erpc.global/en/


