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"

GPU performance tuning of "HZB SetupMips" (As seen in GPU Visualizer)

Hi guys,

I need to optimize the GPU performance of a mobile VR game and tried "ProfileGPU" to view the GPU Vizualizer. This is what it looks like:

alt text

Now I'm wondering about how to optimize the top offender "HZB SetupMips..." that costs 3.21ms. Any ideas where that cost comes from and how I improve it?

The level is mainly a big landscape that's dynamically tesselated and obviously got a lot of texture repeats until the horizon line. And I use lightmapping.

I tried to change the Mip settings of the terrain textures I used ("Mip Gen Settings" and "Global Force Resident Mip Levels") but that did not change much. (Or anything..)

Any other ideas? Thank you.

Product Version: UE 4.12
gpu_profiling.jpg (186.8 kB)
more ▼

asked Jun 06 '16 at 05:17 AM in Rendering

avatar image

175 4 8 10

avatar image Jaatuli Jun 14 '16 at 01:19 PM

I am interested in this as well. Could not find any documentation or answers clarifying this.

avatar image blindmanonacid Jun 15 '16 at 01:24 AM

Also getting this using the SteamVR template made from Proteus:


but it's taking 5.38 ms

alt text

gpuvis1.png (1.7 MB)
avatar image DeeMel Jun 21 '16 at 05:34 AM

Also having this issue.

avatar image Alex_OM Jun 20 '16 at 11:54 PM

Hi guys, I am also experiencing this issue. I think it may be a 4.12 regression, as we upgraded from a 4.11 build, and this was not an issue in that version. 5ms for this pass on an i7 with a 980ti is insane! It seems that it's a problem that gets worse the longer the editor is running.

avatar image Imsopov Jun 21 '16 at 10:14 AM

I am getting the same with out HTC Vive and a GTX 1080

avatar image Imsopov Jun 23 '16 at 01:42 AM

Anyone have any idea what this is yet?

avatar image 刘鲲 Jun 28 '16 at 11:44 AM

the same,some one can help?

avatar image Imsopov Jun 28 '16 at 11:48 AM

Has anyone from staff acknowledged this problem?

avatar image Dustums Jul 02 '16 at 11:42 PM

I had this problem as well. Out of nowhere, my build started seeing HZB Setup Mips of 8ms to 10ms. Luckily I had that build in Perforce, so I just downloaded a fresh build from scrtach, rebuilt my code and reloaded in editor. Now the HZB Setup is down to 0.5ms for the exact same level. Somehow something must get corrupted. Can anyone shed some light? I still have my old broken build.

avatar image Efrye Jul 07 '16 at 11:09 AM

It's happening on my project as well, but restarting the editor appears to help. At least temporarily.

avatar image RED_X_Strike Jul 08 '16 at 10:25 PM
  • also experiencing the same issue, Titan X and the Vive

avatar image TooLazyCat Jul 12 '16 at 11:03 PM

Same in my game. Updated from 4.11 and issue indeed is getting worse the longer editor is running.

avatar image Kilvin Games Jul 19 '16 at 07:35 AM

Bump, this is a serious problem with 4.12, staff please notice! :D

avatar image muchcharles Jul 20 '16 at 12:08 PM

I am seeing this on 4.12 too in the Reflections (subway) example project (edit: just tested and am seeing it in other maps as well)

avatar image Norman3D Aug 03 '16 at 11:18 AM

Hello, just stumbled across this thread because I'm having the exact same issue with 4.12.5 I've just checked the JIRA ticket and it's tagged as "Won't Fix". What are we supposed to do now? It worked with 4.11 and stopped working with 4.12. I don't understand what DX11 has to do with any of this if it was working in the previous version.

avatar image aNorthStar Aug 09 '16 at 03:43 PM

I've come across exactly the same issue in 4.12. seeing both BIG and wildly DIFFERENT numbers in 'HZB SetupMips Mips 1..9 512x256'

As you may know, the bug has been acknowledged here, and it seems that the plan is just to wait until DX12... https://issues.unrealengine.com/issue/UE-33448

The thing is, DX11 could be around for a long time and remain a huge part of the user base, because DX12 is to be Windows 10 only (as far as I know). I love UE4 but it seems like it is worth looking at.

What's especially puzzling, is that I've been only comparing the GPU performance of two identical, untouched copies of the default Flying game, using 'profilegpu'. I've been using these as benchmarks to compare with my game (which is just a slightly advanced version of it)

