Commit Graph

129 Commits

Author SHA1 Message Date
Devin Doucette
78b4dfd59b DDC: Fixed untagged allocations by capturing tags in tasks
#jira UE-154013
#preflight 6335f0ffc37844870abec3f3
#rb Matt.Peters

[CL 22254430 by Devin Doucette in ue5-main branch]
2022-09-29 16:11:35 -04:00
Devin Doucette
6c0a4f9cc8 DDC: Added a check for non-zero size in the legacy cache
#jira UE-160573
#preflight 632dd4517b582f58abb80f63
#rb Zousar.Shaker
#rnx

[CL 22157364 by Devin Doucette in ue5-main branch]
2022-09-23 13:12:14 -04:00
Devin Doucette
7f98c7fe6c DDC: Added functions to convert between derived data priority and queued work priority
#preflight 632b42d4b4515b7e226ffae8
#rb Zousar.Shaker
#rnx

[CL 22118431 by Devin Doucette in ue5-main branch]
2022-09-21 14:25:32 -04:00
Joe Kirchoff
6e545d7633 Fix vs2022 compile errors when /Zc:lambda- is removed
#rnx
#rb trivial
#preflight 62fc24382d5e2ed99cdbbc84

[CL 21417071 by Joe Kirchoff in ue5-main branch]
2022-08-16 19:23:33 -04:00
devin doucette
6366a19bda DDC: Added functions to serialize cache types to and from compact binary, and strings where appropriate
#rb Zousar.Shaker

#ROBOMERGE-OWNER: devin.doucette
#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 20741868 via CL 20744192 via CL 20745275
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v970-20704180)

[CL 20751385 by devin doucette in ue5-main branch]
2022-06-20 23:40:01 -04:00
mark lintott
da46ade47c Added Cache Speed Stats to Analytics
Added Zen Server Stats to Analytics
#rb zousar.shaker, devin.doucette
#jira none
#preflight 6295d84bd57da28cc8ee9eab

[CL 20434901 by mark lintott in ue5-main branch]
2022-05-31 05:11:05 -04:00
danny couture
623896568d Improve frame rate stability in editor by reducing the priority of the DDC IO threads which are now doing CPU intensive compression to avoid them preempting more important threads (GT/RT/RHI)
#rnx
#rb Devin.Doucette
#preflight 62825177cf7e4667a991a6cc

[CL 20223281 by danny couture in ue5-main branch]
2022-05-16 09:52:19 -04:00
Devin Doucette
436b6a6461 DDC: Added IRequestOwner::LaunchTask
- Added IRequestOwner::LaunchTask to launch a task as a request in the request owner.
- Renamed ExecuteInCacheThreadPool to LaunchTaskInCacheThreadPool.
- Made GCacheThreadPool private to one source file.
- Changed task scheduling throughout DDC to use these functions where appropriate.

#preflight 623b846d8900c14eecd4daa4
#rb Zousar.Shaker

[CL 19485686 by Devin Doucette in ue5-main branch]
2022-03-23 16:56:39 -04:00
Devin Doucette
d8c983bbe6 DDC: Optimized legacy cache key validation and shortening overhead
- Validate and shorten legacy keys lazily.
- Change to ValueOnly mode for PakFile and Zen.

#preflight 623235998a6037989395baf2
#rb Zousar.Shaker
#rnx

[CL 19410386 by Devin Doucette in ue5-main branch]
2022-03-16 15:28:29 -04:00
devin doucette
a2fba58903 DDC: Destroy the cache store graph when shutting down the cache
#jira UE-116166
#preflight 620ea11c7509be98435db253
#lockdown Aurel.Cordonnier
#rb Zousar.Shaker

#ROBOMERGE-OWNER: Devin.Doucette
#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-COMMAND: _robomerge UE5-Main
#ROBOMERGE-SOURCE: CL 19092848 in //UE5/Release-5.0/... via CL 19096129
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19096234 by devin doucette in ue5-main branch]
2022-02-23 13:47:00 -05:00
devin doucette
0e929ad2f3 DDC: Re-added the in-flight cache for async puts
- Legacy puts are now executing asynchronously.
- Memory cache now merges partial cache records.
- Memory cache is used to store data temporarily while it is being written by an async put.
- Expanded the deprecation of persisted boot/memory caches, which no longer offer the performance benefit that they used to.
- Fixed the pak file cache to skip data with a compressed size of over 2 GiB.

#jira UE-141307
#preflight 620d85f93609e19371510fb1
#lockdown Aurel.Cordonnier
#rb Zousar.Shaker
#rnx

