Commit Graph

65 Commits

Author SHA1 Message Date
Devin Doucette
3f40f504cf DDC: Changed Put to take a const array of cache records now that records are copyable
#rb Zousar.Shaker
#rnx

[CL 16184736 by Devin Doucette in ue5-main branch]
2021-05-03 12:05:18 -04:00
Devin Doucette
e42bbbedab DDC: Implement ICacheStore on FDerivedDataBackendInterface
This allows the new cache to be implemented more efficiently using the old cache backends because functionality like the corruption wrapper and key length limiter can be bypassed and the individual backends can store cache records in whatever way is most efficient for them.

The hierarchical backend may request payloads when they are not required due to incomplete tracking of backend state, and GetPayload will never fill other backends due to the inefficiency of the existing backend framework.

The filesystem backend does not cache any state in memory, which makes requests for individual payloads less efficient than if it cached a mapping of cache payload key to raw hash after the first request for a cache key.

The HTTP, S3, and pak file backends are not implemented for the new interface.

The backends do not implement ICacheStore::CancelAll() because the existing backend framework provides WaitForQuiescence to wait for completion of async requests, and the implementation of ICacheStore by those backends works with that mechanism.

The non-leaf backends (hierarchical, async put, etc.) do not update stats from the ICacheStore functions.

#rb Zousar.Shaker
#rnx
#preflight 60899f35d324590001b47517

[CL 16148296 by Devin Doucette in ue5-main branch]
2021-04-28 16:22:18 -04:00
Zousar Shaker
ce91cce583 Ensure that the DDC filesystem backend updates timestamps on files in GetCachedData (if within the last quarter of its cleanup lifetime), not solely from CachedDataProbablyExists.
#jira UE-112593
#rb devin.doucette
#preflight 6085a7400bdfbc0001c61a68

[CL 16110598 by Zousar Shaker in ue5-main branch]
2021-04-25 13:59:44 -04:00
Marc Audy
01b7c9f4f5 Merge UE5/RES @ 15958325 to UE5/Main
This represents UE4/Main @ 15913390 and Dev-PerfTest @ 15913304

[CL 15958515 by Marc Audy in ue5-main branch]
2021-04-08 14:32:07 -04:00
Marc Audy
0cbbc781ca Merge UE5/Release-Engine-Staging @ 15740152 to UE5/Main
This represents UE4/Main @ 15709114

[CL 15740605 by Marc Audy in ue5-main branch]
2021-03-18 15:20:03 -04:00
Ben Marsh
4f78759ae2 Disable intermittent DDC warning when running on build machines.
#rb none
#rnx

[CL 15478823 by Ben Marsh in ue5-main branch]
2021-02-19 18:09:28 -04:00
Devin Doucette
6394ccc1cd DDC: Added TryToPrefetch to check multiple keys for existence and prefetch the data into a fast cache backend
#rb Zousar.Shaker

[CL 15422719 by Devin Doucette in ue5-main branch]
2021-02-16 17:24:48 -04:00
Marc Audy
bc88b73a29 Merge Release-Engine-Staging to Main @ CL# 15151250
Represents UE4/Main @ 15133763

[CL 15158774 by Marc Audy in ue5-main branch]
2021-01-21 16:22:06 -04:00
Devin Doucette
9010b3e1a5 DDC: Return a status from PutCachedData
The async put backend now uses this new status to avoid calling CachedDataProbablyExists after every put, which has a high cost for certain backends.

#rb Zousar.Shaker
#fyi Joakim.Lindqvist, Stefan.Boberg

[CL 15000972 by Devin Doucette in ue5-main branch]
2021-01-06 14:18:01 -04:00
Marcus Wassmer
3b81cf8201 Merging using //UE5/Main_to_//UE5/Release-Engine-Staging @14384769
autoresolved files
#rb none

[CL 14384911 by Marcus Wassmer in ue5-main branch]
2020-09-24 00:43:27 -04:00
geoff evans
60193de1ab Demote no-access to the DDC file share to be a warning instead of an error.
Making this an error breaks progression of BuildCookRun scenarios under UAT.

I wasn't able to find a way to communicate arguments from UAT's command line to it's invocation of the cooker. The default behavior of performance liabilities shouldn't be a failed build. Ideally it would be optional, and there would be a feature to promote this warning to an error where it is specifically desired, perhaps when running in a data center.