So I have one BADLY performing benchmark version and one VERY-BADLY-performing benchmark version, from the same source (not counting my own game in this discussion). In case you are interested, I've cropped out the two GPU profiles of my two benchmarks and put them side by side in the attached image. The left image is HIGH and the right image shows HUGE in 'HZB SetupMips Mips 1..9 512x256' (underlined in yellow in the picture). The difference is constantly about 5.00 ms.

What puzzles me is that that both benchmarks are two identical projects, untouched by me, straight from hitting the 'Flying' project button, no intervention. I've hackily tried copying and pasting the high-performing benchmark version... but this 3rd copy shows similar performance to the worst performing benchmark version. I also tried creating new Flying projects, again untouched, but these copies were the same.

As you'll understand, I'd like to keep the high performing version... but it might just get erased or corrupted. Like everyone else, it might really help if I could get to the root of this, so I can keep 'HZB SetupMips Mips 1..9 512x256' nice and quick.

alt text

avatar image IlllIl Jan 15 '18 at 07:28 PM

Running into the same issue on 4.18

(comments are locked)
10|2000 characters needed characters left

16 answers: sort voted first

I've submitted UE-33448 for this to be investigated. It does seem higher when in the Editor/PIE modes, but when I tried in Standalone game the levels were closer to what I would expect.

Thanks for reporting.


more ▼

answered Jul 19 '16 at 02:20 PM

avatar image

Tim Hobson ♦♦ STAFF
49k 886 99 875

avatar image Alex_OM Jul 19 '16 at 11:52 PM

Cheers Tim!

avatar image aaronwilson Jul 26 '16 at 06:51 PM

Now that we can see the internal jira tickets (thank you!) I noticed that this is a Won't Fix because it's blamed on DX11. We see the same problem on OpenGL as well, so waiting on DX12 won't really help us. Is there any plan to dig into the problem a bit more?

avatar image Dustums Jul 26 '16 at 09:29 PM

Another data point for me is that when I installed Renderdoc, the problem returned. Coincidentally, when I fixed the problem last by rebuilding my whole project, I hadn't reinstalled Renderdoc, so the fix for me may very well have been uninstalling Renderdoc. It's reproducible for me now though; HZB goes through the roof with Renderdoc installed, and goes back to normal with Renderdoc removed. But man, I've got to have Renderdoc! Anybody have any clue what the real "DX11" issue is?

avatar image Alex_OM Jul 28 '16 at 11:20 PM

It seems this can also affect 4.11.2, but only in an empty level in Editor (not PIE). Merely a curiosity at this point, but may help track down the root cause.

avatar image Gwenn Sep 09 '16 at 03:26 PM

Looks like the issue was closed as "won't fix". That's too bad, I have the same issue.

avatar image Alex_OM Sep 19 '16 at 02:12 AM

Hi guys,

This problem affects the Sequencer abilities of Unreal 4.13 extremely seriously, to the point that it is not usable. See attached screenshot, where it is using up 150ms+ of GPU time.

alt text

avatar image Fisher007 Sep 19 '16 at 10:42 AM

Are you sure that there is a relation between the two, other than that they both run? Have you tried changing the screen percentage runtime? :)

avatar image floopy4 Nov 29 '16 at 04:32 PM

Hey Tim

Just a heads up that from our tests, we found that "HZB SetupMips Mips 512x256" hits about 2ms in the standalone game and close to 4ms in the editor. So it's about halved, but still has quite an impact (9% of the scene in standalone)

avatar image Angius Sep 01 '17 at 03:17 PM

So, 33448 is somehow marked as "fixed", and yet...

alt text

4.16.3, the most recent engine version, so all fixes should be implemented.

What's also peculiar, is that I get solid 60 FPS at the beginning, but then it starts dropping, fast at first, then slower, dropping maybe 1 FPS per second, until it hits rock bottom of 10 FPS https://gfycat.com/DazzlingGratefulAzurevasesponge

EDIT: I disabled two random widgets, and now the FPS goes well above 100... Yeah, I have no idea either.

(comments are locked)
10|2000 characters needed characters left

Hi Guys!

So, I did a bunch of digging, it appears this not actually a problem with generating HZB mipmaps, but is actually time spent in the FSlateApplication::DrawWindowAndChildren function leaking into spurious stat counters.

To figure this out, I turned off all the relevant parts for this Issue (HZB, SSAO, SSR), which caused a nearly identical amount of the time in the ClearTranslucentVolumeLighting GPUStat. When this happened, I decided to go to the CPU Profiler to find out what was going on. It was then I noticed a correlation between the CPU stat counter of the Slate drawing and the time of the ClearTranslucentVolumeLighting GPUStat.

The best way to check this is to take a Sequencer Recording of an Actor's transform for at least 10 seconds, with it moving constantly, then opening the Recording in Sequencer.

