Skip to content
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

Slow memory leak #14463

Closed
re0312 opened this issue Jul 24, 2024 · 5 comments
Closed

Slow memory leak #14463

re0312 opened this issue Jul 24, 2024 · 5 comments
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior C-Performance A change motivated by improving speed, memory usage or compile times S-Needs-Investigation This issue requires detective work to figure out what's going wrong

Comments

@re0312
Copy link
Contributor

re0312 commented Jul 24, 2024

Objective

bevy_main

Windows11,Nv 4070ti ,13600kf

What you did

cargo run --release --example many_cubes

I went to have a meal and when I came back, I discovered that the memory usage had increased significantly.
after profiling , I identified a memory leak of approximately 100 KB/s (at 400 fps).

The memory leak appears to be positively correlated with frame rate.

This issue can also be reproduced in the 3d_scene , resulting in a faster leak (500KB/s 1600fps) if you enable AutoNoVsync.

@re0312 re0312 added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Jul 24, 2024
@alice-i-cecile alice-i-cecile added C-Performance A change motivated by improving speed, memory usage or compile times S-Needs-Investigation This issue requires detective work to figure out what's going wrong and removed S-Needs-Triage This issue needs to be labelled labels Jul 24, 2024
@alice-i-cecile
Copy link
Member

Does this occur on our 2D examples?

@re0312
Copy link
Contributor Author

re0312 commented Jul 24, 2024

Does this occur on our 2D examples?

yes. I ran the 2d_shape example continuously for approximately 5 minutes with AutoNoVsync(1200fps), and observed a gradual increase in memory usage from 100 MB to 150 MB.

@re0312
Copy link
Contributor Author

re0312 commented Jul 24, 2024

@alice-i-cecile looks like a wgpu bug ,bisect to #13186

@Friz64
Copy link
Contributor

Friz64 commented Jul 24, 2024

I bet this will be resolved by an update to wgpu 22. There have been lots of fixes/improvements to resource tracking in that release.

@re0312
Copy link
Contributor Author

re0312 commented Aug 12, 2024

fixed by #14401

@re0312 re0312 closed this as completed Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior C-Performance A change motivated by improving speed, memory usage or compile times S-Needs-Investigation This issue requires detective work to figure out what's going wrong
Projects
None yet
Development

No branches or pull requests

3 participants