Commit Graph

378 Commits

Author SHA1 Message Date
per larsson
2ab6c4c7ba Fixed bug when serializing empty soft package references
#rb Paul.Chipchase
#rnx

[CL 34523321 by per larsson in ue5-main branch]
2024-06-20 05:04:40 -04:00
per larsson
129585ee43 Added option -CookSoftPackageReferences to save soft package references when cooking
#rb Matt.Peters, Paul.Chipchase
#rnx

[CL 34503130 by per larsson in ue5-main branch]
2024-06-19 12:16:51 -04:00
zousar shaker
082e9969db [Backout] - CL34481610
[FYI] Zousar.Shaker
Original CL Desc
-----------------------------------------------------------------
Incremental step towards being able to stage to both a pak build as well as a nopak (streamng) build from a snapshot entirely stored in zenserver (no loose files on the filesystem except a ue.projectstore file).
Key changes:
- Removed the use of cookedfiles.manifest
- Changed IoStore mode of UnrealPak to  be capable of getting zenserver launch data from either a package store manifest (cbobject, metadata) OR a project store marker file (json)
- Ensured that the UAT and IoStore mode of UnrealPak can launch zenserver reliably by passing along the SponsorProcessId when launching zenserver
- Ensured that shader archives (and their accompanying json metadata files) can be read either as loose files on disk or directly from zenserver if it the data for them is internal to zenserver (ie: they have a valid  chunk id)
Remaining work:
- Pak mode of UnrealPak must be able to launch zenserver and pull data from it.

#rb PJ.Kack

[CL 34498668 by zousar shaker in ue5-main branch]
2024-06-19 10:15:01 -04:00
zousar shaker
a7b5faeaf0 Incremental step towards being able to stage to both a pak build as well as a nopak (streamng) build from a snapshot entirely stored in zenserver (no loose files on the filesystem except a ue.projectstore file).
Key changes:
- Removed the use of cookedfiles.manifest
- Changed IoStore mode of UnrealPak to  be capable of getting zenserver launch data from either a package store manifest (cbobject, metadata) OR a project store marker file (json)
- Ensured that the UAT and IoStore mode of UnrealPak can launch zenserver reliably by passing along the SponsorProcessId when launching zenserver
- Ensured that shader archives (and their accompanying json metadata files) can be read either as loose files on disk or directly from zenserver if it the data for them is internal to zenserver (ie: they have a valid  chunk id)
Remaining work:
- Pak mode of UnrealPak must be able to launch zenserver and pull data from it.

#rb PJ.Kack

[CL 34481636 by zousar shaker in ue5-main branch]
2024-06-18 17:33:46 -04:00
pj kack
7d49f13480 UnrealPak: Implement DDC2 async API for iostore compression.
BatchGet with max 128 inflight requests (or ~1 GiB in total) in batches of 8 items (or ~16 MiB each).
BatchPut with max 128 inflight requests (or ~256 MiB in total) in batches of 8 items (or ~1 MiB each).
Skip ddc for chunks smaller than CompressionMinBytesSaved (1KiB by default).
Skip ddc for .umap to avoid cache churn since maps are known to cook non-deterministically.
Skip ddc for shaders that use a different code path in UnrealPak as well as in runtime.
Use a new DDC2 cache key (that includes the CompressionBufferSize) and cache bucket.
Use TArray64/FMemoryWriter64 for serializing the data to support chunks bigger than 2 GiB.
Postpone allocation of compression buffers until the ddc get request completes and the size is known.
Reduce memory buffer limits to 2 GiB and 3 GiB again (earlier temporary bumps to 3 GiB and 4 GiB are not needed after recent task/retraction changes).
Add logging of number of ddc hits and puts.

#jira UE-204758
#rb paul.chipchase, Per.Larsson
#tests identical binary output

[CL 34451300 by pj kack in ue5-main branch]
2024-06-18 01:30:02 -04:00
zousar shaker
e622830c71 Add metadata files (including the DevelopmentAssetRegistry) to the zen filesystem manifest so that snapshots can include the data needed not just to run a game, but also package and iteratively cook one.
[CL 34393507 by zousar shaker in ue5-main branch]
2024-06-15 00:41:47 -04:00
danny couture
6345bd8b29 [TaskGraph/Misc]
- Replace BusyWait API calls to simple Wait

#rnx
#rb kevin.macaulayvacher

[CL 34315066 by danny couture in ue5-main branch]
2024-06-12 13:56:22 -04:00
pj kack
56e5eb8103 UnrealPak: Trivial rename of some IoStoreWriter.cpp variables.
From FChunkBlock::Size to FChunkBlock::DiskSize.
From FIoStoreWriteQueueEntry::CompressedSize to FIoStoreWriteQueueEntry::DiskSize.

#rb pj.kack
#tests identical binary output
#rnx

