Windows – Using a portable SSD to divert or reduce writes to system storage on a low-memory Windows 10 laptop

cacheperformancessdusb-flash-drivewindows-10-v1709

TL;DR

Is there a way to use a USB 3.0 portable SSD to reduce writing to an inexpensive laptop's low-capacity eMMC storage? The system has only 2 GB of RAM, so paging is often unavoidable, resulting in more writes than would otherwise occur to the already fragile TLC NAND.


Background

This question I'm asking here is similar to "Minimize writes to SSD disks with Windows 7", and I've already taken some of those steps, but involves the additional complication of low memory.

I just acquired a Lenovo Flex 4-1130 2-in-1 laptop (spec sheet), an inexpensive system with 64 GB of eMMC storage and 2 GB of memory. While the laptop technically accepts a 2.5", 7mm z-height SATA hard drive or SSD, that would require disassembling a brand-new system that's not meant to be user-serviceable (not to mention that this defeats the purpose of spending $230 on the system), so I'd rather not do that if at all possible. I briefly opened the bottom cover and found no SATA connector inside.

While 64 GB of storage is better than many other laptops of this sort, which often have as little as 32 GB, it is TLC NAND, which has low endurance. The low capacity also means that the drive fills up easily, making it difficult to keep write amplification down, which further reduces the endurance of the eMMC. The low capacity itself limits endurance as well. Taken together, this means that the lifespan of the NAND is a genuine concern on this laptop (and other similarly-constrained low-cost laptops).

Complicating this is that fact that there is only 2 GB of RAM on this system. While Windows 10 has a memory compression feature, it is often not enough to prevent paging from occurring. Considering that TLC NAND is typically good for only about 750 to 1,500 write cycles, this leaves me very concerned about write endurance.

However, I have a USB 3.0 portable SSD that performs similarly to the internal eMMC except that the random write performance is significantly better (as measured by benchmarks). The endurance of this drive is not an issue.

Update: Some research found that the underlying eMMC module is SanDisk iNAND 7232 with part number SDINADF4-64G-H. The datasheet (page 17) states that this 64 GB module has an endurance rating of 44 TBW under a representative Android workload. This is approximately 700 full drive writes over the life of the eMMC module, and allows for about 40 GB per day over three years, or 24 GB per day over five years. In my experience, intensive paging under heavier workloads can easily write several gigabytes of data to disk within a few minutes' time so exceeding the endurance rating is not an unrealistic possibility. Furthermore, usage under Windows can produce more intensive I/O patterns than under Android (more random writes, more usage in a near-full state) which can increase write amplification and reduce endurance below these ratings.

To make matters worse, the cheapest Windows 10 netbooks typically have only 32 GB of storage, which cuts endurance in half, and realistically even less due to the lower capacity increasing disk utilization and therefore write amplification. Assuming that the device is to be used for three years and has the same type of eMMC module, this means that the rated endurance is only 20 GB per day, and real-world endurance may be less than 10 GB per day due to higher write amplification. As such, eMMC failure is a surprisingly common failure mode with these kinds of laptops, making the need to preserve write endurance particularly acute.

The question

Is there a way to use this portable SSD to reduce writes to, or divert writes away from, the system storage? Possible solutions include using it as paging/swap space (which Windows does not support), or as a write-back cache that coalesces and defers writes to the eMMC, reducing redundant writes and converting small random writes into larger sequential writes.

However, the former is not supported by Windows (at least in the stock configuration), and the latter can't be done using Romex PrimoCache (it doesn't support using persistent storage for this purpose) (edit: see accepted answer). ReadyBoost is not available because the flash-based storage does not benefit much from read caching (and would not address the endurance issue because it does not buffer, coalesce, or otherwise reduce writes).

Solutions that use existing functionality in Windows 10 Home version 1709 are preferable, but I'm willing to consider third-party software, including reasonably-priced commercial software if necessary. If possible, I should be able to quickly reconfigure the system so that I can readily remove the drive as needed.

Best Answer

A major update to Romex PrimoCache (version 3.0.1) adds support for using the L2 cache (persistent storage) layer for write caching, including with the "Defer-Write" feature which buffers writes in the cache and delays committing them to the backing storage until after a set period of time (e.g. a few seconds). It can be configured to flush the buffer when idle as well. Note that this kind of write buffering carries the risk of data loss or corruption in the event of a system crash so it's not suited for mission-critical applications.

I'm currently using the software with a USB 3.1 enclosure containing an older mSATA SSD (which I consider to be sacrificial) and have found it to be effective in coalescing random writes and in reducing the total amount of data written to the disk. After finding that the the software managed to prevent more than 2 GB of writes from reaching the eMMC during a Windows update, I went ahead and purchased a license.

I would personally prefer that OEMs use more RAM in these laptops to reduce endurance-killing paging (even if it drives up cost) and that Microsoft made further optimizations to reduce the amount of I/O that the system performs to increase endurance. Third-party commercial software should not be necessary to get reasonable endurance out of the storage.