Commit Graph

32 Commits

Author SHA1 Message Date
laura hermanns
df056f2888 [UBA] Rename trace files to reflect "MultiprocessId" to avoid confusion with cook worker ID.
[FYI] Zousar.Shaker, Henrik.Karlsson
#rnx

[CL 34306037 by laura hermanns in ue5-main branch]
2024-06-12 09:35:38 -04:00
laura hermanns
bac2b0d13e [UBA] Add command line argument "-UBA" as abbreviation to enable UbaController plugin.
This also moves all conditions to enable UbaController plugin into IsUbaControllerEnabled(), which are now "-NoUbaController", "-Uba", and the tri-state INI config "[UbaController]:Enabled".
This allows a fine-grained control over what machines support UBA due to Horde bandwidth.

#jira UE-210043
#rnx
#rb henrik.karlsson

[CL 33660304 by laura hermanns in ue5-main branch]
2024-05-15 11:40:23 -04:00
laura hermanns
e1298fccc7 [UBA] Improve log output for ensure condition in UBA job processor.
Use several ensure conditions instead of a single one to get filename and file size.
The failed job artifacts don't provide enough information to track down the root cause.

#jira UE-214053
#rnx
#rb dan.elksnitis

[CL 33605110 by laura hermanns in ue5-main branch]
2024-05-13 11:46:01 -04:00
henrik karlsson
3a369aa3a0 [UbaController]
* Moved virtual function to cpp file

