x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Changing UBT config to limit max CPUs

Hey Guys

I would like to know if there is an option, or line of code I can edit, to limit the amount of CPU cores it uses to build the project. I only have 8 Gig RAM and run out of RAM during compilation, thus the build fails. I have to build it multiple times in order to complete the build process, each times it builds a little bit at a time.

I have limited the CPUs in Visual Studio, but I know UBT builds the source on it's own, so that's probably why it didn't work.

Any advice ? Except for buying more RAM :-)

Product Version: Not Selected
Tags:
more ▼

asked Sep 01 '14 at 12:18 PM in C++ Programming

avatar image

Ad3ViLl
96 12 21 20

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Hi,

You can try tweak:

 /// <summary>
 /// Processor count multiplier for local execution. Can be below 1 to reserve CPU for other tasks.
 /// </summary>
 [XmlConfig]
 public static double ProcessorCountMultiplier;

 // When using the local executor (not XGE), run a single action on each CPU core.  Note that you can set this to a larger value
 // to get slightly faster build times in many cases, but your computer's responsiveness during compiling may be much worse.
 ProcessorCountMultiplier = 1.0;

BuildConfiguration.cs

Regards

Pierdek

more ▼

answered Sep 01 '14 at 03:34 PM

avatar image

Pierdek
2.6k 73 49 131

avatar image Ad3ViLl Sep 01 '14 at 03:55 PM

Nope, didnt work. Thanks for the help though.

avatar image Pierdek Sep 01 '14 at 04:27 PM

Ok, find

  \Engine\Source\Programs\UnrealBuildTool\System\LocalExecutor.cs

then find this line of code:

if (Utils.IsRunningOnMono)

and before this line put MaxActionsToExecuteInParallel = 2; or something

avatar image Ad3ViLl Sep 01 '14 at 04:34 PM

Ahhh, awesome thanks, that worked !!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

With latest master (4.6, didn't make it to 4.5) there's an option. Add MaxProcessorCount tag to Engine/Saved/UnrealBuildTool/BuildConfiguration.xml. Something like this:

 <Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
   <BuildConfiguration>
     <MaxProcessorCount>2</MaxProcessorCount>
   </BuildConfiguration>
 </Configuration>
more ▼

answered Sep 26 '14 at 06:39 PM

avatar image

cician
6 1 4

avatar image Pierdek Sep 26 '14 at 07:30 PM

huh six month of waiting;)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question