Solved: Unreal Engine Huge Performance Bottleneck

I am attempting to Optimize Unreal Engine for Linux using OProfile and I think I found out some performance bottleneck, Unreal Engine statistically consumes about 70-80% of its time dealing with ld-*.so!

At first I have assumed that it must be because ld-*so is busy searching, loading and linking library files to Unreal Engine and busy saving critical codes to RAM, thus this bottleneck must just happen at the beginning of the program launching. So I went to run it for a longer time, but to my surprise, the communication between Unreal Engine and ld-*so even grew to almost 80%! Linking must not have been efficient or information from RAM might not have been read well by Unreal Engine, I still dont know yet.

I believe Unreal Engine should not be consuming 70-80% dealing with ld-*.so, maybe 10-20% is ok, but more than half of the time is already too much. How do we fix it?

I am assuming you are using perf, since oprofile is no more… Could you please share the commandline you are using and what you are doing in the engine. It looks like you are profiling the editor startup?

That was what I think at first. So I let the program run for quite some time, ld-*.so access cycle should then fall while I do other stuffs in the engine, But to my suprise, it even went higher upto 80% access time.

The ff are the commandline, pardon the typo

opcontrol --no-vmlinux

opcontrol --reset

opcontrol --setup

opcontrol --start

./UE4Editor

opcontrol --dump

opcontrol --stop

opcontrol -h

Fix: https://github.com/EpicGames/UnrealEngine/pull/2778

Hi, thats promissing! I will profile again and be back with the result

After a long and painful games with linker, I shaved off more 1-2s from Linux editor startup: https://github.com/EpicGames/UnrealEngine/pull/2793

That results in 4.3s to start up editor with an empty project (no code, no content) on i7 4770 for me. This is still slower than Windows on same box (2.5s), so there’s more room for profiling and optimizations.

I can confirm that this have resolve the Issue, applied patch was from https://github.com/EpicGames/UnrealEngine/pull/2793 by Slonapotamus.

From 70-80% down to 0.118%! Great Job!