[CL 14258264 by geoff evans in ue5-main branch]
2020-09-03 19:15:09 -04:00
andrew grant
835b997f53 Edit-grated improved DDC behavior logging from Main to get better info around failing cooked tests
Temporarily turning on verbose DDC logging for EngineTest project

[FYI] zabir.hoque ben.ingram
#jira #rb na
#lockdown cristina.riveron

#ROBOMERGE-OWNER: andrew.grant
#ROBOMERGE-AUTHOR: andrew.grant
#ROBOMERGE-SOURCE: CL 12911373 in //UE4/Release-4.25/... via CL 12911375 via CL 12911433
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v682-12900288)

[CL 12911435 by andrew grant in Main branch]
2020-04-19 14:32:34 -04:00
andrew grant
8b29dd89a2 Fixed crash when verbose DDC logging is enabled
#rb trivial

#ROBOMERGE-SOURCE: CL 12647456 via CL 12647457 via CL 12649270 via CL 12649828 via CL 12649852 via CL 12649887
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v675-12543919)

[CL 12649913 by andrew grant in Main branch]
2020-04-07 00:58:12 -04:00
andrew grant
919e5daa5c Fix for DDC warnings in Fortnite EC jobs that use UnrealPak.
- Use a GUID rather than machine ID for write tests for programs (ShaderCompilerWorker, UnrealPak) that spin up multiple instances.

- When creating missing files for read-tests check if a failure could have been due to another instance creating that path at the same time.

- Improved some logging of issues to make future diagnosis of issues easier.

#rb swarm
[at]ryan.durand [at]devin.doucette

#ROBOMERGE-SOURCE: CL 12629650 via CL 12631522 via CL 12631547 via CL 12631579 via CL 12631609 via CL 12631644
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v675-12543919)

[CL 12631701 by andrew grant in Main branch]
2020-04-06 15:54:34 -04:00
andrew grant
95b59e82f4 Fixed a... typo? bad resolve? that was causing new data not to be written to DDC caches
[FYI] uriel.doyon, devin.doucette
#rb uriel.doyon

#ROBOMERGE-SOURCE: CL 12473303 via CL 12473315 via CL 12473325 via CL 12473327
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v672-12450963)

[CL 12473331 by andrew grant in Main branch]
2020-03-27 14:57:01 -04:00
andrew grant
6a3a6a6425 Temp workaround for FORT-273296 while I investigate why ShaderCompiler on Mac doesn't like the speed test option.
[FYI] stefan.boberg
#rb na
#tests compiled SCW and booted into editor with -noshaderddc to force shader compiles

#ROBOMERGE-SOURCE: CL 12466138 via CL 12468387 via CL 12468494 via CL 12468566
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v672-12450963)

[CL 12468580 by andrew grant in Main branch]
2020-03-27 11:20:28 -04:00
andrew grant
14d1b683f8 Moved some DDC debug options into a common class that can be provided to a backend to simulate certain behavior.
E.g.

'-ddc-local-missrate=50' simulates a 50% miss rate of keys on the local backend,
'-ddc-shared-misstypes=AnimSeq' simulates misses for any AnimSeq key. Use + to combine keys. E.g. AnimSeq+Audio

Memory DDC, FileSystemDDC and S3DDC support these options as do the classes that wrap other backends (e.g. AsyncPut).

#tests lots of warm and cold DDC
#swarm https://p4-swarm.epicgames.net/reviews/12458696

#ROBOMERGE-SOURCE: CL 12466119 via CL 12466177
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v672-12450963)

[CL 12466179 by andrew grant in Main branch]
2020-03-27 08:12:16 -04:00
andrew grant
e224300cc3 Moved some DDC debug options into a common class that can be provided to a backend to simulate certain behavior.
E.g.

'-ddc-local-missrate=50' simulates a 50% miss rate of keys on the local backend,
'-ddc-shared-misstypes=AnimSeq' simulates misses for any AnimSeq key. Use + to combine keys. E.g. AnimSeq+Audio

Memory DDC, FileSystemDDC and S3DDC support these options as do the classes that wrap other backends (e.g. AsyncPut).

#tests lots of warm and cold DDC
[at]ben.marsh [at]josh.engebretson [at]devin.doucette

#ROBOMERGE-SOURCE: CL 12458693 via CL 12462167 via CL 12464485 via CL 12464606
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v672-12450963)

[CL 12464717 by andrew grant in Main branch]
2020-03-26 20:55:39 -04:00
andrew grant
178b067378 Temporrily disabling filesystem DDC optimization that breaks virtual texturing
[FYI] jeremy.moore
#rb na


