{"id":556,"date":"2026-07-24T19:01:18","date_gmt":"2026-07-24T19:01:18","guid":{"rendered":"https:\/\/virtualserversvps.com\/blog\/?p=556"},"modified":"2026-07-24T19:01:18","modified_gmt":"2026-07-24T19:01:18","slug":"vps-performance-tuning-cpu-governor-io-scheduler-kernel","status":"publish","type":"post","link":"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-cpu-governor-io-scheduler-kernel\/","title":{"rendered":"VPS Performance Tuning: CPU Governor, I\/O Scheduler, and Kernel Settings Explained"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Your VPS comes with conservative default settings that prioritize stability over speed. By tuning a handful of kernel parameters, CPU governors, and I\/O schedulers, you can unlock significant performance gains \u2014 especially on budget VPS plans where every CPU cycle counts.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Check Your Current Performance Profile<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before making changes, capture a baseline. Run these commands to see your current configuration:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># CPU governor\ncat \/sys\/devices\/system\/cpu\/cpu0\/cpufreq\/scaling_governor\n\n# I\/O scheduler\ncat \/sys\/block\/sda\/queue\/scheduler\n\n# Current kernel parameters\nsysctl -a | grep -E \"swappiness|dirty_ratio|dirty_background\"<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">1. Switch the CPU Governor to Performance<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Most VPS instances default to the <code>ondemand<\/code> or <code>powersave<\/code> CPU governor, which scales clock speed down when the server is idle. For consistent performance, switch to the <code>performance<\/code> governor. This keeps the CPU running at maximum frequency at all times.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install linux-tools-common cpufrequtils -y\necho 'GOVERNOR=\"performance\"' | sudo tee \/etc\/default\/cpufrequtils\nsudo systemctl disable ondemand\nsudo cpufreq-set -g performance<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">On virtualized environments, the hypervisor controls the actual clock speed, but setting the governor to performance tells the host scheduler to allocate CPU time more aggressively to your instance. <a href=\"https:\/\/virtualserversvps.com\/#performance\">Performance-optimized VPS plans<\/a> typically have this set by default.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Choose the Right I\/O Scheduler<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The I\/O scheduler determines how disk read\/write requests are ordered. For SSD and NVMe drives, the <code>none<\/code> scheduler (or <code>noop<\/code> on older kernels) performs best because these drives have no mechanical seek time. For HDD-based plans, <code>kyber<\/code> or <code>bfq<\/code> can improve responsiveness.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Set scheduler to none for NVMe\/SSD\necho 'none' | sudo tee \/sys\/block\/sda\/queue\/scheduler\n\n# Make it permanent\necho 'ACTION==\"add|change\", KERNEL==\"sd*\", ATTR{queue\/scheduler}=\"none\"' | sudo tee \/etc\/udev\/rules.d\/60-iosched.rules<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">3. Tune sysctl for Lower Latency<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Kernel parameters control how the Linux kernel handles memory, networking, and I\/O. These settings are especially important on low-memory VPS plans (1\u20132 GB RAM):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Reduce swappiness (default 60) \u2014 keeps more data in RAM\nvm.swappiness=10\n\n# Flush dirty pages more frequently\nvm.dirty_ratio=20\nvm.dirty_background_ratio=5\n\n# Increase network buffer sizes for better throughput\nnet.core.rmem_max=134217728\nnet.core.wmem_max=134217728\n\n# Enable TCP BBR congestion control\nnet.core.default_qdisc=fq\nnet.ipv4.tcp_congestion_control=bbr<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add these to <code>\/etc\/sysctl.d\/99-performance.conf<\/code> and run <code>sudo sysctl --system<\/code> to apply them.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. Optimize Transparent Huge Pages<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Transparent Huge Pages (THP) can cause memory fragmentation on some workloads. For database servers running MySQL or PostgreSQL, disable THP for more consistent performance:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo 'never' | sudo tee \/sys\/kernel\/mm\/transparent_hugepage\/enabled\necho 'never' | sudo tee \/sys\/kernel\/mm\/transparent_hugepage\/defrag<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add the same lines to <code>\/etc\/rc.local<\/code> to persist across reboots.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">5. Verify Your Performance Gains<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">After applying these changes, re-run your benchmarks and compare:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># CPU benchmark\nsysbench cpu run --threads=$(nproc)\n\n# Disk I\/O benchmark (4K random reads)\nfio --name=randread --ioengine=libaio --iodepth=16 --rw=randread     --bs=4k --direct=1 --size=512M --numjobs=4\n\n# Network benchmark\niperf3 -c iperf.he.net<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">These tuning techniques work on any Linux VPS, but their impact varies depending on the underlying virtualization technology and hardware. <a href=\"https:\/\/virtualserversvps.com\/#performance\">Compare VPS performance benchmarks<\/a> across providers to see which ones give you the most headroom for your budget.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Your VPS comes with conservative default settings that prioritize stability over speed. By tuning a handful of kernel parameters, CPU governors, and I\/O schedulers, you can unlock significant performance gains&#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":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-556","post","type-post","status-publish","format-standard","hentry","category-vps-guides-tutorials"],"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, and Kernel Settings Explained - Virtual Servers VPS Blog<\/title>\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-cpu-governor-io-scheduler-kernel\/\" \/>\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, and Kernel Settings Explained\" \/>\n<meta property=\"og:description\" content=\"VPS Performance Tuning: CPU Governor, I\/O Scheduler, and Kernel Settings Explained\" \/>\n<meta property=\"og:url\" content=\"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-cpu-governor-io-scheduler-kernel\/\" \/>\n<meta property=\"og:site_name\" content=\"Virtual Servers VPS Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-24T19:01:18+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=\"3 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-cpu-governor-io-scheduler-kernel\/\",\"url\":\"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-cpu-governor-io-scheduler-kernel\/\",\"name\":\"VPS Performance Tuning: CPU Governor, I\/O Scheduler, and Kernel Settings Explained - Virtual Servers VPS Blog\",\"isPartOf\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#website\"},\"datePublished\":\"2026-07-24T19:01:18+00:00\",\"author\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0\"},\"breadcrumb\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-cpu-governor-io-scheduler-kernel\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-cpu-governor-io-scheduler-kernel\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-cpu-governor-io-scheduler-kernel\/#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, and Kernel Settings Explained\"}]},{\"@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, and Kernel Settings Explained - Virtual Servers VPS Blog","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-cpu-governor-io-scheduler-kernel\/","og_locale":"en_US","og_type":"article","og_title":"VPS Performance Tuning: CPU Governor, I\/O Scheduler, and Kernel Settings Explained","og_description":"VPS Performance Tuning: CPU Governor, I\/O Scheduler, and Kernel Settings Explained","og_url":"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-cpu-governor-io-scheduler-kernel\/","og_site_name":"Virtual Servers VPS Blog","article_published_time":"2026-07-24T19:01:18+00:00","author":"Virtual-Servers-Vps-Editor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Virtual-Servers-Vps-Editor","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-cpu-governor-io-scheduler-kernel\/","url":"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-cpu-governor-io-scheduler-kernel\/","name":"VPS Performance Tuning: CPU Governor, I\/O Scheduler, and Kernel Settings Explained - Virtual Servers VPS Blog","isPartOf":{"@id":"https:\/\/virtualserversvps.com\/blog\/#website"},"datePublished":"2026-07-24T19:01:18+00:00","author":{"@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0"},"breadcrumb":{"@id":"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-cpu-governor-io-scheduler-kernel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-cpu-governor-io-scheduler-kernel\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/virtualserversvps.com\/blog\/vps-performance-tuning-cpu-governor-io-scheduler-kernel\/#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, and Kernel Settings Explained"}]},{"@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\/556","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=556"}],"version-history":[{"count":1,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/556\/revisions"}],"predecessor-version":[{"id":558,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/556\/revisions\/558"}],"wp:attachment":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/media?parent=556"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/categories?post=556"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/tags?post=556"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}