The SSequencerObjectTrack::OnPaint causes a very significant performance impact, as it is seriously inefficient, and renders very large quantities of Slate Elements.

It would be awesome if a few others could verify these findings.



more ▼

answered Jan 11 '17 at 01:51 AM

avatar image

66 4 8

avatar image Alex_OM Jan 11 '17 at 01:59 AM

Also, I just thought about it by logical extension, this could mean other rendering jobs could be leaking into this stat counter, hiding other potential performance problems.

(comments are locked)
10|2000 characters needed characters left

I have bumped into this thing, with around 10-15 ms wasted randomly on HZB SetupMips. I found a strange solution, I just needed to change the screen percentage on the fly, so typing HMD SP X and it got rid of the nasty stuff. Also on other levels I had a similar issue but at that case there was a wild ShadowDepths thing eating around the same amount. But that could be eliminated with changing the SP too. If it doesn't work for the first time just try to switch around multiple times, going back and forth between SP settings. It's a good idea to attach the console command to a key so you just need to press it. Really weird stuff.

I know this is way too hacky but at least it's a temporary solution. Also I was using 4.13 with CV1.

more ▼

answered Sep 16 '16 at 01:31 PM

avatar image

108 14 18 24

(comments are locked)
10|2000 characters needed characters left

I can confirm that in 4.14, it definitely affects VR performance. I really need this fixed before i release my game on steam!

more ▼

answered Dec 29 '16 at 01:08 AM

avatar image

76 2 8 11

avatar image Saiodin Dec 30 '16 at 12:04 AM

Yeah. Having the same problem still in 4.14 on a fresh project. It uses 4ms out of 11ms total. That's crazy.

(comments are locked)
10|2000 characters needed characters left

4.18 has resolved this problem.

more ▼

answered Dec 01 '17 at 08:02 AM

avatar image

0 1

avatar image Jiggyjosh Jan 18 '18 at 01:56 PM

wrong, I'm still getting this problem

(comments are locked)
10|2000 characters needed characters left

looking at DeferredShadingRenderer.cpp and SceneOcclusion.cpp (the latter is where that stat is charged via BuildHZB). The following seems to trigger it:

 if (bSSAO || bHZBOcclusion || bSSR)
         BuildHZB(RHICmdList, Views[ViewIndex]);

so you might need the following to disable the call but this might disable screenSpace reflections and ambient occlusion.

 r.SSR 0
 r.HZBOcclusion 0
 r.SSR.quality 0
 r.AmbientOcclusionLevels 0

more ▼

answered Jul 13 '16 at 05:55 PM

avatar image

21 1 3

avatar image Dustums Jul 13 '16 at 08:36 PM

That looks like a good way to side step the problem by disabling the features we wish to use, but it doesn't address the problem where something seems to get corrupted and inflates HZB SetupMips improperly. Like I mentioned earlier, I saw this problem in my build. I got the exact same content/code from my Perforce depot, rebuilt, and the problem went away. It seems that some data is getting corrupted and causing HZB SetupMips to take excessive amounts of time.

avatar image ScotShinderman Jul 13 '16 at 09:11 PM

yeah I was wondering if you disabled HZB entirely, would the time slowdown still show up but perhaps in the next step -- is previous step messing up the state or seem internal to that SetupMips?

avatar image mitjaprelovsek Feb 13 '17 at 12:17 PM

Just to confirm, this step helped in our case. We don't need nor Ambient Occ. nor SSR, so at the moment we are fine with it.

(comments are locked)
10|2000 characters needed characters left

According to the JIRA ticket, this only affects the profiler view and doesn't actually affect performance? So VR preview should still run at the full speed when this is happening? Can anyone confirm that? I thought I was having some performance differences but I'I'll have to go back and test (for me hzb was taking around 4ms in the profiler, not as extreme as some others have reported).

more ▼

answered Jul 29 '16 at 01:34 PM

avatar image

262 8 16 24

avatar image Dustums Jul 29 '16 at 10:35 PM

