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

OutOfHostMemory with Linux/Nvidia #923

Closed
AustinJ235 opened this issue Feb 21, 2018 · 5 comments
Closed

OutOfHostMemory with Linux/Nvidia #923

AustinJ235 opened this issue Feb 21, 2018 · 5 comments

Comments

@AustinJ235
Copy link
Member

So recently switched to using my nvidia card again. Running Void Linux with the 390 driver. Issue exists with the 384 driver also. Haven't had time to test on windows if this exists there yet, but using PresentMode::Fifo or PresentMode::Relaxed causes a panic on a unwrap of OutOfHostMemory. PresentMode::Immediate works alright though. Using my application I can successfully match the error from aquire_next_image() and that returns OomError(OutOfHostMemory).

@tomaka
Copy link
Member

tomaka commented Feb 21, 2018

OutOfHostMemory is very weird! I have no idea when that is even supposed to happen.

@AustinJ235
Copy link
Member Author

Ok figured out how to monitor gpu ram usage without x. This issue causes to Xorg to lag out for some reason making it hard to read in the nvidia-settings.

I am writing this down as I observe...

The issue does not happen immediately. With no delay added in the loop it takes ~566 frames to spit out the error. Adding a 5ms delay to the rendering loop does increase the amount of frames it outputs before it returns and error, typically about 900-1200 frames instead. It also allows me to monitor gpu/cpu ram usage a little better as it happens to fast to get any valid gpu/cpu memory readings.

During runtime gpu memory remains the same while cpu memory is increasing roughly 15 MiB/s.

I am now printing out frame times. With 5ms delay in the loop I am getting frame times of ~10ms with Fifo and ~11ms with Relaxed. Since my display is running at 60hz I'd expect frametimes of ~16.67ms.

I not very technical in terms of vulkan, so I may need some help with this info. But taking a guess, I think frames are being kept on the cpu because the graphics card isn't taking them fast enough.

I added a manual fps throttle to keep the fps at 60. It now runs as you'd expect. I think this confirms my guess. Could be wrong though.

Hope this helps :)

@Kurble
Copy link
Contributor

Kurble commented Feb 22, 2018

In the examples the cpu side never waits on the futures returned by signal_fence_and_flush() etc. So I guess this makes sense. The examples should perhaps contain some way that the cpu will wait for the pipeline to finish after 2 frames or whatever have been queued?

@AustinJ235
Copy link
Member Author

Call wait on the future after signal_fence_and_flush() does solve the issue.

@AustinJ235
Copy link
Member Author

Closing in favor of #1247

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants