3.6 KiB
Horde > Getting Started: Remote Compilation
Getting Started: Remote Compilation
Introduction
Horde implements a platform for generic remote execution workloads, allowing clients to leverage idle CPU cycles on other machines to accelerate workloads that would otherwise be executed locally. Horde's remote execution platform allows issuing explicit commands to remote agents sequentially, such as "upload these files", "run this process", "send these files back", and so on.
Unreal Build Accelerator is a tool that implements lightweight virtualization for third party programs (such as C++ compilers), allowing it to run on a remote machine - requesting information from the initiating machine as it's required. The remotely executed process behaves as if it's executing on the local machine, seeing the same view of the file system and so on, and files are transferred to and from the remote machine behind the scenes as necessary.
Unreal Build Tool can use Unreal Build Accelerator together with Horde to offload build tasks to connected agents, spreading the workload over multiple machines.
Prerequisites
- Horde Server and one or more Horde Agents (see Getting Started: Install Horde)
- A workstation with a UE project under development.
- Network connectivity between your workstation and Horde Agents on port range 7000-7010.
Steps
-
On the machine initiating the build, ensure your UE project is synced and builds locally.
-
Configure UnrealBuildTool to use your Horde Server by updating
Engine/Saved/UnrealBuildTool/BuildConfiguration.xmlwith the following:<?xml version="1.0" encoding="utf-8" ?> <Configuration xmlns="https://www.unrealengine.com/BuildConfiguration"> <BuildConfiguration> <!-- Enable support for UnrealBuildAccelerator --> <bAllowUBAExecutor>true</bAllowUBAExecutor> </BuildConfiguration> <Horde> <!-- Address of the Horde server --> <Server>http://{{ SERVER_HOST_NAME }}:13340</Server> <!-- Pool of machines to offload work to. Horde configures Win-UE5 by default. --> <WindowsPool>Win-UE5</WindowsPool> </Horde> <UnrealBuildAccelerator> <!-- Enable for visualizing UBA's progress (optional) --> <bLaunchVisualizer>true</bLaunchVisualizer> </UnrealBuildAccelerator> </Configuration>Replace
SERVER_HOST_NAMEwith the appropriate address of your Horde server installation.BuildConfiguration.xmlcan be sourced from many locations in the filesystem depending your preference including locations typically under source control. See Build Configuration. in the UnrealBuildTool documentation for more details.
-
Compile your project through your IDE as normal. You should observe log lines such as:
[Worker0] Connected to AGENT-1 (10.0.10.172) under lease 65d48fe1eb6ff84c8197a9b0 ... [17/5759] Compile [x64] Module.CoreUObject.2.cpp [RemoteExecutor: AGENT-1]This indicates work is being spread to multiple agents. If you enabled the UBA visualizer, you can also see a graphical overview how the build progresses over multiple machines.
For debugging and tuning purposes, it can be useful to force remote execution all compile workfloads. To do so, enable the following option in your
BuildConfiguration.xmlfile or pass-UBAForceRemoteon the UnrealBuildTool command line:<UnrealBuildAccelerator> <bForceBuildAllRemote>true</bForceBuildAllRemote> </UnrealBuildAccelerator>