Thursday, April 20th 2023
Microsoft Releases DirectStorage 1.2 with HDD Speedups
Microsoft released a major update to DirectStorage, the API that promises to reduce game loading times. The new DirectStorage 1.2 adds the ability to speed up game loading for mechanical hard drives, a feature game developers requested from Microsoft. DirectStorage brings much of the storage sub-system secret sauce of consoles over to PC, and consoles have held on to mechanical HDDs as game storage devices longer than mainstream gaming PCs.
HDDs require buffered reads to compensate for the longer seek times, whereas DirectStorage traditionally accesses files in unbuffered mode, which disqualified HDDs for DirectStorage. With this update, HDDs can take advantage of DirectStorage, wherein game data stored on them is directly accessed by GPUs, and compressed game assets are decompressed on the fly through the compute-shader acceleration capabilities of modern GPUs.Microsoft also added a means for a game to know whether compressed assets are being decompressed by the GPU, or whether a software (CPU) fallback is engaged for reasons such as incompatible compression/file format. This feedback mechanism allows the game to adjust its asset quality (such as texture resolution), to compensate for the reduced decompression performance.
Microsoft has progressively relaxed the hardware requirements for DirectStorage with each major release. It was originally restricted to NVMe SSDs as the storage device, but was extended to AHCI devices such as SATA SSDs, and now with this release, support is extended to mechanical HDDs.Many Thanks to TumbleGeorge for the tip!
Source:
Microsoft
HDDs require buffered reads to compensate for the longer seek times, whereas DirectStorage traditionally accesses files in unbuffered mode, which disqualified HDDs for DirectStorage. With this update, HDDs can take advantage of DirectStorage, wherein game data stored on them is directly accessed by GPUs, and compressed game assets are decompressed on the fly through the compute-shader acceleration capabilities of modern GPUs.Microsoft also added a means for a game to know whether compressed assets are being decompressed by the GPU, or whether a software (CPU) fallback is engaged for reasons such as incompatible compression/file format. This feedback mechanism allows the game to adjust its asset quality (such as texture resolution), to compensate for the reduced decompression performance.
Microsoft has progressively relaxed the hardware requirements for DirectStorage with each major release. It was originally restricted to NVMe SSDs as the storage device, but was extended to AHCI devices such as SATA SSDs, and now with this release, support is extended to mechanical HDDs.Many Thanks to TumbleGeorge for the tip!
21 Comments on Microsoft Releases DirectStorage 1.2 with HDD Speedups
DirectStorage v1.0 and v1.1 work with HDD's, the problem was that commands weren't buffered so the order of operations couldn't be optimized to minimize Seek Time.
* Read Sector 7
* Read Sector 7049
* Read Sector 9
* Read Sector 14
* Read Sector 3
Before v1.2, DirectStorage would process them in the order it received them in. With v1.2's Buffered mode it can re-organize the commands.
* Read Sector 3
* Read Sector 7
* Read Sector 9
* Read Sector 14
* Read Sector 7049
Windows has been able to buffer HDD activity for a very long time now (I think Windows 95 introduced it?) while SATA III introduced the ability of HDD's performing their own re-ordering of commands (NCQ) to minimize HDD seeking (this requires a buffer to simultaneously hold multiple commands in so it can juggle around their priority). With SSD's the Seek time is the same regardless of where data is physically located, which is why they don't need buffering.
I imagine NCQ also reduced the wear on a HDD's motors.
It made sense to preload some of it regardless back when they first introduced programmable shaders, with their dream of servers and enterprise setups using their GPUs instead of CPUs Good description of the change and how it works, a completely logical change at their end - sounds like NCQ or a way to make sure NCQ works correctly any kind of software involved, is going to add a CPU burden - why would you want to run games off such a thing?
This can be further refined using sampler feedback to upload only parts of a mip in vram but I don't think many games implement this yet.
what you're imagining would have to real-time compress the high res textures and shrink them down, and that'd be slower than sending the full res ones - hence, pre-compressing them
Consoles lack CPU power for example, so all the textures became really large disk-space wise to avoid any issues with decompression.