#ROBOMERGE-OWNER: Devin.Doucette
#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-COMMAND: _robomerge UE5-Main
#ROBOMERGE-SOURCE: CL 19076205 in //UE5/Release-5.0/... via CL 19094550
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19095974 by devin doucette in ue5-main branch]
2022-02-23 13:40:18 -05:00
devin doucette
2800210897 DDC: Enabled compression of legacy cache data
- FileSystem, Http, Pak, S3 use the ValueWithLegacyFallback mode by default, which cause them to fall back to searching for uncompressed data if compressed data is not found.
- FileSystem has been fixed to store up to 1 MiB of compressed data inline with the value package rather than separately in content-addressable storage.
- Pak has been optimized to have GetChunks only load the required region of the requested value, rather than the whole value.
- Pak has been changed to stop storing data inline in the record package, since it will end up in the same file anyway when stored separately.
- Pak will upgrade the compressor and compression level when a compressed pak file is requested. Default cache compression uses Oodle Mermaid VeryFast and will upgrade to Oodle Kraken Optimal2.
- Zen does not have compression enabled by default, pending deployment of a new version that stores compressed values to Horde Storage.
- Added a missing request barrier when saving uncompressed data as compressed.

Example reduction in file system cache size when cooking for Windows:
- CitySample dropped from 66.5 GiB to 21.8 GiB.
- Lyra dropped from 2.54 GiB to 672 MiB.
- ShooterGame dropped from 1.21 GiB to 380 MiB.

Example reduction in compressed pak file cache size when cooking for Windows:
- CitySample dropped from 22.3 GiB to 18.5 GiB.
- Lyra dropped from 691 MiB to 543 MiB.
- ShooterGame dropped from 387 MiB to 313 MiB.

#jira UE-134381
#preflight 620a703f583261b0a658e043, 620a6fb2803d9066e6805310, 620a733117632e948459b6af
#lockdown Aurel.Cordonnier
#rb Zousar.Shaker

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18983671 in //UE5/Release-5.0/... via CL 18983890 via CL 18984096
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)

[CL 18984126 by devin doucette in ue5-main branch]
2022-02-14 14:43:39 -05:00
devin doucette
70d0aea9a6 DDC: Added support for 64-bit sizes in the legacy cache
Includes an optimization to avoid an extra copy of data loaded from the cache.

#jira UE-103039
#preflight 6205f379b84973a2bb76d942
#lockdown Aurel.Cordonnier
#rb Zousar.Shaker

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18954059 in //UE5/Release-5.0/... via CL 18954686 via CL 18955089
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)

[CL 18955195 by devin doucette in ue5-main branch]
2022-02-11 12:56:47 -05:00
devin doucette
778a7d292b DDC: Added compression support to legacy cache values
The cache stores can individually control their "legacy mode" now, which offers a choice of ValueOnly, ValueWithLegacyFallback, LegacyOnly.
- Using ValueOnly will forward every legacy request through the Value API, which compresses values by default and supports values larger than 2 GiB.
- Using ValueWithLegacyFallback behaves like ValueOnly, but misses from GetValue are forwarded to GetCachedData, and stored with PutValue if found.
- Using LegacyOnly will forward every legacy request through the Legacy API.

FLegacyCacheValue uses shared state to ensure that each value is compressed or decompressed at most once.

#jira UE-134381
#preflight 62054b430c64e1822f41231b
#lockdown Mark.Lintott
#rb Zousar.Shaker
#rnx

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18940270 in //UE5/Release-5.0/... via CL 18941016 via CL 18941392
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)

[CL 18941401 by devin doucette in ue5-main branch]
2022-02-10 14:57:42 -05:00
devin doucette
517947112b DDC: Reorganized cache policy code into its own files
- FCacheRecordPolicyBuilder now disallows adding value policies with flags that only make sense for records.
- FCacheRecordPolicyBuilder now disallows adding multiple value policies for the same value.
- FCacheRecordPolicyBuilder now skips addition of value policies that match the default policy.

