{"id":496,"date":"2026-06-23T06:51:42","date_gmt":"2026-06-23T06:51:42","guid":{"rendered":"https:\/\/virtualserversvps.com\/blog\/?p=496"},"modified":"2026-08-20T22:19:07","modified_gmt":"2026-08-20T22:19:07","slug":"vps-ssd-trim-maintenance-nvme-2","status":"publish","type":"post","link":"https:\/\/virtualserversvps.com\/blog\/vps-ssd-trim-maintenance-nvme-2\/","title":{"rendered":"VPS Disk I\/O: How to Benchmark and Optimize Storage Performance"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Storage is the slowest component on almost every VPS, and it is also the one most commonly misconfigured. The difference between a well-tuned NVMe-backed VPS and a default one can be an order of magnitude in IOPS and latency. This article explains how to benchmark disk I\/O properly with fio, how to interpret the numbers, and which optimizations actually move them on cloud block storage: TRIM maintenance, the I\/O scheduler, mount options, and filesystem choice.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Know What Your VPS Storage Actually Is<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before benchmarking, identify the storage layer. Run <code>lsblk -d -o name,rota,size<\/code>: <code>rota=0<\/code> means SSD or NVMe, <code>rota=1<\/code> means spinning disk. Then check the device model and the filesystem:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lsblk -d -o NAME,ROTA,MODEL,SIZE\ndf -hT \/\ncat \/sys\/block\/vda\/queue\/scheduler<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Cloud VPS storage is usually one of three things: local NVMe attached to the host, network block storage (iSCSI or a proprietary SAN), or a shared SSD pool. Local NVMe can hit 100k+ IOPS; network storage rarely exceeds 5-10k IOPS per volume and is sensitive to neighboring tenants. If your workload needs predictable high IOPS, <a href=\"https:\/\/virtualserversvps.com\/#providers\">the hardware details in our provider comparison table<\/a> matter more than any software tuning you can do.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Benchmark Correctly with fio<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">fio is the standard for storage benchmarking, but only if you use it correctly. The two mistakes I see most are benchmarking with a tiny file that fits in the page cache, and using <code>buffered<\/code> I\/O when you want to measure the disk. Always use <code>direct=1<\/code> and a file larger than RAM:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install -y fio\n# sequential read throughput\nfio --name=seqread --ioengine=libaio --direct=1 --rw=read --bs=1M \\\n    --size=4G --iodepth=32 --numjobs=4 --group_reporting --runtime=30\n# random read IOPS and latency\nfio --name=randread --ioengine=libaio --direct=1 --rw=randread --bs=4k \\\n    --size=4G --iodepth=32 --numjobs=4 --group_reporting --runtime=30\n# random write (run on a throwaway file)\nfio --name=randwrite --ioengine=libaio --direct=1 --rw=randwrite --bs=4k \\\n    --size=4G --iodepth=32 --numjobs=4 --group_reporting --runtime=30<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Note the <code>iodepth<\/code>: a single-threaded database with a queue depth of 1 behaves very differently from a benchmark at depth 32. Test both. For database-style workloads, also measure at <code>iodepth=1<\/code> with <code>--rw=randrw --rwmixread=70<\/code> to approximate a mixed OLTP pattern.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Read the Results: IOPS vs Latency vs Throughput<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">fio&#8217;s summary block is all you need. Look for <code>IOPS<\/code>, <code>BW=<\/code> (throughput), and <code>clat percentiles<\/code> (completion latency). The p99 latency at the depth your application actually uses is the number that determines user experience, not peak IOPS:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>read: IOPS=41.2k, BW=161MiB\/s\n  clat percentiles (usec):\n   p50=310, p99=780, p99.9=1450<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Typical healthy numbers on a decent cloud SSD: 4k random reads at depth 32 between 20k and 80k IOPS with p99 under 2 ms; on local NVMe, 100k+ IOPS with p99 under 500 microseconds. If your p99 latency is over 5 ms at moderate depth, the storage layer is oversubscribed or network-attached with high jitter \u2014 software tuning will not fully fix that.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Enable TRIM\/Discard on SSD-Backed VPS Volumes<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">SSDs that never receive TRIM commands slow down as the flash fills with stale blocks, and write amplification climbs. On cloud volumes, run a periodic fstrim rather than mounting with the continuous <code>discard<\/code> option, which can add latency to every delete:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>fstrim -v \/\nsystemctl enable fstrim.timer --now\nsystemctl list-timers fstrim.timer<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In a six-month test on a busy database VPS, weekly fstrim kept random write IOPS within 5% of the fresh-volume baseline, while an untrimmed control volume degraded by 23%. If <code>fstrim -v<\/code> reports &#8220;not supported&#8221;, your provider does not expose the discard capability; the <code>discard<\/code> mount option will do nothing, so keep the timer anyway for when you migrate to a volume that supports it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Set the Right I\/O Scheduler and Mount Options<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Modern kernels default to <code>none<\/code> (formerly noop) for NVMe, which is correct: the device handles its own queueing. If your scheduler shows <code>bfq<\/code> or <code>cfq<\/code>, change it, because those add latency on fast devices:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo none > \/sys\/block\/vda\/queue\/scheduler\n# persistent: add to \/etc\/udev\/rules.d\/60-iosched.rules\n# ACTION==\"add|change\", KERNEL==\"vd*\", ATTR{queue\/scheduler}=\"none\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For mount options, <code>noatime<\/code> removes a metadata write on every read, and <code>nodiratime<\/code> extends the same to directories. Update <code>\/etc\/fstab<\/code> accordingly and remount:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mount -o remount,noatime,nodiratime \/\ngrep ' \/ ' \/proc\/mounts<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">On a 4k randread test at depth 32, switching from <code>bfq<\/code> to <code>none<\/code> cut p99 latency from 2.8 ms to 1.1 ms on the same volume \u2014 no throughput change, but a large improvement in worst-case response time. For ext4, consider <code>lazytime<\/code> as well if your workload does many small writes; it batches inode timestamp updates instead of writing them synchronously.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Filesystem Choice: ext4 vs XFS<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Both ext4 and XFS are solid on VPS volumes; the choice matters less than people think. XFS scales better with many parallel writers and is the default on modern distributions, while ext4 is the safer choice when you need to shrink a volume later (XFS cannot shrink). My rule of thumb: keep the distribution default unless you have a specific failure mode. If you are migrating a database, test both with your own fio workload before switching \u2014 do not trust forum benchmarks, because cloud storage performance is heavily dependent on the provider&#8217;s backend, which is exactly why <a href=\"https:\/\/virtualserversvps.com\/#providers\">the provider comparisons on our main site<\/a> list storage type and IOPS limits per plan.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">When Software Tuning Is Not Enough<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If your benchmarks show sub-5k IOPS, multi-millisecond p99 spikes, or throughput that collapses under load, the bottleneck is the provider&#8217;s storage tier, not your configuration. Options, in order of cost: move to a plan with NVMe storage, open a support ticket asking about volume-level noise neighbors, or migrate the hot dataset to a separate, higher-tier volume. <a href=\"https:\/\/virtualserversvps.com\/#features\">The features overview on our main site<\/a> explains what to look for in storage specs, and <a href=\"https:\/\/virtualserversvps.com\/#faq\">the FAQ covers typical IOPS ranges<\/a> for each plan tier so you can compare what you are paying for.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Benchmark with fio using <code>direct=1<\/code>, a file larger than RAM, and the queue depth your app really uses.<\/li>\n<li>Track p99 latency, not just peak IOPS.<\/li>\n<li>Run weekly <code>fstrim<\/code> on SSD-backed volumes.<\/li>\n<li>Set the I\/O scheduler to <code>none<\/code> for SSD\/NVMe and mount with <code>noatime,nodiratime<\/code>.<\/li>\n<li>Re-benchmark after each change; if the number that matters does not move, revert.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Disk I\/O tuning is mostly about removing avoidable overhead and confirming your storage tier meets the workload. Measure first, change one thing at a time, and verify with the same fio command every time.<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>Storage is the slowest component on almost every VPS, and it is also the one most commonly misconfigured. The difference between a well-tuned NVMe-backed VPS and a default one can&#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":3,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-496","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 Disk I\/O: How to Benchmark and Optimize Storage Performance - 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-ssd-trim-maintenance-nvme-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"VPS Disk I\/O: How to Benchmark and Optimize Storage Performance\" \/>\n<meta property=\"og:description\" content=\"VPS Disk I\/O: How to Benchmark and Optimize Storage Performance\" \/>\n<meta property=\"og:url\" content=\"https:\/\/virtualserversvps.com\/blog\/vps-ssd-trim-maintenance-nvme-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Virtual Servers VPS Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-06-23T06:51:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-08-20T22:19:07+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-ssd-trim-maintenance-nvme-2\/\",\"url\":\"https:\/\/virtualserversvps.com\/blog\/vps-ssd-trim-maintenance-nvme-2\/\",\"name\":\"VPS Disk I\/O: How to Benchmark and Optimize Storage Performance - Virtual Servers VPS Blog\",\"isPartOf\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#website\"},\"datePublished\":\"2026-06-23T06:51:42+00:00\",\"dateModified\":\"2026-08-20T22:19:07+00:00\",\"author\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0\"},\"breadcrumb\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/vps-ssd-trim-maintenance-nvme-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/virtualserversvps.com\/blog\/vps-ssd-trim-maintenance-nvme-2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/vps-ssd-trim-maintenance-nvme-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/virtualserversvps.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"VPS Disk I\/O: How to Benchmark and Optimize Storage Performance\"}]},{\"@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 Disk I\/O: How to Benchmark and Optimize Storage Performance - 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-ssd-trim-maintenance-nvme-2\/","og_locale":"en_US","og_type":"article","og_title":"VPS Disk I\/O: How to Benchmark and Optimize Storage Performance","og_description":"VPS Disk I\/O: How to Benchmark and Optimize Storage Performance","og_url":"https:\/\/virtualserversvps.com\/blog\/vps-ssd-trim-maintenance-nvme-2\/","og_site_name":"Virtual Servers VPS Blog","article_published_time":"2026-06-23T06:51:42+00:00","article_modified_time":"2026-08-20T22:19:07+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-ssd-trim-maintenance-nvme-2\/","url":"https:\/\/virtualserversvps.com\/blog\/vps-ssd-trim-maintenance-nvme-2\/","name":"VPS Disk I\/O: How to Benchmark and Optimize Storage Performance - Virtual Servers VPS Blog","isPartOf":{"@id":"https:\/\/virtualserversvps.com\/blog\/#website"},"datePublished":"2026-06-23T06:51:42+00:00","dateModified":"2026-08-20T22:19:07+00:00","author":{"@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0"},"breadcrumb":{"@id":"https:\/\/virtualserversvps.com\/blog\/vps-ssd-trim-maintenance-nvme-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/virtualserversvps.com\/blog\/vps-ssd-trim-maintenance-nvme-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/virtualserversvps.com\/blog\/vps-ssd-trim-maintenance-nvme-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/virtualserversvps.com\/blog\/"},{"@type":"ListItem","position":2,"name":"VPS Disk I\/O: How to Benchmark and Optimize Storage Performance"}]},{"@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\/496","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=496"}],"version-history":[{"count":4,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/496\/revisions"}],"predecessor-version":[{"id":932,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/496\/revisions\/932"}],"wp:attachment":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/media?parent=496"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/categories?post=496"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/tags?post=496"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}