Swarm agent что это

Unreal Swarm

An overview of Unreal Swarm, our task distribution system for computationally expensive applications, including Unreal Lightmass, the high-quality static global illumination solver in Unreal Engine 4.

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

What is Unreal Swarm?

Unreal Swarm is a general application and task distribution system, comprised of two application types, one being a coordinator that distributes build task(s), and the other being an agent that utilizes the host system’s resources to complete its assigned job(s).

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

After setting up the Swarm, a Swarm Coordinator will manage the job(s) andВ task(s) of Swarm Agent(s) on your network.

Requirements

Before you can begin setting up Unreal Swarm:

On each Windows machine that you want to act as a Swarm Agent, install the prerequisites required to run the Unreal Engine and editor. You can do this in any of the following ways:

Install the required version of the DirectX End-User Runtimes, which you can download from the link on the Hardware and Software Requirements page.

Run the prerequisite installer that is bundled with Unreal Engine, as decsribed on the Hardware and Software Requirements page.

Install the Epic Games Launcher and Unreal Engine.

Unreal Swarm currently runs only under Windows. The machine that you use to start the light build, and all machines that you want to participate in the distributed computation, must be running a version of Windows that is supported by Unreal Engine.

If you’d like to set up a render farm for computationally expensive tasks, please make sure to coordinate with your IT department to set up the appropriate permissions on machine(s) that will need to host Swarm Coordinator(s) and Agent(s).

Setting up Swarm Coordinator

If you’ve identified the machines that you’d like to use, and if you’ve installed UE4; you’re ready to set up Swarm Coordinator by following these steps:

After installing UE4, navigate to [UE4ROOT]\Engine\Binaries\DotNET.

Now, move (or copy) the following files from theВ [UE4ROOT]\Engine\Binaries\DotNET В folder into the newly created directory:

AgentInterface.dll

SwarmCommonUtils.dll

SwarmCoordinator.exe

SwarmCoordinator.exe.config

SwarmCoordinatorInterface.dll

SwarmInterface.dll

UnrealControls.dll

Finally, to verify that you can run the application on your machine, go ahead and double click on the Swarm Coordinator executable.

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

If you already have Swarm Agents deployed, Swarm Coordinator displays its Agent Dialog Window (1) and Restart Options Area (2).

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

Click for full image.

At this point, you don’t need to do anything with the application, so go ahead and move onto the next section, where you’ll set up Swarm Agent(s).

Deploying Swarm Agents

Now that you’ve set up Swarm Coordinator, you’re readyВ to deploy Swarm Agents. After identifying the machine(s) that you’d like to host your agents, go ahead and follow these steps:

Move (or copy) the following files from the [UE4ROOT]\Engine\Binaries\DotNET folder into the newly created directly: SwarmAgent.exe, AgentInterface.dll, SwarmCommonUtils.dll, SwarmCoordinatorInterface.dll, SwarmInterface.dll, and UnrealControls.dll.

To deploy an agent, double click on the Swarm Agent executable.

After launching Swarm Agent, the Swarm icon appears in the Windows Notification Area. Double click the Swarm icon to open the application’s main menu.

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

To configure Swarm Agent, click the Settings tab.

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

To enable Developer Settings, set the ShowDeveloperMenu flag (in Settings > Developer Settings) to True.

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

When you update an Agent’s settings, it’s worth noting that Swarm Agent writes settings out to SwarmAgent.Options.xml (or, if Developer Settings are enabled, to SwarmAgent.DeveloperOptions.xml ).

In the Distribution Settings drop down menu, locate the CoordinatorRemotingHost field, entering the host computer’s IPv4 Address.

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

If you don’t know your computer’s IPv4 Address, go ahead and run ipconfig from the Command Prompt.

If you don’t want to enter the system’s IPv4 Address into the CoordinatorRemotingHost field, you can enter the Coordinator’s DNS Name.

Finally, go ahead and open Swarm Coordinator, where you’ll find details about deployed Swarm Agent(s).

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

Click for full image.

Setting up Agent Groups

Setting up Agent Groups is useful for creatingВ execution clusters. For example, one set of machines might belong to a group that isn’t part of a render farm, whereas another cluster might have machines belonging to the farm.В

Getting started, go ahead and open the Settings > Distribution Settings menu.

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

To set up an Agent group, you’ll first want toВ specify which group jobs you want this Agent to be deployed to. For example, we’re specifying that this Agent will deploy to «FarmGroup» jobs in theВ AllowedRemoteAgentGroup setting.

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

