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. 

[Closed] Limit/set the number of parallel jobs when compiling?

Both when building a project and building the UE4Editor I cannot find a way to limit the number of parallel jobs that clang uses.

So I get:

Performing 351 actions (4 in parallel)

I tried compiling the editor with make -j2 UE4Editor but the build tools completely ignore that.

My problem is that my cpu shows 4 available cpus (2 + 2 hyperthreading) but that gets me out of memory, too many processes, more than my 8GB occupied, system crash (happend two times).

I had to disable hyperthreading on the BIOS so that the build tools sees only 2 cpus and uses half the memory. But of course this is stupid, because I could for example compile with 3 jobs and it would be fine.

After disabling hyperthreading I get:

Performing 351 actions (2 in parallel)

So, my question is: is there any way to limit/set the number of parallel jobs when compiling?

if not, what is the reason for that?

I tried googling a bit and looking for the build tools compile options but couldn't find the answer

Product Version: Not Selected
Tags:
more ▼

asked Feb 02 '15 at 06:34 PM in Linux

avatar image

fales
13 1 1 4

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

The question has been closed Feb 05 '15 at 01:44 PM by amigo for the following reason:

The question is answered, right answer was accepted


1 answer: sort voted first

Hi fales,

Please edit Engine/Saved/UnrealBuildTool/BuildConfiguration.xml and add

2< /MaxProcessorCount >
in-between
 and < /BuildConfiguration >
which will limit your processor count to 2 (or whichever other number you set there).

There are no spaces after the greater and smaller than signs, I just had to add them to actually display the tags in the post.

more ▼

answered Feb 03 '15 at 02:33 PM

avatar image

amigo
1.1k 52 32 90

avatar image fales Feb 03 '15 at 06:28 PM

Thanks, works like a charm!

avatar image leotada Aug 02 '17 at 03:05 AM

Not worked for me, with 4.16 and clang 4.0

avatar image Ainias Mar 14 '18 at 12:05 PM

Worked for me. with 4.18 and clang 3.8. But I needed to add the BuildConfiguration-Element as well. Full XML-file is (remove spaces after <):

< ?xml version="1.0" encoding="utf-8" ?> < Configuration xmlns="https://www.unrealengine.com/BuildConfiguration"> < BuildConfiguration> < MaxProcessorCount>4 < /BuildConfiguration> < /Configuration>

avatar image drichardson Feb 06 '19 at 07:41 PM

As of 4.21 (and perhaps earlier, but I haven't checked), MaxProcessCount belongs under one of the executor elements (e.g., ParallelExecutor). I'm using the following BuildConfiguration.xml:

 <?xml version="1.0" encoding="utf-8" ?>
 <Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
   <ParallelExecutor>
     <MaxProcessorCount>1</MaxProcessorCount>
   </ParallelExecutor>
 </Configuration>
avatar image ゲーニー Feb 18 '19 at 02:35 PM

This BuildConfiguration.xml worked for me:

  <MaxProcessorCount>2</MaxProcessorCount>
   
   
  <MaxProcessorCount>2</MaxProcessorCount>
  
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Follow this question

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

Answers to this question