[CL 34306949 by pj kack in ue5-main branch]
2024-06-12 10:09:34 -04:00
dan engelbrecht
8b1ebc81f9 Add recovery of zenserver from project store operations in addition to the DDC recovery logic
#jira UE-211547
#rb zousar.shaker

[CL 34277558 by dan engelbrecht in ue5-main branch]
2024-06-11 11:06:44 -04:00
dan engelbrecht
c0bf74a232 Make sure we can read large files when saving loose files to non-local remote zenserver
#rb Zousar.Shaker
#jira UE-217522

[CL 34267114 by dan engelbrecht in ue5-main branch]
2024-06-11 04:25:36 -04:00
pj kack
3ad849a688 UnrealPak: When the existing optional .uproject argument is provided first on the commandline, then let UnrealPak use that to set its project directory and override the monolithic engine program directory (Engine/Programs/UnrealPak).
This will make UnrealPak read from and use the project-specific ini files.
This will make UnrealPak write to and use the project-specific Saved directory, e.g. to save the UnrealPak.log file.
In the BuildCookRun/CopyBuildToStagingDirectory scripts always invoke UnrealPak with the .uproject file argument.
Always run UnrealPak itself with -nopak to avoid picking up and mounting any existing pak files in the project directory.

Motivation: When UnrealPak is run with -compressionEnableDDC it needs to use the project's ddc configuration instead of the engine's ddc configuration.

Note: When UnrealPak is invoked without the project argument it will still use the default program directory, and there is no change in behavior when e.g. manually executing inspection commands like list, extract and describe.
Note: All important packaging options are already passed on command line from BuildCookRun/CopyBuildToStagingDirectory, so from that perspective the change should be low risk, but in the future there is a possibility to reduce the number of command line options and rely on the project configuration instead.

#rb per.larsson
#tests identical binary output

[CL 34266589 by pj kack in ue5-main branch]
2024-06-11 03:37:13 -04:00
pj kack
61b8da6151 UnrealPak: Convert RetrieveChunk in ReferenceChunkDatabase from the old TaskGraph API to the new UE::Tasks API.
Break out a separate LoadFromReferenceDb function from BeginCompress and run it earlier from ScheduleEntry instead.
Enable task retraction for the compressed read when waiting on the BeginCompressionBarrier.

#rb per.larsson
#rnx

[CL 34234325 by pj kack in ue5-main branch]
2024-06-10 08:52:58 -04:00
pj kack
495e6444d5 UnrealPak: Convert IoStore from old TaskGraph API to the new UE::Tasks API.
Enables retraction when waiting on some of the scheduler threads.
Add MaxConcurrentSourceReads throttling since the ZenServerHttp is limited to 32 blocking requests (that should be enough for normal file io as well).
Bump default MaxSourceBufferMemory to 4GiB so that it is higher than the 3 GiB CompressionMemorySoftLimit to make sure a started queue entry can never get blocked.
Batch up to 4 compression blocks in each task to reduce task overhead with neglectable impact on tail wait times.

#rb per.larsson
#rnx

[CL 34192116 by pj kack in ue5-main branch]
2024-06-07 02:41:24 -04:00
matt peters
1a04a479f2 IncrementalCook: Add UE::Cook::IDeterminismHelper to write diagnostics for cook indeterminism and false positive iterative skips.
[RN] Minor, Cooking
#rb Zousar.Shaker

[CL 34153566 by matt peters in ue5-main branch]
2024-06-06 07:46:50 -04:00
matt peters
3fbe2177d9 Cooker: ZenStore oplog attachments: Fix corrupted attachments in incremental cooks when we have more than 1 attachment. Part of the attachment data from the previous cook was not cleared when recording the results from the new version of the package.
#rnx
#rb Zousar.Shaker

[CL 34111244 by matt peters in ue5-main branch]
2024-06-04 19:06:31 -04:00
graeme thornton
6ccbb2644f [Backout] - CL34089536
[FYI] PJ.Kack
Original CL Desc
-----------------------------------------------------------------
UnrealPak: When the existing optional .uproject argument is provided first on the commandline, then let UnrealPak use that to set its project directory and override the monolithic engine program directory (Engine/Programs/UnrealPak).
This will make UnrealPak read from and use the project-specific ini files.
This will make UnrealPak write to and use the project-specific Saved directory, e.g. to save the UnrealPak.log file.
In the BuildCookRun/CopyBuildToStagingDirectory scripts always invoke UnrealPak with the .uproject file argument.

Motivation: When UnrealPak is run with -compressionEnableDDC it needs to use the project's ddc configuration instead of the engine's ddc configuration.

Note: When UnrealPak is invoked without the project argument it will still use the default program directory, and there is no change in behavior when e.g. manually executing inspection commands like list, extract and describe.
Note: All important packaging options are already passed on command line from BuildCookRun/CopyBuildToStagingDirectory, so from that perspective the change should be low risk, but in the future there is a possibility to reduce the number of command line options and rely on the project configuration instead.

