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"

UE4 using a single core on multi-core pc

Hello, I have a 14-core workstation, however when I compile my ue4 c++ project, it will use maybe 5% utilization on a single cpu. I read comments that all cpu's are used by default, but I don't see this on my box.

I am running Engine Version 4.21.2 It appears some of what I read online around the issue is obsolete now since 2.19.

I have attempted to modify the BuildConfiguration.xml by adding the ProcessorCountMultiplier=2 and MaxProcessorCount=4 as an example with no effect. I'm not sure if I did this correctly. Below is my modified BuildConfiguration.

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


I also attempted to modify my build.cs with bFasterWithoutUnity = true; however this caused build errors.

I was unable to add the bFasterWithoutUnity = false to the BuildConfiguration.xml as it also caused build errors.

Any help is greatly appreciated.

Product Version: UE 4.21
Tags:
more ▼

asked Feb 24 '19 at 04:47 AM in C++ Programming

avatar image

VorocityVor
5 1 5

avatar image Shadowriver Feb 24 '19 at 05:41 AM

You are aware that it simply runs compiler on X number of cpp files? in order to actully use 14 cores you need at least 14 files to be compiling. post you compilation log, also try removing buildconfiguration.xml

avatar image VorocityVor Feb 24 '19 at 09:56 AM

Thanks for responding Shadowriver,

My project has 61 .cpp files and about 17,000 lines of code, but I'm usually only working in a single file at any one time. I tried making edits to several .cpp files and the build still focused on one core.

I removed the BuildConfiguration.xml file that I edited earlier, from C:\Users\User\AppData\Roaming\Unreal Engine\UnrealBuildTool\ but no change.

I notice on my quad core laptop, the same project will compile in about 59 seconds (24% cpu utilization across all four cores) after editing a single .cpp.

On my 14-core i9 it takes about 39 seconds (7% cpu utilization - actually 1 core at 100% utilization). I would expect the 14-core to be much faster than the 4-core, but also the 4-core laptop should be a lot quicker than 59 seconds I would think. Both are 16gb ram, SSD drives.

I can't help but think I'm missing some compile flag somewhere. My laptop and workstation are both running vanilla 4.21.2

avatar image Shadowriver Feb 24 '19 at 03:46 PM

I don't think it missing flag, can you show compilation log? you can cover up cpp file names and project name

avatar image VorocityVor Feb 25 '19 at 01:40 PM

Compiling on VS, the Output Log looks like this:

1>------ Skipped Build: Project: UE4, Configuration: BuiltWithUnrealBuildTool Win32 ------ 1>Project not selected to build for this solution configuration 2>------ Build started: Project: VGS, Configuration: Development_Editor x64 ------ 2>Using 'git status' to determine working set for adaptive non-unity build (F:\VGS_UNREAL). 2>Creating makefile for hot reloading VGSEditor (source directory changed) 2>Compiling game modules for hot reload 2>Using Visual Studio 2017 14.16.27023 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023) and Windows 10.0.16299.0 SDK (C:\Program Files (x86)\Windows Kits\10). 2>Building 3 actions with 28 processes... 2> [1/3] Module.VGS.cpp 2> [2/3] UE4Editor-VGS-3012.lib 2> Creating library F:\VGS_UNREAL\Intermediate\Build\Win64\UE4Editor\Development\VGS\UE4Editor-VGS-3012.lib and object F:\VGS_UNREAL\Intermediate\Build\Win64\UE4Editor\Development\VGS\UE4Editor-VGS-3012.exp 2> [3/3] UE4Editor-VGS-3012.dll 2> Creating library F:\VGS_UNREAL\Intermediate\Build\Win64\UE4Editor\Development\VGS\UE4Editor-VGS-3012.suppressed.lib and object F:\VGS_UNREAL\Intermediate\Build\Win64\UE4Editor\Development\VGS\UE4Editor-VGS-3012.suppressed.exp 2>Deploying VGSEditor Win64 Development... 2>Total build time: 38.50 seconds (Parallel executor: 31.71 seconds) ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 1 skipped ==========

Compiling from the Editor, the Compiler Log is as the image attached. Couldn't find an option in the Editor to copy/paste the text so i took a screen grab.alt text

compiler-log.jpg (71.8 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
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