Over the past five years, I have gone through two NVMe SSDs in my home server. The first one lasted barely a year, and the second died after three and a half years. My server is a compact, heat-prone mini PC (Lenovo ThinkCentre M900 Tiny) running Proxmox VE. When I installed a brand-new budget Chinese NVMe drive about a month ago, I decided not to wait for the next failure—I wanted to get to the bottom of what was actually killing these drives.
What I found came down to two main culprits. First, Proxmox (which was originally built for enterprise environments) performs thousands of constant background writes that quickly chew through consumer-grade SSDs. Second, many budget NVMe controllers run at full throttle 24/7 under Linux, hitting idle temperatures of 75–77°C even when the server is doing nothing.
In this guide, I have compiled all the practical optimizations I applied to my setup—simple tweaks that cut background disk writes dramatically and dropped my controller temperature to a rock-solid ~60°C.
Part 1: Reducing Unnecessary Disk Writes (TBW)
When running a single-node Proxmox server at home, the system still behaves like part of an enterprise cluster, constantly writing tiny logs and state updates to the drive. Here is how to stop it:
1. Disable Cluster Services (Single-Node Setups)
If you are only running a single Proxmox server, the cluster synchronization services (pve-cluster and corosync) continuously write logs and data to your disk. Stopping them saves a massive amount of background wear (and if you ever add a second node later, you can simply re-enable them).
2. Move System Logs to RAM with log2ram
Instead of letting Linux write every single log entry directly to your NVMe drive, log2ram creates a mount point in your system RAM, stores logs there, and flushes them to the disk only once a day. This is easily one of the most effective ways to extend SSD lifespan.
3. Disable File Access Time Tracking (noatime)
By default, Linux updates a timestamp on the disk every time a file is merely read. Adding the noatime flag in /etc/fstab eliminates this unnecessary write overhead.
Open the file (nano /etc/fstab) and add ,noatime to your root partition like this:
/dev/pve/root / ext4 errors=remount-ro,noatime 0 1
Apply the change immediately without rebooting:
systemctl daemon-reload && mount -o remount /
4. Minimize Swap Usage (swappiness)
Linux’s default swappiness value (60) causes the system to start swapping data to the disk well before your RAM is actually full. Running the command below lowers this value to 1, instructing the kernel to use disk swap only in a true out-of-memory emergency:
echo "vm.swappiness=1" > /etc/sysctl.d/99-swappiness.conf && sysctl -p /etc/sysctl.d/99-swappiness.conf
Part 2: Reclaiming Dead Blocks (Discard / TRIM)
When you delete files inside a virtual machine or container, the guest OS marks that space as free, but the underlying NVMe controller doesn't always know about it. Running TRIM informs the SSD which blocks are no longer in use, preventing write amplification and keeping the drive healthy.
A. Virtual Machines (VMs)
In the Proxmox web UI, go to each VM’s Hardware tab, double-click its Hard Disk, and check the Discard box (make sure your SCSI controller is set to VirtIO SCSI).
B. The Proxmox Host
Run the following command to verify that Proxmox’s built-in weekly TRIM timer is active and running:
systemctl status fstrim.timer
C. LXC Containers — Manual and Automated
LXC containers do not have a Discard checkbox in the UI, and the host’s weekly timer does not reach inside container filesystems (on my very first manual run, this freed up over 100GB of dead blocks!).
To run a one-time manual TRIM across all currently running containers:
for id in $(pct list | awk 'NR>1 && $2=="running" {print $1}'); do echo "Trimming CT $id..."; pct fstrim $id; done
To automate this every week, open your crontab (crontab -e) and add the following line at the bottom (runs every Sunday at 3:30 AM without generating extra logs):
30 3 * * 0 for id in $(pct list | awk 'NR>1 && $2=="running" {print $1}'); do pct fstrim $id >/dev/null 2>&1; done
Part 3: Lowering Temperatures on Budget NVMe Drives
When checking NVMe temperatures via SMART tools, pay close attention to two separate sensors: Temperature (the NAND flash chips) and Temperature Sensor 1 (the main SSD controller—which runs significantly hotter).
Balancing Kernel Power Management (APST Latency)
On many budget NVMe drives, the controller never enters a low-power idle state in Linux, drawing its maximum 3W continuously and pushing temperatures past 75°C. However, I learned the hard way that forcing a budget controller into deep sleep states (using high latency values like 5500) can cause it to drop off the PCIe bus and reboot the server under load.
The Sweet Spot: Set the kernel's maximum power-state transition latency to 250 microseconds. This allows the controller to enter light, fast-waking idle states (dropping temperatures by 10–15°C) without risking deep-sleep disconnects.
Open your GRUB configuration (nano /etc/default/grub) and update the default command line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet nvme_core.default_ps_max_latency_us=250"
Save the file, update GRUB, and reboot:
update-grub && reboot
Physical Cooling in Cramped Mini PCs
In tight mini PC cases like the Lenovo Tiny, leaving the top cover off actually breaks the engineered airflow channel. Place a thermal pad bridging the NVMe controller to an adjacent metal surface (such as the aluminum 2.5" SATA drive caddy above it) and keep the case closed so your fan can maintain steady airflow across the components.
Part 4: Monitoring Drive Health Over Time
Run the following command periodically (or integrate it into a daily monitoring script) to keep an eye on your drive's status:
smartctl -a /dev/nvme0n1
What to look for:
Data Units Written: Shows your cumulative TBW (total terabytes written over the drive's lifetime). After applying these tweaks, you should see this number climb much more slowly.Percentage Used: The percentage of the manufacturer's rated endurance used so far.Temperature Sensor 1: Your controller temperature (aim for 50–65°C under normal operation).








Leave a Reply