#rb per.larsson
#tests identical binary output

[CL 34107564 by graeme thornton in ue5-main branch]
2024-06-04 17:23:55 -04:00
pj kack
9e01741303 UnrealPak: When the existing optional .uproject argument is provided first on the commandline, then let UnrealPak use that to set its project directory and override the monolithic engine program directory (Engine/Programs/UnrealPak).
This will make UnrealPak read from and use the project-specific ini files.
This will make UnrealPak write to and use the project-specific Saved directory, e.g. to save the UnrealPak.log file.
In the BuildCookRun/CopyBuildToStagingDirectory scripts always invoke UnrealPak with the .uproject file argument.

Motivation: When UnrealPak is run with -compressionEnableDDC it needs to use the project's ddc configuration instead of the engine's ddc configuration.

Note: When UnrealPak is invoked without the project argument it will still use the default program directory, and there is no change in behavior when e.g. manually executing inspection commands like list, extract and describe.
Note: All important packaging options are already passed on command line from BuildCookRun/CopyBuildToStagingDirectory, so from that perspective the change should be low risk, but in the future there is a possibility to reduce the number of command line options and rely on the project configuration instead.

#rb per.larsson
#tests identical binary output

[CL 34089539 by pj kack in ue5-main branch]
2024-06-04 06:12:40 -04:00
will brown
0eca9cc90c Updating missing directory index 'warning' to 'display' as indexing is optional and global .utoc is not indexed
#rb Per.Larsson

[CL 33923487 by will brown in ue5-main branch]
2024-05-27 09:56:18 -04:00
will brown
676c7cfe31 Adding asset types and package names to the IoStore output csv file
[CL 33874447 by will brown in ue5-main branch]
2024-05-23 16:52:29 -04:00
matt peters
2971248963 IncrementalCook: Add support for iterative and incremental cooks of CookPackageSplitters.
#rnx
#rb Zousar.Shaker

[CL 33710894 by matt peters in ue5-main branch]
2024-05-16 23:22:12 -04:00
zousar shaker
655bc51a38 Add SSL certificates to the zen manifest if the configuration would mean they're part of the staged build.
#jira UE-215216
#rb daniele.pieroni

[CL 33704487 by zousar shaker in ue5-main branch]
2024-05-16 18:58:30 -04:00
pj kack
bff7ef0500 UnrealPak: Change memory throttling logic to prepare for async DDC get requests that can allocate compression buffers from worker threads.
Add IIoStoreWriteRequest::GetSourceBufferSizeEstimate() to get an upfront approximation of required memory for source reads and compression buffers.
Limit memory usage upfront in FIoStoreWriterContextImpl::ScheduleEntry() based on the estimate instead of during the actual allocations in the middle of the pipeline.
Remove wait from AllocCompressionBuffer and always let it return immediately with a valid compression buffer.
Rename FIoStoreWriteQueueEntry::NumChunkBlocksFromRefDb to NumChunkBlocks and use it for all entries.
Replace the unnecessary FIoStoreWriteQueueEntry::WriteFinishedEvent with a single WriterThread.Wait().
In FIoStoreWriterContextImpl::WriteEntry() reduce som memory growth by releasing the ChunkBlocks array and moving the filename when building the toc directory index.
Bump compression memory limit from 2 GB to 3 GB to reduce the need to (mostly) drain the queue to schedule large-ish entries.

#rb Per.Larsson
#rnx
#tests identical binary diff of /content/paks folder

[CL 33622054 by pj kack in ue5-main branch]
2024-05-14 01:45:53 -04:00
pj kack
9d1aa521f4 UnrealPak: Add UsedPhysical and UsedVirtual memory stats to progress output logging and always log at least one status line.
#rb Per.Larsson
#rnx

[CL 33598566 by pj kack in ue5-main branch]
2024-05-13 04:12:59 -04:00
matt peters
66f0b9950e Cooker:
Bugfix for incremental ZenStoreWriter: it was broadcasting iterativelyunmodified for every package whether it was modified or not.
MPCook Performance bugfix for GenerationHelper on cookdirector: it was initializing them (and loading the generator package) when it did not need to in response to discovery and savepackage messages from cookworkers.
Fix some coding standard issues.
Readability improvements for some save code that is about to be extended.
#rnx
#rb Zousar.Shaker

[CL 33554042 by matt peters in ue5-main branch]
2024-05-09 14:40:00 -04:00
pj kack
b712a661a8 UnrealPak: Revert ParsePakResponseFile and ParsePakOrderFile optimizations in 33258481 to fix parsing errors for file paths with spaces in them.
#jira UE-213449
#rb per.larsson
#rnx
#tests binary diff of content/paks folder

[CL 33333577 by pj kack in ue5-main branch]
2024-04-30 08:06:34 -04:00