If you want this Agent to be deployed to «FarmGroup» jobs, make sure that the AgentGroupName matches AllowedRemoteAgentGroup. In the following example, we’re precludingВ this Agent from being deployed to «FarmGroup» jobs.

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

If you’d like to learn more about anВ Agent’s Distribution Settings, the following table provides some usefulВ notes, coveringВ theВ remaining properties that can be specified for each Agent in your execution cluster(s).

Setting

Default Value

Description

AgentGroupName

This is the name of the agent group that this Swarm Agent belongs to.

AllowedRemoteAgentGroup

This is the name of the agent group jobs that this Swarm Agent can be deployed to.

AllowedRemoteAgentNames

The filter string (‘ ‘, ‘,’ or ‘;’ delimited) being used by the remote machine.

AvoidLocalExecution

Setting this flag to True means that you’d like to enable the distribution of jobs and tasks from this Swarm Agent (with no local execution).

CoordinatorRemotingHost

This is the name of the machine that’s hosting Swarm Coordinator. You can enter one of two strings into this field, either the Coordinator’s DNSВ Name or its IPv4 address.

EnableStandaloneMode

Setting this flag to True disables the distribution system for outgoing and incoming tasks.

Managing Swarm Cache

After you’ve deployed your Swarm Agent(s), you’ll want to manage the Agents’ Swarm Cache. Typically, managing an Agent’s Swarm Cache involves updating the Agent’s cache settings, clearing its cache, and validating its cache.В

To update the Agent’s cache settings, navigate to the Settings > Cache settings menu.

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

From this menu, you’ll be able to update the Agent’s Cache Settings (as described below).

Setting

Default Value

Description

CacheFolder

[Folder on Disk]/SwarmCache

This is the location of the cache folder, being on a fast drive with lots of space.

MaximumCacheSize

In gigabytes, this is the approximate maximum size of the cache folder.

MaximumJobsToKeep

This is the number of previous jobs to record logs and output data.

Additionally, if you want to clear the host machine’s cache, which is used by Swarm Agent to complete its assigned tasks, invoke the Clean command in the Cache menu.

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

Finally, if you want to validate the machine’s cache, invoke the Validate command in the Cache menu.

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

It’s good practice to clean and validate your Swarm Cache on a regular basis, especially if Unreal Lightmass is crashing and causing builds to fail.

Reading Agent Logs

Clicking on the Log tab opens the Log window that Swarm Agent log messages are flushed to.

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

If you want to specify the amount of output being flushed to the Log window, update the MaximumJobApplicationLogLines variable (found in the Developer Settings > Log Settings menu)В to change the number of output lines from a Job application before it truncates what goes to the Log window.

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

Click for full image.

Typically, the default logging level to files on disk is set to ExtraVerbose, whereas the default logging level to a Swarm Agent’s Log window is set to Informative.В If you want to change how detailed you’d like the Log output to be, update the Verbosity variable, which is found in the Settings > Log Settings menu.

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

Monitoring Progress

If you want to monitor an agent’s progress as it works on the jobs and tasks being assigned to it, open the Swarm Status window.В

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

When an agent is running,В you’ll see progress bars per machine, and for every progress bar, there are regions reflecting whether the application is initializing (1), preparing to do work (2) (both of which are not distributed work)В or performing distributed workВ (3).

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

To get more details about a job’s progress, hover your mouse cursor over the progress bars.

Finally, the Distributed Progress bar located at the bottomВ tells you the percentage of a Job that has been completed (4)В versus the percentage that is currently being worked on (5).

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

Stopping Swarm Agents

To stop a Swarm Agent, click File > Exit to close the application and kill its process.

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

Alternatively, rightВ click the Swarm icon in the Windows Notification Area and select its Exit command.

At this point, Swarm Coordinator and Swarm Agent can run with minimal intervention. Given the number of lights, objects, and the quality of calculations that need processing, you’ll find that with enough agents, Unreal Lightmass builds should only take a few minutes rather than a few hours.

Depending on your development environment (including the size and complexity of the scene that you’re working on), you mayВ wantВ to update how many cores are reserved on your local machine to improve build performance. This can be done by tuning the LocalJobsDefaultProcessorCount variable, which is located in the Developer Settings > Local Performance Settings menu.В

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

If you have some general questions about running Unreal Swarm, check out the following set of Frequently Asked Questions.

Frequently Asked Questions

What are some ways I can improve build times when using Swarm Agent(s) and Coordinator?

Adding Lightmass Importance Volume(s) in player-accessible areas:

