Skip to content
Back to Blog
Performance11 min read

9 NVMe VPS Hosting Mistakes That Kill Your Speed Gains

NVMe VPS hosting delivers exceptional I/O performance, but misconfigurations and poor planning waste that advantage. Avoid these nine common mistakes to get the speed you paid for.

Written by Abdul AbrorTechnical Hosting Support Engineer
9 NVMe VPS Hosting Mistakes That Kill Your Speed Gains
On this page

NVMe storage on a VPS is fast. Very fast. But I've seen dozens of tickets where someone pays extra for NVMe and then wonders why their database queries still crawl or their site feels sluggish under load. The drive itself isn't the problem—it's how they're using it.

The speed advantage of NVMe over SATA SSDs is real. Random read/write operations happen with far lower latency, and sequential throughput scales beautifully. But that raw performance only translates to faster applications when your entire stack is configured to take advantage of it. Miss one piece—filesystem options, I/O scheduler, kernel tuning, or resource allocation—and you leave speed on the table.

Here are the nine mistakes I see most often, and how to fix each one.

Mistake 1: Ignoring the I/O scheduler

The Linux kernel's I/O scheduler sits between your application and the storage layer. Legacy schedulers like cfq and deadline were designed for spinning disks with seek penalties. NVMe drives have no mechanical latency, so those schedulers add overhead with no benefit.

Check your current scheduler:

cat /sys/block/nvme0n1/queue/scheduler

If you see [mq-deadline] or [bfq] in brackets, you're using a queue-based scheduler that might be adding unnecessary latency. For NVMe, none or kyber are better choices. The none scheduler passes requests directly to the hardware queue with minimal intervention.

Switch it:

echo none | sudo tee /sys/block/nvme0n1/queue/scheduler

To make it permanent, add elevator=none to your kernel boot parameters in /etc/default/grub and run update-grub.

In support tickets I handled, switching from mq-deadline to none dropped database commit latency by 20-40% on write-heavy workloads. That's free performance.

Mistake 2: Using ext4 with default mount options

ext4 is stable and widely supported, but its default mount options were chosen for compatibility, not speed. Two flags matter most: noatime and discard.

By default, ext4 updates the access time (atime) every time you read a file. That's a write operation on every read. On a busy web server serving thousands of static assets per minute, those writes add up.

Mount with noatime:

# /etc/fstab
/dev/nvme0n1p1 / ext4 defaults,noatime,discard 0 1

The discard option tells the filesystem to issue TRIM commands immediately when blocks are freed. Some argue for discard=async instead, which batches TRIM operations and reduces overhead. Test both.

Remount without rebooting:

sudo mount -o remount,noatime,discard /

I've also seen people use relatime as a compromise, which only updates atime if the file was modified since the last access. It's better than full atime, but noatime is still faster if you don't need access timestamps.

Mistake 3: Picking the wrong filesystem entirely

ext4 isn't your only option. XFS and btrfs both handle concurrent writes more gracefully than ext4, and they scale better on multi-core systems.

XFS excels at parallel I/O and large files. If you're running a database or handling media uploads, XFS often outperforms ext4. Btrfs adds features like snapshots and compression, but its write amplification can hurt performance on some workloads.

For a typical LAMP stack with MariaDB, I'd use XFS. Format the data partition:

sudo mkfs.xfs -f /dev/nvme0n1p2

Mount it with:

# /etc/fstab
/dev/nvme0n1p2 /var/lib/mysql xfs defaults,noatime,inode64 0 0

The inode64 option lets XFS allocate inodes across the full address space, which improves performance on large filesystems.

Don't blindly follow benchmarks, though. Test your own workload. What wins in synthetic tests might lose in production.

Mistake 4: Overselling yourself on "dedicated" NVMe

Many VPS providers advertise NVMe storage, but the actual I/O performance you get depends on how many other VMs share the same physical drive. If the host oversells IOPS or doesn't enforce I/O limits properly, your "NVMe VPS" can perform worse than a properly provisioned SATA SSD VPS on a less crowded host.

You can't fix this from inside the VM, but you can test it before committing. Run fio benchmarks at different times of day:

sudo fio --name=random-write --ioengine=libaio --iodepth=32 --rw=randwrite \
  --bs=4k --direct=1 --size=1G --numjobs=4 --runtime=60 --time_based \
  --group_reporting --filename=/tmp/fio-test

If your 4K random write IOPS drop by 70% during peak hours, you're on an oversold node. Shop elsewhere.

Mistake 5: Leaving swappiness at default

Linux defaults to vm.swappiness=60, which tells the kernel to be fairly aggressive about swapping memory pages to disk. On a system with NVMe storage, swapping is faster than on spinning rust, but it's still orders of magnitude slower than RAM.

For most VPS workloads—web servers, databases, caching layers—you want the kernel to prefer keeping things in RAM. Lower swappiness:

echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

A value of 10 tells the kernel to avoid swapping unless memory pressure is severe. If you're running memory-intensive applications that occasionally spike, a bit of swap headroom is fine, but don't let the kernel treat swap as an extension of RAM.

Check current usage:

free -h

If you see swap usage climbing while you still have free RAM, drop swappiness further.

So what if you've tuned everything and it's still slow?

Check your neighbors. On a VPS, you share CPU, network, and sometimes memory bandwidth with other tenants. A noisy neighbor can saturate the NVMe controller or the host's CPU scheduler, leaving you with inconsistent latency.

You can observe this indirectly. If your iowait percentage in top spikes unpredictably and your drive's queue depth stays maxed out (iostat -x 1), the bottleneck might not be your VM—it's the host.

