From ee39b28dac351bfae8da8779c2650f70f82c8dda Mon Sep 17 00:00:00 2001 From: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com> Date: Fri, 18 Jun 2021 16:51:15 -0700 Subject: [PATCH] Updates to AZ::IO::Streamer configurations - On Windows the game now has file read sharing enabled for debug and profile builds. On Windows 10 the performance impact is neglectable, so it's been turned on to remove the need for the "cl_streamerDevMode" command line option. - The drive that handles the virtual file system has been added to the game by default for debug and profile builds. Previously this required using "cl_streamerDevMode" which can now be omitted. A previous update already made it so that the drive would only be added if /Amazon/AzCore/Bootstrap/remote_filesystem was set to 1, but the configuration wasn't updated to reflect this. - Removed some comments to keep the setreg files clean. The non-specialized versions of the same setreg files still have the comments. - Removed the "DevMode" configuration (used by cl_streamerDevMode) from the game except for debug and profile. This configuration contained development tools which are not needed for release builds. --- .../AzCore/IO/Streamer/StorageDrive_Windows.h | 3 +- .../Platform/Windows/streamer.editor.setreg | 14 ---- .../Windows/streamer.game.debug.setreg | 74 +++++++++++++++++++ .../Windows/streamer.game.profile.setreg | 74 +++++++++++++++++++ .../Platform/Windows/streamer.game.setreg | 21 +----- Registry/streamer.game.debug.setreg | 65 ++++++++++++++++ Registry/streamer.game.profile.setreg | 65 ++++++++++++++++ Registry/streamer.game.setreg | 14 ---- 8 files changed, 280 insertions(+), 50 deletions(-) create mode 100644 Registry/Platform/Windows/streamer.game.debug.setreg create mode 100644 Registry/Platform/Windows/streamer.game.profile.setreg create mode 100644 Registry/streamer.game.debug.setreg create mode 100644 Registry/streamer.game.profile.setreg diff --git a/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StorageDrive_Windows.h b/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StorageDrive_Windows.h index 479828c9d3..d51fdc36f3 100644 --- a/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StorageDrive_Windows.h +++ b/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StorageDrive_Windows.h @@ -44,8 +44,7 @@ namespace AZ::IO //! make adjustments. For the most optimal performance align read buffers to the physicalSectorSize. u8 m_enableUnbufferedReads : 1; //! Globally enable file sharing. This allows files to used outside AZ::IO::Streamer, including other applications - //! while in use by AZ::IO::Streamer. File sharing can negatively impact performance and is recommended for - //! development only. + //! while in use by AZ::IO::Streamer. u8 m_enableSharing : 1; //! If true, only information that's explicitly requested or issues are reported. If false, status information //! such as when drives are created and destroyed is reported as well. diff --git a/Registry/Platform/Windows/streamer.editor.setreg b/Registry/Platform/Windows/streamer.editor.setreg index 0f7eb3e63d..ed5bb36019 100644 --- a/Registry/Platform/Windows/streamer.editor.setreg +++ b/Registry/Platform/Windows/streamer.editor.setreg @@ -13,33 +13,19 @@ [ { "$type": "AZ::IO::StorageDriveConfig", - // The maximum number of file handles that the drive will cache. "MaxFileHandles": 1024 }, { "$type": "AZ::IO::WindowsStorageDriveConfig", - // The maximum number of file handles that the drive will cache. "MaxFileHandles": 1024, - // The maximum number of files to keep the meta data such as the size around for. "MaxMetaDataCache": 1024, - // Number of requests the drive keeps after its queue is full. - // Overcommitting allows for requests to be immediately available after a request completes without needing - // any scheduling, but this also doesn't allow these requests to be rescheduled or updated. "Overcommit": 8, - // Allows files to be shared. This can be needed if the file needs to be opened in multiple locations, such - // as the editor and the Asset Processor. Turning this feature on comes at a small performance cost. "EnableFileSharing": true, - // Unbuffered reads bypass the OS file cache for faster file reads. This helps speed up initial file loads - // and is best for applications that only read a file once such as the game. For applications that frequently - // re-read files such as the editor it's better to turn this feature off. "EnableUnbufferedReads": false, - // If true, only information that's explicitly requested or issues are reported. If false, status information - // such as when drives are created and destroyed is reported as well. "MinimalReporting": false }, { "$type": "AzFramework::RemoteStorageDriveConfig", - // The maximum number of file handles that the drive will cache. "MaxFileHandles": 1024 } ] diff --git a/Registry/Platform/Windows/streamer.game.debug.setreg b/Registry/Platform/Windows/streamer.game.debug.setreg new file mode 100644 index 0000000000..7994dcc9eb --- /dev/null +++ b/Registry/Platform/Windows/streamer.game.debug.setreg @@ -0,0 +1,74 @@ +{ + "Amazon": + { + "AzCore": + { + "Streamer": + { + "Profiles": + { + "Generic": + { + "Stack": + [ + { + "$type": "AZ::IO::WindowsStorageDriveConfig", + "MaxFileHandles": 32, + "MaxMetaDataCache": 32, + "Overcommit": 8, + "EnableFileSharing": true, + "EnableUnbufferedReads": true, + "MinimalReporting": false + }, + { + "$type": "AZ::IO::ReadSplitterConfig", + "BufferSizeMib": 6, + "SplitSize": "MaxTransfer", + "AdjustOffset": true, + "SplitAlignedRequests": false + }, + { + "$type": "AzFramework::RemoteStorageDriveConfig", + "MaxFileHandles": 1024 + }, + { + "$type": "AZ::IO::BlockCacheConfig", + "CacheSizeMib": 10, + "BlockSize": "MaxTransfer" + }, + { + "$type": "AZ::IO::DedicatedCacheConfig", + "CacheSizeMib": 2, + "BlockSize": "MemoryAlignment", + "WriteOnlyEpilog": true + }, + { + "$type": "AZ::IO::FullFileDecompressorConfig", + "MaxNumReads": 2, + "MaxNumJobs": 2 + } + ] + }, + "DevMode": + { + "Stack": + [ + { + "$type": "AZ::IO::WindowsStorageDriveConfig", + "MaxFileHandles": 1024, + "MaxMetaDataCache": 1024, + "Overcommit": 8, + "EnableFileSharing": true, + "EnableUnbufferedReads": false + }, + { + "$type": "AzFramework::RemoteStorageDriveConfig", + "MaxFileHandles": 1024 + } + ] + } + } + } + } + } +} \ No newline at end of file diff --git a/Registry/Platform/Windows/streamer.game.profile.setreg b/Registry/Platform/Windows/streamer.game.profile.setreg new file mode 100644 index 0000000000..7994dcc9eb --- /dev/null +++ b/Registry/Platform/Windows/streamer.game.profile.setreg @@ -0,0 +1,74 @@ +{ + "Amazon": + { + "AzCore": + { + "Streamer": + { + "Profiles": + { + "Generic": + { + "Stack": + [ + { + "$type": "AZ::IO::WindowsStorageDriveConfig", + "MaxFileHandles": 32, + "MaxMetaDataCache": 32, + "Overcommit": 8, + "EnableFileSharing": true, + "EnableUnbufferedReads": true, + "MinimalReporting": false + }, + { + "$type": "AZ::IO::ReadSplitterConfig", + "BufferSizeMib": 6, + "SplitSize": "MaxTransfer", + "AdjustOffset": true, + "SplitAlignedRequests": false + }, + { + "$type": "AzFramework::RemoteStorageDriveConfig", + "MaxFileHandles": 1024 + }, + { + "$type": "AZ::IO::BlockCacheConfig", + "CacheSizeMib": 10, + "BlockSize": "MaxTransfer" + }, + { + "$type": "AZ::IO::DedicatedCacheConfig", + "CacheSizeMib": 2, + "BlockSize": "MemoryAlignment", + "WriteOnlyEpilog": true + }, + { + "$type": "AZ::IO::FullFileDecompressorConfig", + "MaxNumReads": 2, + "MaxNumJobs": 2 + } + ] + }, + "DevMode": + { + "Stack": + [ + { + "$type": "AZ::IO::WindowsStorageDriveConfig", + "MaxFileHandles": 1024, + "MaxMetaDataCache": 1024, + "Overcommit": 8, + "EnableFileSharing": true, + "EnableUnbufferedReads": false + }, + { + "$type": "AzFramework::RemoteStorageDriveConfig", + "MaxFileHandles": 1024 + } + ] + } + } + } + } + } +} \ No newline at end of file diff --git a/Registry/Platform/Windows/streamer.game.setreg b/Registry/Platform/Windows/streamer.game.setreg index 7788227fb5..67ea014d2b 100644 --- a/Registry/Platform/Windows/streamer.game.setreg +++ b/Registry/Platform/Windows/streamer.game.setreg @@ -27,8 +27,7 @@ // will avoid saturating the IO controller which can be needed if the drive is used by other applications. "Overcommit": 8, // Globally enable file sharing. This allows files to used outside AZ::IO::Streamer, including other - // applications while in use by AZ::IO::Streamer. File sharing can negatively impact performance and is - // recommended for development only. + // applications while in use by AZ::IO::Streamer. "EnableFileSharing": false, // Use unbuffered reads for the fastest possible read speeds by bypassing the Windows file cache. This // results in a faster read the first time a file is read, but subsequent reads will possibly be slower as @@ -63,24 +62,6 @@ "MaxNumJobs": 2 } ] - }, - "DevMode": - { - "Stack": - [ - { - "$type": "AZ::IO::WindowsStorageDriveConfig", - "MaxFileHandles": 1024, - "MaxMetaDataCache": 1024, - "Overcommit": 8, - "EnableFileSharing": true, - "EnableUnbufferedReads": false - }, - { - "$type": "AzFramework::RemoteStorageDriveConfig", - "MaxFileHandles": 1024 - } - ] } } } diff --git a/Registry/streamer.game.debug.setreg b/Registry/streamer.game.debug.setreg new file mode 100644 index 0000000000..1ea1dcd614 --- /dev/null +++ b/Registry/streamer.game.debug.setreg @@ -0,0 +1,65 @@ +{ + "Amazon": + { + "AzCore": + { + "Streamer": + { + "Profiles": + { + "Generic": + { + "Stack": + [ + { + "$type": "AZ::IO::StorageDriveConfig", + "MaxFileHandles": 32 + }, + { + "$type": "AZ::IO::ReadSplitterConfig", + "BufferSizeMib": 6, + "SplitSize": "MaxTransfer", + "AdjustOffset": true, + "SplitAlignedRequests": false + }, + { + "$type": "AzFramework::RemoteStorageDriveConfig", + "MaxFileHandles": 1024 + }, + { + "$type": "AZ::IO::BlockCacheConfig", + "CacheSizeMib": 10, + "BlockSize": "MaxTransfer" + }, + { + "$type": "AZ::IO::DedicatedCacheConfig", + "CacheSizeMib": 2, + "BlockSize": "MemoryAlignment", + "WriteOnlyEpilog": true + }, + { + "$type": "AZ::IO::FullFileDecompressorConfig", + "MaxNumReads": 2, + "MaxNumJobs": 2 + } + ] + }, + "DevMode": + { + "Stack": + [ + { + "$type": "AZ::IO::StorageDriveConfig", + "MaxFileHandles": 1024 + }, + { + "$type": "AzFramework::RemoteStorageDriveConfig", + "MaxFileHandles": 1024 + } + ] + } + } + } + } + } +} \ No newline at end of file diff --git a/Registry/streamer.game.profile.setreg b/Registry/streamer.game.profile.setreg new file mode 100644 index 0000000000..1ea1dcd614 --- /dev/null +++ b/Registry/streamer.game.profile.setreg @@ -0,0 +1,65 @@ +{ + "Amazon": + { + "AzCore": + { + "Streamer": + { + "Profiles": + { + "Generic": + { + "Stack": + [ + { + "$type": "AZ::IO::StorageDriveConfig", + "MaxFileHandles": 32 + }, + { + "$type": "AZ::IO::ReadSplitterConfig", + "BufferSizeMib": 6, + "SplitSize": "MaxTransfer", + "AdjustOffset": true, + "SplitAlignedRequests": false + }, + { + "$type": "AzFramework::RemoteStorageDriveConfig", + "MaxFileHandles": 1024 + }, + { + "$type": "AZ::IO::BlockCacheConfig", + "CacheSizeMib": 10, + "BlockSize": "MaxTransfer" + }, + { + "$type": "AZ::IO::DedicatedCacheConfig", + "CacheSizeMib": 2, + "BlockSize": "MemoryAlignment", + "WriteOnlyEpilog": true + }, + { + "$type": "AZ::IO::FullFileDecompressorConfig", + "MaxNumReads": 2, + "MaxNumJobs": 2 + } + ] + }, + "DevMode": + { + "Stack": + [ + { + "$type": "AZ::IO::StorageDriveConfig", + "MaxFileHandles": 1024 + }, + { + "$type": "AzFramework::RemoteStorageDriveConfig", + "MaxFileHandles": 1024 + } + ] + } + } + } + } + } +} \ No newline at end of file diff --git a/Registry/streamer.game.setreg b/Registry/streamer.game.setreg index 972fb80fb2..40451fd95c 100644 --- a/Registry/streamer.game.setreg +++ b/Registry/streamer.game.setreg @@ -57,20 +57,6 @@ "MaxNumJobs": 2 } ] - }, - "DevMode": - { - "Stack": - [ - { - "$type": "AZ::IO::StorageDriveConfig", - "MaxFileHandles": 1024 - }, - { - "$type": "AzFramework::RemoteStorageDriveConfig", - "MaxFileHandles": 1024 - } - ] } } }