This volume is used to focus where Lightmass spends its time on for accuracy and quality. The idea is that these should cover an area where the player can be. Areas outside of the volume will receive fewer photons and thus a lower quality result. Note that using single large volumes to encompass an area defeats their purpose of focusing photon calculations in key areas.

Individual Static Meshes that have high Lightmap resolutions and a lot of light contributions in a scene can increase build times, not only for the scene, but for a single Actor. Where possible, lower Lightmap resolutions for a quality result and use the Statistics window to get an idea of how long it took to build aВ single Actor forВ the Level. To get a good result for large (or complex) Static Meshes where you find you are setting higher Lightmap resolutions,В you may want to consider breaking it into separate smaller meshes or rework the Lightmap UV (where possible) to get better coverage for the parts that matter.

Enabling Foliage Tool Lightmap Resolutions:

Instanced Static Meshes used when you paint Foliage into your level automatically use the Lightmap resolution of the Static Mesh that it’s referencing. When you have hundreds (or even thousands) of these painted into your level, that resolution can be too high for the system to handle. It will lead to exponentially longer build times, potential Lightmass crashes due to memory constraints, and higher texture memory consumption.

It is recommended to enable the Light Map Resolution and use the default value of 8 or possibly set it to a lower value of 4. This lowers the resolution of all instances, but the perceivable quality loss is minimal since static shadowing only needs to be displayed at a distance while dynamic shadowing is handled near the camera.

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

Click image for full size.

ReducingВ the number of scene Actors and (or)В Lights:

The number of shadow casting Actors and (or) Lights in the levels means that all these interactions have to be considered when calculating lighting. Reducing light is a key way to limit the number of Actors that a single light interacts with. Reducing the influence radius for lights that don’t need to affect a large area can decrease the number of computations and thus increase the speed of the light build being processed.

UsingВ higher than recommended system specifications:

Swarm Agent is a CPU intensive process that requires a lot of calculations. If you’re only using your local machine, a good CPU and lots of RAM can improve build process time. Keep in mind, that the other factors previously mentioned also play a role in build processing time.

Why am I not getting Agent distribution?

Also, a more advanced way to peek at the available remote agents (even when you’reВ not doing a build) is to click on the Log tab and select Ping Remote Agents from the Network menu. You’ll see a list of the remote machines and their current state.

How can I limit CPU usage when building lighting?

From the Swarm > DeveloperSettings tab, you can limit CPU cores used during a lighting build for your local machine and remote ones with LocalJobDefaultProcessCount and RemoteJobDefaultProcessorCount.

For your local machine, you may want to limit its contribution to only a few cores, leaving enough for it to comfortably work on other tasks. By default, a couple of cores will be left free for this, but you may find you need more cores available to work with locally leaving distributed tasks handling more of the work for light build computations.

When trying to launch Swarm Agent, I get a Windows application error for UnrealLightmass.exe, what does this mean?

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

This type of error means that something is preventing the application from opening in Windows that is not directly the cause of UE4. Below are some steps you can take to resolve the issue:

Make sure you have the appropriate and latest Visual Studio dependencies installed. For Unreal Engine version 4.9 and earlier, you’ll need VS2013 dependencies and for 4.10 and later, you’ll want to have VS2015 dependencies.

If that does not resolve your issue, try using a free application (for example,В Dependency Walker ) to troubleshoot any DLL issues that may be preventing the UnrealLightmass.exe from loading.

Are Swarm Agent and Coordinator supported for Mac or Linux?

Currently, Swarm Agent and Coordinator are only supported for Windows. Light builds on Mac and Linux will only build locally.

Can my GPU be used to build lighting?

Swarm does not currently support GPU computations for lighting data.

What do the following errors mean?

Lightmass Crashed with «Ran out of memory allocating [some value]»

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

Click image for full size.

In this situation, Swarm Agent failed to process data for Lightmass because it ran out of memory. This most often happens when you’reВ not using Swarm Coordinator to distribute a build across multiple agents requiring a single machine to do all the work. Lightmass can run out of memory when computing a large Level with many Actors and Lights or if Lightmap resolutions are too high.

You can reduce the chances of getting this error by increasing the amount of RAM on your local machine, adding agents for distribution, lowering the Lightmap resolution of Actors where possibleВ or even adding a Lightmass Importance Volume to focus computations for key areas that players can access.

