How Microsoft's DirectStorage 1.2 Update Can Speed Up Your Crusty Old Hard Drive

hero hard drive
Most of the discussion around Microsoft's DirectStorage API has been centered around games and how it can drastically reduce their load times when paired with fast NVMe SSDs. DirectStorage as an API actually works on any kind of storage device, though, and it offers reduced overhead even on old spinning rust. However, getting the best performance from both SSDs and HDDs required separate code paths for each type of device.

DirectStorage 1.2 is now available, and one of the key changes in this revision is that developers can configure a setting which enables—indeed, forces—the use of buffered accesses, which can help mask relatively-long hard drive seek times. This allows developers to simply toggle on this setting when loading from a hard drive instead of having to write an entire second codepath for disk accesses.

bypassio model
BypassIO is the main benefit of DirectStorage on SSDs, but can be slower on HDDs.

However, the "ForceFileBuffering" setting in DirectStorage is exclusive with the BypassIO feature. BypassIO is one of the key features in DirectStorage that allows the application to skip most of Windows' extensive storage stack and access the raw data coming from the SSD, drastically reducing disk access overhead. This overhead is infinitesimal compared to the access latency of hard drives, but it rapidly becomes a factor with fast NVMe SSDs. As a result, developers will want to be careful with this setting, as it is not suitable for use with SSDs.

traditional io model
The traditional Windows IO model includes significant buffering. Images: Microsoft

Aside from the file buffering toggle, there's also a new API that developers can use to query the DirectStorage driver and find out exactly what path it is using for file decompression. Frankly, it's kind of incredible that this didn't already exist, but now, developers can ask the driver whether it is performing GPU-optimized or CPU-based fallback for asset decompression, as well as what types of queues it is using.

This new release also has a minor optimization as well as a few bug fixes. The optimization moves a post-decompression copy operation into the compute queue on GPUs for which this makes sense, while the bugfixes are detailed in Microsoft's blog post as well as the NuGet repository, which you can check out over here.

forspoken benchmark2
Forspoken remains the only DirectStorage game. It sure does load quickly, though!

Unfortunately, DirectStorage hasn't found wide adoption yet, with the only PC game supporting it to date being the unpopular Forspoken. That's possibly because developers feel it isn't worth the hassle of implementing it. After all, a wide majority of PC gamers probably still host their game data on hard drives, and the Xbox Series consoles (which support a form of DirectStorage) haven't exactly blown up the market. Here's hoping DirectStorage becomes more popular, as we'd very much like for load times to be a thing of the past.