#ROBOMERGE-SOURCE: CL 12420666 via CL 12425989 via CL 12436837
#ROBOMERGE-BOT: (v671-12333473)

[CL 12442290 by andrew grant in Release-Engine-Staging branch]
2020-03-26 07:31:34 -04:00
andrew grant
3cc86b3d2f Optimizations for DDC access on remote / slow drives.
If a filesystem node is not available not prompt the user and optionally retry incase they need to mount a drive or start VPN

Fiilesystem nodes now perform a speed test using a selection of 'DDC sized' files to determine a classification (local, fast, ok, slow).

Add a new 'ConsiderSlowAt' property to the 'Filesystem' DDC node type. If latency to the node is >= this value then the node will be marked as slow which disables touch'ing and reduces file stats

Interface Changes

- Add the concept of a speed class to nodes
- Add GetName to nodes for better debugging / logging
- WouldCache query that allows caches to opt of of consideration early and avoid async tasks being created.
- Create a new 'FileBackedDerivedDataBackend' class that's the for the memory/boot backend and future classes
- TryToPrefetch interface functions for future use

Behavior Changes

- Moved parameter parsing into FileSysteDerivedDataBackend as things were getting out of hand
- FileSystemDerivedDataBackend now performs a speed test using 'DDC sized' files in separate directories and applies a classification
- Slow locations turn off touching of data on read
- Slow locations always return true for CachedDataProbablyExists. It's faster just to try to read and fail
- If the shared DDC is not available the user is prompted incase they need to mount it.

[at]ben.marsh [at]josh.engebretson
#rb swarm
#tests lots of PIE runs with / without this option


#ROBOMERGE-SOURCE: CL 12387516 via CL 12387517 via CL 12396622
#ROBOMERGE-BOT: (v671-12333473)

[CL 12396757 by andrew grant in Release-Engine-Staging branch]
2020-03-24 19:12:36 -04:00
ben marsh
31934e0cc1 Add an optional parameter to the filesystem DDC backend that logs any accesses to a particular key, so we can extract data for uploading to S3.
#jira
[FYI] Josh.Engebretson


#ROBOMERGE-SOURCE: CL 12166421 via CL 12166427 via CL 12166431
#ROBOMERGE-BOT: (v661-12148976)

[CL 12166433 by ben marsh in Main branch]
2020-03-13 15:35:22 -04:00
ben marsh
7d6083104f Add experimental DDC backend which fetches objects from an S3 bucket. Bucket is populated by a job running periodically on build machines, and generates a JSON manifest used to determine files to download.
#rb none
#rnx
#jira


#ROBOMERGE-SOURCE: CL 12147942 via CL 12147943 via CL 12149500
#ROBOMERGE-BOT: (v659-12123632)

[CL 12149604 by ben marsh in Main branch]
2020-03-12 13:29:21 -04:00
nick darnell
7fb5ae96d7 Changing the DDC interface to use TArrayView instead of TArray for placing data into the DDC.
Updating the ArrayView with new comparison operators to have greater replacement for what TArray provides.

#rb Marc.Audy, Steve.Robb


#ROBOMERGE-OWNER: nick.darnell
#ROBOMERGE-AUTHOR: nick.darnell
#ROBOMERGE-SOURCE: CL 11843381 via CL 11843463 via CL 11843492
#ROBOMERGE-BOT: (v656-11643781)

[CL 11879995 by nick darnell in Main branch]
2020-03-03 14:33:45 -05:00
devin doucette
2ec33ba823 Fix extra DDC puts when DDC logging is enabled on the command line
Enabling verbose DDC logging with -ini:Engine:[Core.Log]:LogDerivedDataCache=Verbose was causing extra idempotent puts because of checks for the DerivedDataCache commandlet that checked for "DerivedDataCache" anywhere in the command line. Check for "Run=DerivedDataCache" instead to avoid the problem.

#rb Matt.Peters


#ROBOMERGE-SOURCE: CL 11215688 via CL 11215689
#ROBOMERGE-BOT: (v644-11213502)

[CL 11225076 by devin doucette in Main branch]
2020-02-04 17:59:32 -05:00
ryan durand
471d972e62 Updating copyright for Engine Developer.
#rnx
#rb none


#ROBOMERGE-SOURCE: CL 10869240 via CL 10869516 via CL 10869902
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870584 by ryan durand in Main branch]
2019-12-26 15:32:37 -05:00