iostat -x 1

Watch the %util column. If it bounces between 30% and 100% with no pattern matching your workload, that's a red flag.

Mistake 6: Running a database on root partition

I see this constantly: someone spins up a VPS, installs MySQL or PostgreSQL, and leaves the data directory under /var/lib/mysql or /var/lib/postgresql on the root filesystem. Then they tune the application, add indexes, optimize queries—and still hit I/O bottlenecks.

The root partition juggles logging, package updates, web server writes, temp files, and database commits. That's too many competing workloads for one mountpoint.

Move the database to its own partition or volume, ideally on a separate NVMe namespace if your provider supports it. Mount it with options tuned for database I/O:

# /etc/fstab
/dev/nvme0n1p3 /var/lib/mysql xfs noatime,nodiratime,nobarrier 0 0

The nobarrier flag is controversial. It trades write-ordering guarantees for speed. If your VPS has battery-backed cache or the hypervisor honors flush commands properly, it's safe. If not, you risk corruption on power loss. Know your infrastructure.

Relocate MySQL:

sudo systemctl stop mysql
sudo rsync -av /var/lib/mysql/ /new/mountpoint/mysql/
sudo mv /var/lib/mysql /var/lib/mysql.bak
sudo ln -s /new/mountpoint/mysql /var/lib/mysql
sudo systemctl start mysql

Verify it's using the new location:

sudo mysql -e "SHOW VARIABLES LIKE 'datadir';"

Mistake 7: Forgetting kernel I/O tuning

The kernel has dozens of tunables that affect I/O behavior. Two matter most for NVMe workloads: the request queue depth and the read-ahead size.

NVMe drives thrive on deep queues. Check your current queue depth:

cat /sys/block/nvme0n1/queue/nr_requests

Default is often 128. For database or high-concurrency workloads, bump it:

echo 1024 | sudo tee /sys/block/nvme0n1/queue/nr_requests

Read-ahead prefetches data sequentially. It helps for large file reads but wastes bandwidth on random access. For databases or random I/O workloads, reduce it:

echo 256 | sudo tee /sys/block/nvme0n1/queue/read_ahead_kb

Default is usually 4096 KB. Dropping to 256 or 512 can improve random read latency.

Make these permanent by adding them to a udev rule in /etc/udev/rules.d/60-nvme-tuning.rules:

ACTION=="add|change", KERNEL=="nvme0n1", ATTR{queue/nr_requests}="1024", ATTR{queue/read_ahead_kb}="256"

Mistake 8: Not monitoring actual I/O metrics

People assume NVMe means fast, so they never check. Then a slow query or a sluggish page load surprises them.

You need three things: IOPS, latency, and queue depth. iostat gives you the first two:

iostat -x 1 nvme0n1

Look at r/s (read IOPS), w/s (write IOPS), r_await (read latency in ms), and w_await (write latency). If your await times are above 10ms regularly, something's wrong.

For deeper visibility, install blktrace:

sudo blktrace -d /dev/nvme0n1 -o trace
sudo blkparse -i trace

This shows exactly what I/O your applications issued, how long each operation took, and where queuing delays happened. It's overkill for routine monitoring but invaluable when debugging.

Set up automated alerts. If your average write latency crosses 15ms or your queue depth stays above 80% for more than a minute, you want to know immediately.

Mistake 9: Expecting NVMe to fix application-layer problems

This is the big one. No amount of storage speed will save you from an unindexed database query, a poorly designed caching layer, or an application that does synchronous writes in a request loop.

I once troubleshot a WordPress site on NVMe where page load times hit 8 seconds. The client insisted the drive was faulty. Turns out the site was making 200+ SQL queries per page view, half of them full table scans. The NVMe drive was doing exactly what it was asked to do—just too much of it.

Profile first. Use mytop for MySQL:

mytop -u root -p

Or pg_stat_statements for PostgreSQL. Identify slow queries. Add indexes. Cache aggressively. Only after you've optimized the application layer should you blame the storage.

For PHP apps, enable an opcode cache (OPcache). For Node.js, check if you're using synchronous file I/O (fs.readFileSync) where you should be using async (fs.promises.readFile). The storage is rarely the bottleneck—it's what you're asking it to do.

Frequently asked questions

Does NVMe always beat SATA SSD on a VPS?
Not always. If the VPS host oversells IOPS or throttles aggressively, a well-provisioned SATA SSD VPS on a quieter node can outperform a cheap NVMe VPS.

Should I use RAID on NVMe VPS storage?
Most VPS environments don't expose raw NVMe devices to guests. RAID happens at the hypervisor level if at all. Software RAID inside the VM adds CPU overhead for little benefit.

Can I use btrfs compression with NVMe?
Yes, but test it. Compression trades CPU cycles for reduced write amplification. On NVMe, writes are so fast that the CPU overhead might cost more than you save.

What's a realistic IOPS expectation for NVMe VPS?
It varies wildly by provider. A good NVMe VPS should sustain 10k+ random read IOPS and 5k+ random write IOPS at 4K block size. Anything under 3k writes suggests throttling or overselling.

What to check first when speed disappoints

Start with the I/O scheduler. Confirm you're using none or kyber for NVMe devices. Check your filesystem mount options—noatime alone will give you a noticeable bump on busy servers.

Run iostat -x 1 during peak load and watch await times. If they're high but your application isn't issuing heavy I/O, the bottleneck is elsewhere—likely CPU or a noisy neighbor.

Finally, profile your application. Look at slow query logs, enable debugging, trace system calls. NVMe gives you headroom, but it won't compensate for inefficient code. Fix the workload first, then tune the storage layer to support it.