News Microsoft DirectStorage 1.1 Now Available, AMD, Intel, Nvidia Ready

Page 2 - Seeking answers? Join the Tom's Hardware community: where nearly two million members share solutions and discuss the latest tech.

InvalidError

Titan
Moderator
True. If they're both direct-connected to the CPU, then there are no unnecessary trips over PCIe.
Even if the SSD is connected to the chipset, it would need to travel the SSD-chipset-CPU-GPU either way since the GPU is still attached to the CPU. The only case where you'd spare a transfer is if the GPU and SSD are connected to the chipset.


If the SSD is fast enough to keep up with the game engine, then I think you don't really need to cache the assets in system RAM.
When stuff is cached in the file system cache, the OS receives a file IO, looks up its table of cached data and if there is a hit, it returns that directly, no need to access the SSD and the IO completes in little more than the 1-2us it takes to switch from user-land to kernel-land and back, especially if the OS can just DMA it directly to the GPU from cache instead of copying it again to user-land first.

When an IO has to go all the way back to the SSD, the OS has to traverse the file system to locate the LBAs containing the data, then do however many IO operations are required to gather all of the bits which can take 10s of microseconds.

Using system memory for caching also means that as long as you have sufficient RAM, you should still be able to run DirectStorage games from HDD as long as the game is written to gracefully handle assets taking too long to load the first time through while the cache is being populated either with stutters waiting for assets or placeholders that will 'pop' when the data arrives.
 
Or they will release small tools that will allow the end user to do the compression on their own systems, even on a crap system it would probably take less time than downloading everything again, well depends on how good the compression is I guess.

Yeah companies usually don't throw money after old games that already ebbed in sales. On the other hand if a good boost in loading speed could help new sales of an old game they will consider it. Also with how high the amount of remakes is lately they could throw this in with all the other new stuff when making one.
hard to say, compressed files usualy have encryption, same goes with decompressed assets...another layer of encryption

so eith encryption cpu would be still needed to store unecrypted data in ram (same as now)

its not like gpu accelerated decryption doesnt exists..but not everybody has powerfull gpu to do rendering, decompression and decryption
 
Last edited:

bit_user

Polypheme
Ambassador
When stuff is cached in the file system cache, the OS receives a file IO, looks up its table of cached data and if there is a hit, it returns that directly, no need to access the SSD and the IO completes in little more than the 1-2us it takes to switch from user-land to kernel-land and back, especially if the OS can just DMA it directly to the GPU from cache instead of copying it again to user-land first.
That's not the only way to cache data, however.

Also, you're probably too optimistic about kernel & filesystem overhead. I think you'd be surprised how many layers are involved, due to the need for the OS to implement various features.

When an IO has to go all the way back to the SSD, the OS has to traverse the file system to locate the LBAs containing the data, then do however many IO operations are required to gather all of the bits which can take 10s of microseconds.
This data will tend to be contiguous, and the file's inodes will tend to be cached. So, the typical case will be one IO per asset.

Using system memory for caching also means that as long as you have sufficient RAM, you should still be able to run DirectStorage games from HDD
HDDs are so much slower that you could use a fallback path for them and nobody would even notice. It would be a mistake to compromise the architecture of DirectStorage for them.
 

InvalidError

Titan
Moderator
HDDs are so much slower that you could use a fallback path for them and nobody would even notice. It would be a mistake to compromise the architecture of DirectStorage for them.
What compromise? DirectStorage games will need means of coping with slower than expected SSDs and the same code can be used to deal with HDDs. A sufficiently large system memory cache is practically mandatory if you the best performance across the largest install base possible and once data is cached, it doesn't matter what it initially resided on anymore.
 
What compromise? DirectStorage games will need means of coping with slower than expected SSDs and the same code can be used to deal with HDDs. A sufficiently large system memory cache is practically mandatory if you the best performance across the largest install base possible and once data is cached, it doesn't matter what it initially resided on anymore.
A large RAM cache won't happen because the consoles only have that much of it and it's also shared between CPU and GPU, so do they even need to do the copy step? They also all have a standard ssd of at least whatever the standard speed is.
They never redesign the whole game to work better on PC unless it flops so hard that it becomes a meme (batman, agents of mayhem,cyberpunk) and they are forced to.
 
  • Like
Reactions: bit_user

InvalidError

Titan
Moderator
A large RAM cache won't happen
The large cache on PC is already there without any additional work: Windows already assigns all memory that isn't allocated to applications to caching, the only thing DirectStorage on PC would need to do is check whether the data is already present in the file system cache. The only "additional" work for developers is making sure their games don't freak out when things take longer than expected, which any PC game would require since storage performance on PCs has a million reasons to be unpredictable.
 
The only "additional" work for developers is making sure their games don't freak out when things take longer than expected
That would assume that console games load up the cache until it's full, I very much doubt that will be happening, they are only going to use as much ram/cache as the console has to spare. If you have 10 times the pace on PC it won't make a difference since the game will only put as much into the cache as it would on consoles.
 

bit_user

Polypheme
Ambassador
If you have 10 times the pace on PC it won't make a difference since the game will only put as much into the cache as it would on consoles.
He's saying the game should rely on the OS to do caching, which will automatically use spare RAM as a disk cache. It's not a given that DirectStorage actually goes through the OS disk cache, however.

If anyone really cared, probably some game dev forums would have more details on it. I see there's also a Microsoft whitepaper on the internals that requires a NDA.



I'm not going to argue about this for the sake of arguing, but y'all go on ahead and knock yourselves out.
 

InvalidError

Titan
Moderator
That would assume that console games load up the cache until it's full, I very much doubt that will be happening, they are only going to use as much ram/cache as the console has to spare. If you have 10 times the pace on PC it won't make a difference since the game will only put as much into the cache as it would on consoles.
Nope. the OS file system cache on PCs operates independently from the game, developers don't need to do a damned thing.
 

InvalidError

Titan
Moderator
He's saying the game should rely on the OS to do caching, which will automatically use spare RAM as a disk cache. It's not a given that DirectStorage actually goes through the OS disk cache, however.
DMAing stuff from the file system cache would be the most logical way to do it, it should be a pretty simple extension to async IO where the handling routine simply starts a DMA from cache to GPU instead of a copy to user-land and triggering the async IO handler.