[CL 33490634 by henrik karlsson in ue5-main branch]
2024-05-07 14:46:31 -04:00
laura hermanns
707374f649 [UBA] Enable UBA shader compilation by default on build machines.
- Changed "[UbaController]:Enabled" INI configuration from boolean to string, now accepting "True", "False", and "BuildMachineOnly".
- Backward compatible to commandline argument "-ini:Engine:[UbaController]:Enabled=true".
- Enable CVar "r.UbaController.DumpTraceFiles" by default so no additional configuration for "BuildMachineOnly" is required (UBA trace files don't take up a lot of memory).

#rnx
#rb Ryan.Hummer

[CL 33408141 by laura hermanns in ue5-main branch]
2024-05-02 16:10:40 -04:00
sergio gardeazabal
1f845db6de [UBA Controller] Adding support for running uba agent with -Host
Also added support to specify a uba port and force remote via the existing UBA Controller section in Engine.ini

[REVIEW]
#rb Laura.Hermanns

[CL 33208834 by sergio gardeazabal in ue5-main branch]
2024-04-24 15:08:39 -04:00
laura hermanns
8477cdd7a9 [UBA] Use new Horde API to retrieve server URL and replace OIDC token login.
This unifies the Horde agent connection in the UbaController and avoids a custom configuration for the Horde server.

#rnx
#rb Ben.Marsh, henrik.karlsson
[FYI] Ryan.Hummer

[CL 33149289 by laura hermanns in ue5-main branch]
2024-04-22 16:03:33 -04:00
henrik karlsson
09e28aa26f [UbaController]
* Updated code to use latest uba export api

[CL 32946989 by henrik karlsson in ue5-main branch]
2024-04-12 17:59:38 -04:00
laura hermanns
967a7b7edb [UBA] Make UbaController plugin engine wide available.
- Set "EnabledByDefault" to true in UbaController plugin to make it engine-wide available and make per-project setting obsolete.
- Move UbaController sources from UbaController/Source/UbaController/ into UbaController/Source/ to match folder pattern of XGEController plugin.
- Remove explicit plugin setting from previous project files as it is now obsolete.

#jira UE-210306
#rnx
#rb Jason.Nadro
[FYI] Henrik.Karlsson, Ryan.Hummer, Bob.Tellez, Dan.Elksnitis

[CL 32441742 by laura hermanns in ue5-main branch]
2024-03-22 14:07:53 -04:00
henrik karlsson
a45170b9dc [UBA]
* Refactored out uba horde integration to its own module called UbaCoordinatorHorde. This required some changes like callback registration to register helpers to uba host
* Added UbaCoordinatorHorde target in uba to be able to compile a coordinator for horde that can be used in UbaCli or other custom written uba tools

#rb laura.hermanns

[CL 32347975 by henrik karlsson in ue5-main branch]
2024-03-20 01:20:59 -04:00
laura hermanns
3e8b172354 [UBA] Allow higher verbosity of UBA logs to be forwarded to UE_LOG.
This changes CVar "r.UbaController.ShowUbaLog" (boolean) to "r.UbaController.LogVerbosity" (int32) with three levels of verbosity:
- 0 (Default): Always forward errors and warnings as before.
- 1: Also forward UBA session information.
- 2: Forward all UBA logs.

UBA logs may show up as follows, forwarding the log from the shader backends:
  LogUbaController: Display: LogD3D11ShaderCompiler: Warning: RemoveUnusedInputs: Failed to compile!
  LogUbaController: Display: LogD3D11ShaderCompiler: Warning: __UE_FILENAME_SENTINEL__(4171): (3) Unable to match rule!

#rnx
#rb henrik.karlsson

[CL 31913446 by laura hermanns in ue5-main branch]
2024-02-29 12:34:11 -05:00
laura hermanns
795db09589 [UBA] Rename UBA trace files to be sorted by cooker instance.
- This renames the trace fiels from "UbaController.run-1.pid-0.uba" to "UbaController.CookWorker-0.Session-0.uba", sorting all session trace files grouped by their cooker instance in a file manager.
- Local cooks will often only have a single trace file, but the build farm launches multiple cooker processes and dependeing on workload, they will launch multiple UBA sessions per cooker.
- Start session ID in filename at zero to be consistent with cooker ID.

#rnx
#rb henrik.karlsson

[CL 31627549 by laura hermanns in ue5-main branch]
2024-02-19 17:13:53 -05:00
laura hermanns
25b3431d11 [UBA] Simplify generation of UBA trace files for shader compilation:
- Dump all UBA trace files into ShaderDebugInfo/UbaTrace folder.
- Rename CVar r.UbaController.TraceFilename (FString) to r.UbaController.DumpTraceFiles (bool) to simplify generation of trace files.
- Unify output filenames for trace files to always have file extension *.uba.

#rnx
#rb massimo.tristano
[FYI] Jason.Nadro, Dan.Elksnitis, Henrik.Karlsson

[CL 31436856 by laura hermanns in ue5-main branch]
2024-02-13 13:28:56 -05:00
henrik karlsson
824c7a9b18 [UbaController]
* Changed how local number of local processes is calculated based on how many remotes. Previous equation was way to aggressive towards turning off local processes

[CL 31372226 by henrik karlsson in ue5-main branch]
2024-02-11 04:00:56 -05:00
laura hermanns
b5606f4bb6 [UBA] Report highest number of agents and cores in shader compilation stats.
This adds more information about the distributed shader compiler to the compile stats. As an example from the UBA default settings when launching Lyra:
"LogShaderCompilers: Display: Highest number of remote agents active in parallel: 15 (480 active cores peak)"

#jira UE-206317
#rb Jason.Nadro
#rnx

[CL 31308083 by laura hermanns in ue5-main branch]
2024-02-08 17:29:49 -05:00
laura hermanns
9d3322d570 [UBA] Horde bundle locator must be interpreted as fixed size string view instead of a NUL-terminated string.
#rnx
#rb Jason.Nadro

[CL 31057670 by laura hermanns in ue5-main branch]
2024-01-31 14:07:53 -05:00
laura hermanns
b0a8da4640 [UBA] Fall back to OIDC login even for unattended cooks when environment variable UE_HORDE_TOKEN is unavailable.
#jira UE-204928
#rnx
#rb Jason.Nadro

[CL 31007860 by laura hermanns in ue5-main branch]
2024-01-30 10:49:33 -05:00
steve robb
f43fc1d782 Fixed up more bool-taking calls to take EAllowShrinking instead.
[CL 30894388 by steve robb in ue5-main branch]
2024-01-25 14:09:12 -05:00
laura hermanns
88b23f6849 Change verbosity of failed Horde login attempt for UBA agents as these failures must be accepted.
#rb Yuriy.ODonnell
#rnx

[CL 30884851 by laura hermanns in ue5-main branch]
2024-01-25 09:31:27 -05:00
laura hermanns
d48f727891 Replace ensure condition with return code to allow UBA agents to fail on volatile cloud services.
#jira UE-203720
#rb Henrik.Karlsson
#rnx

[CL 30814692 by laura hermanns in ue5-main branch]
2024-01-23 15:01:37 -05:00
laura hermanns
95db26731c Use UE_HORDE_TOKEN environment variable instead of OIDC login when unattended due to lack of user interaction on farm builds.
#rnx
#rb Ben.Marsh, Jason.Nadro

[CL 30664928 by laura hermanns in ue5-main branch]
2024-01-17 14:31:12 -05:00
laura hermanns
a426e9a89b Provide lease ID in UBA/Horde URL to forward user directly to the job in the web portal.
#rnx
#rb Ben.Marsh

[CL 30657309 by laura hermanns in ue5-main branch]
2024-01-17 08:52:23 -05:00
henrik karlsson
1ccb2a55af [UBA]
* Improved logging with the mode where log files are sent back to host from remotes

[CL 30643569 by henrik karlsson in ue5-main branch]
2024-01-16 15:40:35 -05:00
henrik karlsson
74401383e4 [UbaController]
* Moved temp directories to make it easier to find/delete them

[CL 30609183 by henrik karlsson in ue5-main branch]
2024-01-12 20:22:09 -05:00
henrik karlsson
460bdb7637 [UBA/Shader]
* Changed Scheduler_GetStats to separate active into activeLocal and activeRemote
* Added Storage_DeleteFile that can be used to delete cas entries if we know a file will never be used again (no point taking up space)
* Fixed so ubaagents spawned through horde has a idle timeout of 15 seconds (also made them quiet)
* Changed so UbaJobProcessor shutdown uba after 100 seconds instead of 10 seconds of idling without tasks
* Added so .uba.in and .uba.out is deleted from cas storage after used.. no point storing them there since they will never be used again
* Fixed so number of local SCW instances are decreased when more remote helpers are running
* Fixed race condition where tasks could be added when uba was shutting down causing tasks to be cancelled

[CL 30607957 by henrik karlsson in ue5-main branch]
2024-01-12 18:46:59 -05:00