#rb Matt.Peters
#rnx
#preflight 61f471cc6b5aea38e5c64cb6

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18782116 in //UE5/Release-5.0/... via CL 18782123 via CL 18782168
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18782178 by devin doucette in ue5-main branch]
2022-01-28 20:34:31 -05:00
devin doucette
b6bc462f04 DDC: Made ICacheStore private and removed ICache::CancelAll
#rb Zousar.Shaker
#rnx
#preflight 61f2da78801201ab3862d5ac

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18756063 in //UE5/Release-5.0/... via CL 18756070 via CL 18758707
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18760714 by devin doucette in ue5-main branch]
2022-01-27 15:43:52 -05:00
devin doucette
b412a532ed DDC: Added MakeResponse(EStatus) to the cache request types
#rb Zousar.Shaker
#rnx
#preflight 61f1b88fc0033b39f89c8d84

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18744557 in //UE5/Release-5.0/... via CL 18744970 via CL 18745683
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18745958 by devin doucette in ue5-main branch]
2022-01-26 17:07:56 -05:00
zousar shaker
109bb67a95 Fix bug where serialization of delimeter character for CachePolicy serialization (comma ',') was being serialized as an int32 ("44") due to mixing of UTF8 builder and TCHAR character.
#rb matt.peters
#preflight 61f1997573238441cb66c9ea

#ROBOMERGE-AUTHOR: zousar.shaker
#ROBOMERGE-SOURCE: CL 18740488 in //UE5/Release-5.0/... via CL 18740829 via CL 18742806
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18743180 by zousar shaker in ue5-main branch]
2022-01-26 15:35:13 -05:00
matt peters
464d8e698f CachePolicy: Add Save/Load to StringBuilder.
CacheRecordPolicy: Add Save/Load to CompactBinary
#rb Devin.Doucette
#rnx
#preflight 61f005391f5c4c6f64941707

#ROBOMERGE-AUTHOR: matt.peters
#ROBOMERGE-SOURCE: CL 18722255 in //UE5/Release-5.0/... via CL 18722342 via CL 18722401
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18722411 by matt peters in ue5-main branch]
2022-01-25 09:50:39 -05:00
devin doucette
6ab080890c DDC: Renamed cache request and response types from Chunk to GetChunk
#rb Zousar.Shaker
#rnx
#preflight 61e5ec410705ece855b8da74

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18635634 in //UE5/Release-5.0/... via CL 18635654 via CL 18635655
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18637582 by devin doucette in ue5-main branch]
2022-01-18 04:47:59 -05:00
devin doucette
836757d1c2 DDC: Moved GDDCIOThreadPool out of Core
The DDC thread pool is a temporary workaround for issues with high-latency cache accesses happening on regular worker thread, which are reduced in number in 5.0 compared to 4.27. Moving it to be private within DDC will keep it easy to remove once the high-latency caches are accessed through an async API.

#rb Zousar.Shaker
#rnx
#preflight 61e5b194873f2ea48f3e0b02

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18634975 in //UE5/Release-5.0/... via CL 18634980 via CL 18634997
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18637555 by devin doucette in ue5-main branch]
2022-01-18 04:45:24 -05:00
devin doucette
0888c913f5 DDC: Fixed an assert when doing a put from a cache plugin
#jira UE-139259
#rb Zousar.Shaker
#rnx
#preflight 61e1b9c23a6da83197bbad07

#ROBOMERGE-OWNER: Devin.Doucette
#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18620142 in //UE5/Release-5.0/... via CL 18620423 via CL 18620470
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18620499 by devin doucette in ue5-main branch]
2022-01-14 13:35:25 -05:00
devin doucette
1883382ae7 DDC: Added functions to transform a cache policy and build policy
#rb Zousar.Shaker
#rnx
#preflight 61e0aa6e341d372424e948f1

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18617338 in //UE5/Release-5.0/... via CL 18617349 via CL 18617359
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18617376 by devin doucette in ue5-main branch]
2022-01-14 09:48:40 -05:00
devin doucette
3725815687 DDC: Added ILegacyCacheStore and folded the key length limit into the new FLegacyCacheKey
This API adds a little bit of overhead but, in exchange:
- Offers a path to migrate to the new Value API.
- Offers a path to provide compression while falling back to the previous format.
- Offers a path to backends batching requests without consuming a worker thread.
- Avoids copying the value multiple times during async puts.

#rb Zousar.Shaker
#rnx
#preflight 61e0a32fed50181feb57c5d6

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18607028 in //UE5/Release-5.0/... via CL 18607056 via CL 18607101
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18607126 by devin doucette in ue5-main branch]
2022-01-13 17:30:44 -05:00
devin doucette
394fd0642b DDC: Made the backend namespaces consistent in advance of introducing ILegacyCacheStore
#rb Zousar.Shaker
#rnx
#preflight 61e04880250b9537f77549d7

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18597466 in //UE5/Release-5.0/... via CL 18597469 via CL 18597485
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v899-18417669)

[CL 18597488 by devin doucette in ue5-main branch]
2022-01-13 11:09:29 -05:00