# When I run package twice simultaneously and focus one game , GPU usage will be not balance

**URL:** <https://forums.unrealengine.com/t/when-i-run-package-twice-simultaneously-and-focus-one-game-gpu-usage-will-be-not-balance/610182>\
**Category:** Platform & Builds\
**Tags:** Builds, unreal-engine, Packaging, UE4-27, question\
**Created:** [July 21, 2022, 12:00pm UTC](https://forums.unrealengine.com/t/when-i-run-package-twice-simultaneously-and-focus-one-game-gpu-usage-will-be-not-balance/610182 "2022-07-21T12:00:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ljason](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ljason/32/553328_2.png) [@ljason](https://forums.unrealengine.com/u/ljason)\
**Post date:** [July 21, 2022, 12:00pm UTC](https://forums.unrealengine.com/t/when-i-run-package-twice-simultaneously-and-focus-one-game-gpu-usage-will-be-not-balance/610182/1 "2022-07-21T12:00:07Z")

</div>

when both lose focus  
 ![0FKXYRJ{`1CFMDK{RR$LM](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/9/0/8903d26485efc0271be5e02c558bde0db0f4d60c.jpeg)  
one focus  
 ![KCCBSJA2$N0W38NMJ8_4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/0/9/a09ac26acf61a1804c50bd1f3900d82a321e7eff.jpeg)  
 ![HRDVF2~T{E9UFU_36JP4SA2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/0/4/904cd9a159ee28b01a7408b7715eac3b81fb06f2.jpeg)  
in 4.27

when i use ue5.0.3  
OMG…  
 ![792f0a0c6c72d9d0b1fd4adb9342264](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/8/0/780339a49a031d5c03a0efd72f99b8859d921ca6.jpeg)

does any body can help?

I found same question but… no solution

> [@Framerate drop when packaged game out of focus](https://forums.unrealengine.com/t/framerate-drop-when-packaged-game-out-of-focus/420348/1):
>
> Hi, I need to run two packaged projects such that both game windows display on screen at the same time. The problem is that when one window is in focus, the other severely drops framerate. How can I allow both windows to run at full speed, even when not in focus? As far as I am aware, the editor preferences setting only affects the editor in this case.

---

<div class="post-metadata">

**Author:** ![AisaLandMan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AisaLandMan](https://forums.unrealengine.com/u/AisaLandMan)\
**Post date:** [July 21, 2022, 12:36pm UTC](https://forums.unrealengine.com/t/when-i-run-package-twice-simultaneously-and-focus-one-game-gpu-usage-will-be-not-balance/610182/2 "2022-07-21T12:36:27Z")

</div>

When the application has lost focus, some events will be called like this condition.Maybe you can reading source code some relatived like word ‘Use less cpu…’ to find out some ideals,

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/0/2/502e731a2af8270485b3f36b394fb4737aa47e8c.png)

---

<div class="post-metadata">

**Author:** ![ljason](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ljason/32/553328_2.png) [@ljason](https://forums.unrealengine.com/u/ljason)\
**Post date:** [July 21, 2022, 12:57pm UTC](https://forums.unrealengine.com/t/when-i-run-package-twice-simultaneously-and-focus-one-game-gpu-usage-will-be-not-balance/610182/3 "2022-07-21T12:57:14Z")

</div>

on my work list 😄

---

<div class="post-metadata">

**Author:** ![Zpei](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zpei](https://forums.unrealengine.com/u/Zpei)\
**Post date:** [July 21, 2022, 3:42pm UTC](https://forums.unrealengine.com/t/when-i-run-package-twice-simultaneously-and-focus-one-game-gpu-usage-will-be-not-balance/610182/4 "2022-07-21T15:42:10Z")

</div>

I don’t know the answer. This problem has always existed

---

<div class="post-metadata">

**Author:** ![jwatte](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jwatte/32/744941_2.png) [@jwatte](https://forums.unrealengine.com/u/jwatte)\
**Post date:** [July 21, 2022, 4:42pm UTC](https://forums.unrealengine.com/t/when-i-run-package-twice-simultaneously-and-focus-one-game-gpu-usage-will-be-not-balance/610182/5 "2022-07-21T16:42:22Z")

</div>

There’s code in the uppermost engine/world step loop that sleeps a little bit each frame if the game doesn’t have focus.  
Last I checked, you can turn this off with a console variable, but I forget what it’s called.

---

<div class="post-metadata">

**Author:** ![ADigitalCrusader](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ADigitalCrusader](https://forums.unrealengine.com/u/ADigitalCrusader)\
**Post date:** [April 16, 2024, 1:10am UTC](https://forums.unrealengine.com/t/when-i-run-package-twice-simultaneously-and-focus-one-game-gpu-usage-will-be-not-balance/610182/6 "2024-04-16T01:10:43Z")

</div>

any idea what the console variable is to fix this?

---

<div class="post-metadata">

**Author:** ![jwatte](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jwatte/32/744941_2.png) [@jwatte](https://forums.unrealengine.com/u/jwatte)\
**Post date:** [April 16, 2024, 2:59am UTC](https://forums.unrealengine.com/t/when-i-run-package-twice-simultaneously-and-focus-one-game-gpu-usage-will-be-not-balance/610182/7 "2024-04-16T02:59:24Z")

</div>

I did a quick search for Sleep on GitHub, but it’s used in too many places so I didn’t immediately find it.  
You can find it by checking out the source and grepping through it.
