12 ms·
I wonder how they implement fast loading times. Flight simulator is embarrassingly slow to load and takes 2-3 minutes on my reasonable fast machine. I guess the
by dividuum 5y ago
I wonder how they implement fast loading times. Flight simulator is embarrassingly slow to load and takes 2-3 minutes on my reasonable fast machine. I guess they have fully loaded game instances on standby and then sign you in once you connect using the mentioned new cloud gaming API?
- deleted 5y ago[deleted]
- deleted 5y ago[deleted]
- EMM_386 5y ago> I wonder how they implement fast loading times Proper DX12 is still on the roadmap. They will do it like this: https://devblogs.microsoft.com/directx/directstorage-is-comi https://devblogs.microsoft.com/directx/directstorage-is-comi...
- sidewndr46 5y agoI'm still confused by the existence of APIs like this. Why would a video game suddenly need a proprietary way to access a storage device? Have hard drives & filesystems gotten that much slower over the past 20 years?
- mschuster91 5y agoIf I understand that announcement correctly, most of the performance benefit comes from cutting down the number of kernel-to-userspace transitions, similar to userspace networking on Linux. Another possibility is that DirectStorage requires use of raw NVMe devices or at least raw partitions to achieve top performance... basically cutting out the NTFS filesystem too from the code path. NTFS is extremely old and complex to implement, meaning that a "tiny" file system e.g. without journalling, permissions, ACLs and the likes makes more sense.
- sidewndr46 5y agoI don't know enough about Windows / NTFS to be an authority here. But from what you're saying it sounds like the block storage now massively outperforms the filesystem (NTFS). So in that aspect NTFS hasn't gotten slower, but it has failed to keep up. So cutting it out would in fact provide a massive performance boost.
- mschuster91 5y agoIt's not just the file system. Currently, when you have a game with say 10k separate asset files, you either place 10k asset files in the file system (which is slow because NTFS) or you develop some sort of your own virtual read-only filesystem on top of that (which has been done for decades too, see e.g. the WAD format created for Doom). And there have been many implementations for these, and yet they suffer from two things: the OS filesystem cache can't know which parts of such a package file (aka the index) are relevant to always keep in memory, and the game has to copy the assets to the GPU. The general idea, if I get it right, is that DirectStorage provides a standardized layer that: - cuts down on filesystem-related overhead by providing its own optimized filesystem (e.g. omitting journals because the purpose of the storage is 99.99% read vs write), or even if they don't go that far and use a-blob-on-NTFS at least to cut down on fopen, fclose etc. - provides a standard way for game developers to deal with the problem "how to package and distribute tons of tiny assets and compressing and decompressing them" - saves context switches across the road, e.g. as mentioned eliminate fopen and fclose calls or by copying the file contents to the GPU entirely in kernel mode Nevertheless I'm not sure what outside of copying assets to the GPU in kernel mode actually will be the benefit of DirectStorage as almost everyone these days uses one of the major engines that have all these problems dealt with for ages.
- deleted 5y ago[deleted]
- mkr-hn 5y agoGames already use virtual file systems for storing assets to reduce load times. Otherwise they have to load a bunch of tiny files with filesystem and OS overhead for each. I'm sure some would appreciate not having to invent their own.
- sidewndr46 5y agoIn that case aren't you talking about read-only asset packs? Those have been around for years and aren't very complex to implement. Big studios already have their own implementations. There are plenty of "free as in beer" implementations out there to use.
- kevingadd 5y agoIt skips a couple layers of abstraction to enable faster load times, the goal here is to improve over the state of the art - the promise of 'no load times' sometimes delivered by the PS5 and Xbox Series X via this same approach Some PC ports are already getting close to this as well - elden ring's load times are very short on my PC. It's also hard to overstate how much of an improvement it is to have an NVMe drive send data directly to the GPU instead of have to send it via the CPU. The amount of pointless work involved in the CPU hop is pretty significant.
- sidewndr46 5y agoI guess the thing that really makes NVMe -> GPU really practical is the presence of arbitrary shader code. Even if your assets are some general or optimized format, you can run an arbitrary shader that copies from one buffer to another in order to get stuff in the right format.
- paulmd 5y agoactually it's rather the opposite, the focus is on fixed-function decoder blocks that are present in the new consoles.
- jpalomaki 5y agoThis piece from the article was interesting: "NVMe devices are not only extremely high bandwidth SSD based devices, but they also have hardware data access pipes called NVMe queues which are particularly suited to gaming workloads. To get data off the drive, an OS submits a request to the drive and data is delivered to the app via these queues. An NVMe device can have multiple queues and each queue can contain many requests at a time. This is a perfect match to the parallel and batched nature of modern gaming workloads. The DirectStorage programming model essentially gives developers direct control over that highly optimized hardware."
- sidewndr46 5y ago> This is a perfect match to the parallel and batched nature of modern gaming workloads This sounds like marketing speak. Some 'AAA' games now make use of parallelism at the CPU level. Almost all games today aren't just single threaded, they are laughably single threaded. At the GPU level, rendering has been parallel to some degree since special purpose 3D accelerators showed up decades ago. More recently, arbitrary shaders have allowed some logic that was previously done of the CPU to be moved to the GPU. Video games are not "parallel" in any sense.
- bri3d 5y ago> Almost all games today aren't just single threaded, they are laughably single threaded. Many (maybe most, still) games have embarrassingly single-threaded game logic (i.e., there's still one "runloop" thread which manages game state), but almost universally at this point there's a separate thread for loading data, decompressing data, asset / script compilation, and audio. Many games also use a separate thread for physics as well, and some use worker threads for AI / rules engine NPC behavior as well. Anyway, loading data is where the parallel and batched nature of modern gaming workloads comes in - almost all games at this point do some kind of constant background asset loading to avoid the need for load screens between areas. This asset loading is almost always done in a background thread and is pretty much a 1:1 match for an NVMe queue - request the blocks containing the data you need, ask to be flagged when a block has been DMAed into the memory area you want it in, and then decompress it in the background.
- NovemberWhiskey 5y agoMy understanding is that it's more that storage has increased in speed so much that the overheads of the privilege transitions between user and kernel space and the synchronous filesystem APIs are the limiting factors at this point. This is why we see specialized mechanisms like io_uring in the Linux kernel.
- stuu99 5y ago>I'm still confused by the existence of APIs like this. They are locking down IO with trusted computing, there's been a 23+ year initiative to move to encrypted computing to take input/output control away from the user, this required the co-operation of hardware manufacturers. Windows 10 and windows 11 are the beginning of you not being able to run or play files or exe's over the next 20 years as youtube, netflix, the game industry update their software to use TPM. This was from 2001: https://www.theregister.com/2001/12/13/the_microsoft_secure_pc_ms/ https://www.theregister.com/2001/12/13/the_microsoft_secure_... Here is a paper explaining what the future of files/broadcasts will be like: https://web2.qatar.cmu.edu/cs/15349/dl/DRM-TC.pdf https://web2.qatar.cmu.edu/cs/15349/dl/DRM-TC.pdf Basically they are building a parallel mainframe inside our PC's that only youtube, netflix, the game industry and other software companies will control. They are removing ownership of our devices and they needed microsofts help to do that. We've seen mirosoft trial bricking cracked exe's via update. Many UWP games only work on certain versions of windows. See here (ctrf-f then select the UWP link) https://old.reddit.com/r/CrackWatch/comments/p9ak4n/crack_watch_games/ https://old.reddit.com/r/CrackWatch/comments/p9ak4n/crack_wa... They are bringing console lockdown to the PC that is why windows 10 had forced updates. That is why windows 11 was also pushing forced internet connection hard for home users.
- sandos 5y agoPre-loaded machines work, but I imagine you would have to move away from that once you support enough games, but it should be "easy" to just resume a machine to different games start states from disk. Afaik games are mostly using lots of CPU when starting so youre basically pre-computing all that and using the disk as a look-up table.
- markus_zhang 5y agoI'm wondering if you can serve multiple clients with one fully loaded server that has a huge amount of RAMs.
- samstave 5y agoIs it multi-player? Is it waiting for other users with slower connects/machines?
- dividuum 5y agoIt has multiplayer features, but that's certainly not the case here. Switching off all the online features doesn't change the loading time at all. It's just a lot of potential to make it faster: When you start FS on my machine it takes 2 minutes or so with only brief moments of CPU usage exceeding 2 of the available 24 cores. All while both GPU and IO are basically idle. I'm not sure what's going on. Wouldn't be surprised if there's a "GTA online" type of lazyness happening somewhere (see https://nee.lv/2021/02/28/How-I-cut-GTA-Online-loading-times-by-70/ https://nee.lv/2021/02/28/How-I-cut-GTA-Online-loading-times...)
- Rebelgecko 5y agoWhen I tried it a few days ago, the loading times to open the game were fairly bad. Couldn't actually see how long it would take to load a flight, because the UI was borked (or non intuitive enough that I couldn't figure out how to select a departure airport)
- Animats 5y agoThat's an interesting issue for the "metaverse". Once we get past the NFT clown car era, and big-world systems with user created content at high resolution come out, metaverse systems will have to face the bandwidth problem Second Life faces. Delivering assets to the user needs more bandwidth than delivering video. Even 4K video. Second Life delivers content on the fly, and you get to watch stuff appear as content comes in. With enough bandwidth and a gamer PC, it's not bad, but many users are on slow links with weak clients, and suffer badly. If the work is being done "in the cloud", there can be much more bandwidth to the asset servers. At least 10GB between game machine and asset store, all within the data center. Flight Simulator needs that, because, like Google Earth, they have a whole planet of assets. A Ready Player One quality metaverse will have the same problem. Or, for example, the Matrix demo for Unreal Engine 5, where you download 16 square kilometers of highly detailed city. There are performance downsides of cloud gaming. Too much lag, mostly. Speed of light alone is too much slowdown to allow remote VR rendering. At 120 FPS, a few hundred miles of transmission delay alone costs a frame time. Network delay makes it worse. You can't buffer the video ahead, like you can for pre-stored video. The pew-pew crowd gets unhappy above 40ms, although there are tricks for FPS games to make targeting work across laggy links.
- kotaKat 5y agoIt is equally embarrassing to load over cloud. All it takes away is the compute/GPU resource requirements locally. Controls are also awful right now as you're stuck using the Xbox controller - other Xbox compatible flight controllers, as well as the keyboard and mouse, aren't available yet in MSFS over xCloud. It's not (personally) enjoyable.