Lightmass Crashed with «Assertion Failed: (Index >=0)&(Index

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

Click image for full size.

When you receive this error, you should Clean and Validate your Swarm Cache.

Editor toast pop-up «Light Build Failed. Swarm failed to kick off.»

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

When you attempt to build lighting from the Unreal Editor, you may get this message. If so, the following are some common reasons:

Make sure you do not have multiple instances of Swarm Agent open and running. You can check this by looking at the task processing that is running or inВ WindowsВ by looking in theВ Windows Notification Area.

Corrupt levels and/or Actors in the level.

Not having correct exceptions forВ SwarmAgent.exeВ for Firewall and Anti-Virus software.

Installation or corruption issue with the Engine. For users with the Launcher, select your engine version drop down and selectВ Verify.

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

Source build issue with Unreal Lightmass. Rebuild the UnrealLightmass solution.

If Swarm is still failing to start, its ports could be in use by another system process.

Open your Swarm Log and check for the following error message:В

Exception details: System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 123.456.7.89:8009

You may need to involve your IT department to solve this issue with port assignments, especiallyВ since Swarm requires ports 8008 and 8009 to function properly. Without those ports, it will fail to initiate any agents or coordinator. It is not an issue specifically caused by UE4.

Источник

Настраиваем Swarm

В общем случае, ваша локальная сеть будет выглядеть как сервер, с подключенными к нему клиентскими компами.
Часть из них будут рабочими для дизайнеров уровней, и соответственно на них будет установлен сам UDK. Другие, возможно, будут просто ресурсом, и устанавливать там UDK не обязательно.

Из папки Binaries, установленного UDK, берем следующие файлы:

для координатора:
— SwarmCoordinator.exe
— SwarmCoordinatorInterface.dll

для агента:
— AgentInterface.dll
— SwarmAgent.exe
— SwarmCoordinatorInterface.dll
— UnrealControls.dll

Складываем их в соответствующие папки и несем все это на сервер (в принципе, координатором не обязательно быть серверу, это может быть любой комп в сети).
Кладем, например, в C:\Swarm\SwarmCoordinator и C:\Swarm\SwarmAgent.

Добавляем SwarmCoordinator.exe и SwarmAgent.exe в автозагрузку.

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

Запускаем SwarmAgent.exe и переходим во вкладку Settings.

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

Задаем следующие значения:
CacheFolder: C:\Swarm\SwarmCache
AllowedRemoteAgentGroup: Default
AllowedRemoteAgentNames: *
AvoidLocalExecution: True
CoordinatorRemotingHost: SERVER (здесь IP или сетевое имя координатора)

Если вы поставите ShowDeveloperMenu: True, появится еще одна вкладка с опциями разработчика.
В ней вам могут быть интересны поля LocalJobsDefaultProcessorCount, LocalJobsDefaultProcessPriority, RemoteJobsDefaultProcessorCount и RemoteJobsDefaultProcessPriority, которые означают количество ядер для локальной/удаленной задачи и приоритеты выполнения/подключения к задаче.

Хорошо, все настроено, и теперь, если вы заглянете в координатор, то увидите там первого агента, который запущен на этой машине.

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

То есть, координатор также может быть и агентом, но это опционально.

Немного о полях в координаторе:
Name – имя подключенного компа/агента.
Group Name – имя группы компа/агента.
Agent Version – версия агента. Обычно с каждым новым релизом UDK она меняется, так что не забывайте обновлять файлы.
State – состояние агента, меняется в зависимости от того подключен ли он к текущей задаче, доступен или занят, закрыт.
Cores for Local, Cores for Remote – количество ядер которые будут задействованы в задаче (устанавливается в описанных выше LocalJobsDefaultProcessorCount и RemoteJobsDefaultProcessorCount).

Загляните в папку C:\Swarm\SwarmAgent. Там добавились файлы SwarmAgent.DeveloperOptions.xml и SwarmAgent.Options.xml. Это опции, которые вы только что задали.

Теперь нужно установить агентов (но не координаторов) на другие машины. Берите все содержимое папки SwarmAgent (с файлами опций, не вводить же их повторно) и несите на другие компы.
Не забывайте добавлять SwarmAgent.exe в автозагрузку.

Когда процесс настройки завершен, и в координаторе видны все агенты, попробуйте на любой машине дизайнера построить уровень. Вы увидите, что в агенте этой машины будут выводиться процессы всех подключенных к задаче агентов. И то что строилось долгие часы, будет завершено за несколько минут.

Swarm agent что это. Смотреть фото Swarm agent что это. Смотреть картинку Swarm agent что это. Картинка про Swarm agent что это. Фото Swarm agent что это

Также старайтесь ставить агентов только на мощные машины, потому что, если часть задачи попадет слабому компу, он только будет задерживать процесс своей медленной обработкой.

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *