Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When I create more than 1000 Entities the frame latency increases, but the CPU/GPU are not fully loaded #7743

Closed
yanmingsohu opened this issue Apr 7, 2024 · 5 comments

Comments

@yanmingsohu
Copy link

Is your feature request related to a problem? Please describe.
I use the model file filament\assets\models\torus. The strange color is because the material lacks the color parameter.
I think filament can run at least one of the cpu or gpu, but this is the running result. It seems that the cpu core is not fully loaded.
And the gpu uses 1%??

You will see a huge increase in skipframe because renderer->beginFrame(swapChain) returns false:
1
2
3

Describe the solution you'd like
I think filament can at least keep one of the cpu or gpu fully loaded.

Describe alternatives you've considered
When I use raw OpenGL API to render 10,000 such objects, I can run 25% GPU and 100% CPU.

OS and backend
NVIDIA GeForce GTX 1080
Windows 11 22H2 (1000.19041.1000.0)

FEngine (64 bits) created at 0000028B83AC8F80 (threading is enabled)
FEngine resolved backend: Vulkan
Vulkan device driver: NVIDIA 537.34
Selected physical device 'NVIDIA GeForce GTX 1080' from 1 physical devices. (vendor 0x10de, device 0x1b80, driver 0x86488000, api 1.3)
Backend feature level: 1
FEngine feature level: 1

@romainguy
Copy link
Collaborator

Can you please share a repro case? Filament is multi threaded and vectorized for everything related to sorting and culling so you shouldn't see a lot of CPU usage necessarily.

@yanmingsohu
Copy link
Author

yanmingsohu commented Apr 7, 2024 via email

@Nolram12345
Copy link

Nolram12345 commented May 5, 2024

I'm able to reproduce very similar behaviour with the GLTF viewer that ships with Filament.
When rendering lots of instances, especially of more complex geometry, resource utilisation (CPU/GPU) is quite poor, with frames however being actively skipped.
See this video:
https://github.com/google/filament/assets/37701550/79ec1604-52df-4938-bdf5-19baa8f07118

@romainguy
Copy link
Collaborator

@Nolram12345 Your GPU is busy at 80%. I don't know how that's measured but if the scene is fragment shader limited that's what I would expect. The fact the CPU is at low usage is a good thing?

@Nolram12345
Copy link

@Nolram12345 Your GPU is busy at 80%. I don't know how that's measured but if the scene is fragment shader limited that's what I would expect. The fact the CPU is at low usage is a good thing?

You may be right with fragment shader fillrate being a bottleneck, I'll profile that further.
I was kind of thinking that it may be a CPU bottleneck though since GPU occupany of the shader cores (labeled "3D" in task manager) varies so much between 60-80% - but I may be wrong on that assumption. I'll do some further testing.

Do you have any suggestions for test scenes that would allow me to check how well Filament is properly able to make use of given graphics & CPU capacity?

@google google locked and limited conversation to collaborators May 9, 2024
@pixelflinger pixelflinger converted this issue into discussion #7838 May 9, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants