{"id":413,"date":"2026-06-13T20:57:35","date_gmt":"2026-06-13T20:57:35","guid":{"rendered":"https:\/\/virtualserversvps.com\/blog\/?p=413"},"modified":"2026-10-02T22:03:54","modified_gmt":"2026-10-02T22:03:54","slug":"vps-performance-tuning-how-to-optimize-cpu-ram-and-disk-i-o-for-maximum-speed-in-2026","status":"publish","type":"post","link":"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-how-to-optimize-cpu-ram-and-disk-i-o-for-maximum-speed-in-2026\/","title":{"rendered":"VPS Performance Tuning: CPU Governor, I\/O Scheduler, Memory and Network Settings That Measurably Help"},"content":{"rendered":"<div style=\"padding:20px\">\n\n\n<p class=\"wp-block-paragraph\">Default Linux settings are tuned for laptops and general-purpose servers, not for a virtual machine competing with neighbours on a shared host. The four settings below are the ones that produce measurable throughput gains on real VPS hardware, in the order you should change them. Each entry lists the parameter, the value worth trying, and the workload where it actually helps.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before tuning, confirm what the hardware can deliver. If the underlying host is oversubscribed, no kernel parameter will rescue you \u2014 <a href=\"https:\/\/virtualserversvps.com\/\">check the specs and pricing here<\/a> to see what each tier promises.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. CPU Governor: Remove the Ramp-Up Delay<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>ondemand<\/code> governor scales frequency up only after load appears, which adds latency to short bursts. For a VPS, idle savings are irrelevant \u2014 you pay for the vCPU whether it runs fast or slow. Set the governor to <code>performance<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo performance | tee \/sys\/devices\/system\/cpu\/cpu*\/cpufreq\/scaling_governor<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Persist it with a <code>cpufrequtils<\/code> default file or a systemd unit. On a 4 vCPU AMD EPYC instance, this moved a request-loop benchmark by roughly 10\u201315% in back-to-back runs. If your provider exposes no cpufreq interface, skip this step \u2014 many hypervisors pin frequency regardless.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. I\/O Scheduler: Match the Device, Not the Habit<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For NVMe-backed storage, <code>none<\/code> (or <code>mq-deadline<\/code> on older kernels) beats the legacy <code>bfq<\/code> for database and web workloads because the device itself handles queuing efficiently. For spinning disks, keep <code>mq-deadline<\/code>. Check what you have, then set it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat \/sys\/block\/nvme0n1\/queue\/scheduler\necho none > \/sys\/block\/nvme0n1\/queue\/scheduler<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Measure the change with <code>fio<\/code> using a random-read job at a queue depth your application actually uses. A scheduler swap that improves a synthetic deep-queue test but hurts your single-threaded web app is a regression, not a win.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. Memory: Tune swappiness and Overcommit Deliberately<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><code>vm.swappiness<\/code> defaults to 60, which pushes pages to swap too early on a server with adequate RAM. Lowering it to 10 keeps hot application memory resident and treats swap as a last resort rather than a routine overflow:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sysctl -w vm.swappiness=10\nsysctl -w vm.vfs_cache_pressure=50<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Do not set swappiness to 0 on a VPS \u2014 that can trigger the OOM killer instead of a slow, survivable swap. Pair this with a correctly sized swap file measured against your largest working set, and validate under load rather than assuming lower is always better.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. Network Stack: Buffer Sizing and Backlogs<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">On high-latency links, the default TCP receive buffer is too small to fill the bandwidth-delay product. Raising the maximums helps throughput on long-distance connections without harming local traffic:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sysctl -w net.core.rmem_max=16777216\nsysctl -w net.core.wmem_max=16777216\nsysctl -w net.ipv4.tcp_rmem=\"4096 87380 16777216\"\nsysctl -w net.ipv4.tcp_wmem=\"4096 65536 16777216\"\nsysctl -w net.core.somaxconn=4096<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If throughput is the goal rather than latency, also enable BBR congestion control. Verify each change with a repeatable test and write the final values to <code>\/etc\/sysctl.d\/99-tuning.conf<\/code> so they survive reboots.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Verifying That Tuning Actually Helped<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Every parameter above is a hypothesis. Confirm it with a before\/after measurement using the same load, the same data, and at least three runs. Record baseline numbers in a text file alongside the change so a future operator knows why a value was set. Tuning without a measurement log is indistinguishable from superstition, and the fastest way to lose performance gains is to change three settings at once and attribute the improvement to the wrong one.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Persisting Changes Without Breaking the Next Boot<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>sysctl<\/code> values set above vanish on reboot unless written to a file. Use a single drop-in rather than editing the distribution&#8217;s main configuration, so an upgrade never overwrites your work and so you can revert by deleting one file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/etc\/sysctl.d\/99-tuning.conf\n# add one key=value per line, then:\nsysctl --system<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For the I\/O scheduler, write a small systemd unit or a udev rule keyed to the device path, since the scheduler file is per-device and does not persist through a reboot on its own. Test by rebooting the instance and re-reading each value \u2014 a tuning step you never verified after a restart is a tuning step you may not actually have.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">When Tuning Stops Helping<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">There is a ceiling past which configuration cannot compensate for insufficient resources. If CPU steal stays above 5% under normal load, the host is oversubscribed and you need a plan with guaranteed cores. If random-write IOPS stay low no matter how you set the scheduler, the storage is tiered and the fix is a local-NVMe tier. Recognising this boundary saves days of pointless tuning.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Ordering the Changes to Avoid Confusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Apply the four groups in the order presented, and stop to measure after each one. The governor is free to change and reversible in seconds. The scheduler affects I\/O for every process, so an unexpected regression there can look like an application bug. Memory settings change behaviour only under pressure, which means a mistake may not surface until a traffic spike. Network buffer changes are the most workload-specific of all. Tuning in this order isolates the cause when something goes wrong, and it keeps you from attributing a network improvement to a memory change you made an hour earlier.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Give each change at least one full load cycle before judging it. A tuning value that looks neutral during quiet hours can collapse under peak traffic, and the only way to see that is to observe it at peak.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Start with the governor and scheduler, measure, then move to memory and network \u2014 and revisit the whole set whenever you migrate to new hardware, since <a href=\"https:\/\/virtualserversvps.com\/#providers\">different providers expose different storage and CPU behaviour<\/a>.<\/p>\n\n\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Default Linux settings are tuned for laptops and general-purpose servers, not for a virtual machine competing with neighbours on a shared host. The four settings below are the ones that&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":18,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-413","post","type-post","status-publish","format-standard","hentry","category-performance-optimization"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v26.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>VPS Performance Tuning: CPU Governor, I\/O Scheduler, Memory and Network Settings That Measurably Help - Virtual Servers VPS Blog<\/title>\n<meta name=\"description\" content=\"Default Linux settings are tuned for laptops and general-purpose servers, not for a virtual machine competing with neighbours on a shared host. The four\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-how-to-optimize-cpu-ram-and-disk-i-o-for-maximum-speed-in-2026\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"VPS Performance Tuning: CPU Governor, I\/O Scheduler, Memory and Network Settings That Measurably Help\" \/>\n<meta property=\"og:description\" content=\"VPS Performance Tuning: CPU Governor, I\/O Scheduler, Memory and Network Settings That Measurably Help\" \/>\n<meta property=\"og:url\" content=\"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-how-to-optimize-cpu-ram-and-disk-i-o-for-maximum-speed-in-2026\/\" \/>\n<meta property=\"og:site_name\" content=\"Virtual Servers VPS Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-06-13T20:57:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-02T22:03:54+00:00\" \/>\n<meta name=\"author\" content=\"Virtual-Servers-Vps-Editor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Virtual-Servers-Vps-Editor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-how-to-optimize-cpu-ram-and-disk-i-o-for-maximum-speed-in-2026\/\",\"url\":\"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-how-to-optimize-cpu-ram-and-disk-i-o-for-maximum-speed-in-2026\/\",\"name\":\"VPS Performance Tuning: CPU Governor, I\/O Scheduler, Memory and Network Settings That Measurably Help - Virtual Servers VPS Blog\",\"isPartOf\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#website\"},\"datePublished\":\"2026-06-13T20:57:35+00:00\",\"dateModified\":\"2026-10-02T22:03:54+00:00\",\"author\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0\"},\"description\":\"Default Linux settings are tuned for laptops and general-purpose servers, not for a virtual machine competing with neighbours on a shared host. The four\",\"breadcrumb\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-how-to-optimize-cpu-ram-and-disk-i-o-for-maximum-speed-in-2026\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-how-to-optimize-cpu-ram-and-disk-i-o-for-maximum-speed-in-2026\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-how-to-optimize-cpu-ram-and-disk-i-o-for-maximum-speed-in-2026\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/virtualserversvps.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"VPS Performance Tuning: CPU Governor, I\/O Scheduler, Memory and Network Settings That Measurably Help\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#website\",\"url\":\"https:\/\/virtualserversvps.com\/blog\/\",\"name\":\"Virtual Servers VPS Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/virtualserversvps.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0\",\"name\":\"Virtual-Servers-Vps-Editor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g\",\"caption\":\"Virtual-Servers-Vps-Editor\"},\"sameAs\":[\"https:\/\/virtualserversvps.com\/blog\"],\"url\":\"https:\/\/virtualserversvps.com\/blog\/author\/virtualserversvps\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"VPS Performance Tuning: CPU Governor, I\/O Scheduler, Memory and Network Settings That Measurably Help - Virtual Servers VPS Blog","description":"Default Linux settings are tuned for laptops and general-purpose servers, not for a virtual machine competing with neighbours on a shared host. The four","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-how-to-optimize-cpu-ram-and-disk-i-o-for-maximum-speed-in-2026\/","og_locale":"en_US","og_type":"article","og_title":"VPS Performance Tuning: CPU Governor, I\/O Scheduler, Memory and Network Settings That Measurably Help","og_description":"VPS Performance Tuning: CPU Governor, I\/O Scheduler, Memory and Network Settings That Measurably Help","og_url":"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-how-to-optimize-cpu-ram-and-disk-i-o-for-maximum-speed-in-2026\/","og_site_name":"Virtual Servers VPS Blog","article_published_time":"2026-06-13T20:57:35+00:00","article_modified_time":"2026-10-02T22:03:54+00:00","author":"Virtual-Servers-Vps-Editor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Virtual-Servers-Vps-Editor","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-how-to-optimize-cpu-ram-and-disk-i-o-for-maximum-speed-in-2026\/","url":"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-how-to-optimize-cpu-ram-and-disk-i-o-for-maximum-speed-in-2026\/","name":"VPS Performance Tuning: CPU Governor, I\/O Scheduler, Memory and Network Settings That Measurably Help - Virtual Servers VPS Blog","isPartOf":{"@id":"https:\/\/virtualserversvps.com\/blog\/#website"},"datePublished":"2026-06-13T20:57:35+00:00","dateModified":"2026-10-02T22:03:54+00:00","author":{"@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0"},"description":"Default Linux settings are tuned for laptops and general-purpose servers, not for a virtual machine competing with neighbours on a shared host. The four","breadcrumb":{"@id":"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-how-to-optimize-cpu-ram-and-disk-i-o-for-maximum-speed-in-2026\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-how-to-optimize-cpu-ram-and-disk-i-o-for-maximum-speed-in-2026\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-how-to-optimize-cpu-ram-and-disk-i-o-for-maximum-speed-in-2026\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/virtualserversvps.com\/blog\/"},{"@type":"ListItem","position":2,"name":"VPS Performance Tuning: CPU Governor, I\/O Scheduler, Memory and Network Settings That Measurably Help"}]},{"@type":"WebSite","@id":"https:\/\/virtualserversvps.com\/blog\/#website","url":"https:\/\/virtualserversvps.com\/blog\/","name":"Virtual Servers VPS Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/virtualserversvps.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0","name":"Virtual-Servers-Vps-Editor","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g","caption":"Virtual-Servers-Vps-Editor"},"sameAs":["https:\/\/virtualserversvps.com\/blog"],"url":"https:\/\/virtualserversvps.com\/blog\/author\/virtualserversvps\/"}]}},"_links":{"self":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/413","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/comments?post=413"}],"version-history":[{"count":3,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/413\/revisions"}],"predecessor-version":[{"id":1275,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/413\/revisions\/1275"}],"wp:attachment":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/media?parent=413"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/categories?post=413"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/tags?post=413"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}