VR Preview is definitely effected by this, at least with the condition I see. As I mentioned earlier, the error occurs for me when I have Renderdoc plugin installed (regardless if I'm running it), and it kills my VR Preview. If I remove Renderdoc, the issue seems to go away, though that is hardly a solution since I have no idea how to debug my shaders without Renderdoc.

(comments are locked)
10|2000 characters needed characters left

Just want to bump this. Out of nowhere my project (UE 4.15 all of a sudden Shows 80ms per frame of which 70 are "HZB". Come on guys, and you wont even fix this?

more ▼

answered Apr 27 '17 at 02:43 AM

avatar image

612 33 42 75

avatar image Teapot Creation May 11 '17 at 02:40 PM

I'm in the same case, using DirectX12... "Not much we can do about it until we are on DX12."
And then ?

avatar image Teapot Creation May 12 '17 at 08:10 AM

Some tests later : Instanced Stereo Mode downs the time for base pass from 3.16 to 1.03, but scales up the HZB thing from 2.8 to 4.2. With the 4.16 preview3, the results are similar with or without Instanced Stereo : 2,6-3 for base pass, 4,08-4,18 for HZB.

(comments are locked)
10|2000 characters needed characters left

I want to confirm that this issue affects 4.16 as well. My HZB spikes up to 5,000 ms after migrating to 4.16. Previously in 4.15 it was consistently at 8-10 ms. Epic, please send us some guidance around this issue, if it is unfixable...

more ▼

answered May 29 '17 at 04:36 AM

avatar image

6 1 2

avatar image tenchu12345 Dec 01 '17 at 11:12 PM

woah i thought my 40ms was bad. i have a single point light and floor in minimal default, deleted everyhing else but still getting 40ms. PIE seriously unplayable. It doesnt matter if it only occurs in PIE, we cant package a game every time we change something to test it. This is 4.16 so can anyone else confirm 4.18 fixes this.

(comments are locked)
10|2000 characters needed characters left

Yay yay yay,!

7ms on a scene... The performance on vr preview is horrible! but not at all in a cooked .exe so maybe the HZB is only affecting the Vrpreview?

I wish i could measure how much the Hzb gets down to on a cooked exe...

more ▼

answered Jun 30 '17 at 11:55 AM

avatar image

11 1 6 5

(comments are locked)
10|2000 characters needed characters left

Up to 25 ms for me on a classic project (no VR) with 4.16 and DX12. It happens on packaged game but on specific platforms ... Even with occlusion culling, SSR and SSAO disabled. But for me the stat if "HZB" only (from stat GPU command), not mips.

more ▼

answered Jul 25 '17 at 05:38 PM

avatar image

100 8 12 19

(comments are locked)
10|2000 characters needed characters left

i have said it already,


more ▼

answered Jul 25 '17 at 06:52 PM

avatar image

11 1 6 5

avatar image KevinDrure Jul 26 '17 at 08:45 AM

And as I said, even if in your case it happens only on VR preview, in my case it happens in packaged game without using VR. So this issue with HZB is not concerning only editor (or VR preview), contrary to what Tim Hobson confirmed when this thread has been created.

avatar image bdogrular Jul 26 '17 at 01:16 PM

♪♫♬ would -it-be-wrong-to-say-i "digress" ♪♫♬

avatar image Jiggyjosh Jan 18 '18 at 02:01 PM

yes it's wrong because you are wrong. You are claiming a statement and he's contradicting it with his experience. stop trying to be witty and pay attention

(comments are locked)
10|2000 characters needed characters left

this might be a bug. UE4.18 has solved this problem.

more ▼

answered Dec 01 '17 at 08:04 AM

avatar image

0 1

avatar image Jiggyjosh Jan 22 '18 at 07:04 PM

nope people including me are still getting the issue in 4.18

(comments are locked)
10|2000 characters needed characters left

I'm not sure what's going on here, but I'm in 4.18 and I'm getting this exact issue. I've been working in this same project for easily over a month and not run into this. The rest of my scene renders in sub 4ms. 4.18 has not resolved this issue whatsoever. Pretty disappointing.

more ▼

answered Dec 06 '17 at 12:02 AM

avatar image

1 1

avatar image Tracy Dec 13 '17 at 12:56 AM

I ran my project in 4.17.2. the HZB setupmipmaps cost over 10ms. but It's going faster in 4.18. It's only cost 4ms. that's a acceptable time for me. I don't know what it actually is though. did you figure out the problem in your project?

avatar image tenchu12345 Dec 13 '17 at 02:10 PM

are you playing in the normal editor viewport or the seperate pie viewport(the play icon with a screen next to it) as mine performs better in the normal editor viewport. it stills happens but less frequent. i assume its to do with hzbocclusion which ive set to r.HZBOcclusion=0 in console variables but it still happens for some reason.

(comments are locked)
10|2000 characters needed characters left

Messing around with t.maxfps seems to have an effect, if i let the frame rate go to high the HZB setup threads get pretty big but by the lowering the max fps it seems to reduce dramatically. Some sort of bottleneck maybe?

more ▼

answered Feb 11 '18 at 02:51 AM

avatar image

1 1 3

(comments are locked)
10|2000 characters needed characters left
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