<div dir="ltr">Hi Dennis, Aaron,<div><br></div><div>Firstly, Dennis, you may have missed that it is <b>Xorg </b>leaking in the <b>VRAM </b>and not releasing it<b> </b>even<b> after my application is exited</b>/killed completely.</div><div>I have been monitoring the RAM as well, it is fine and my application is not leaking but somehow forces Xorg to allocate graphical memory that never gets released.</div><div class="gmail_extra"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""> <br>
</span>> I think you are looking at output from an nvidia tool and not memory<br>
> for the system and processes as a whole.<br></blockquote><div>I'm using nvidia-smi as it is available on all system with the nvidia driver</div><div>I actually see the same behavior monitoring <a href="https://www.khronos.org/registry/OpenGL/extensions/NVX/NVX_gpu_memory_info.txt">NVX_gpu_memory_info</a> manually</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Based on Mathieu's email subject, it sounds like he's interested in how<br>
much GPU memory Xorg is using. The process data in /proc does not<br>
include GPU memory.<br></blockquote><div>Indeed</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Mathieu, when you say memory is leaked, do you mean that the memory<br>
usage increases each time you run myOpenGLQtBasedApp, or does it<br>
increase from 50 MB to 110 MB and then stay there even if you run the<br>
app again?<br></blockquote><div>Each time I run and open/close QOpenGLWindow based widget, the graphical memory usage</div><div>increase by 4Mb until it reaches 96% of the availlable VRAM.</div><div>It then actually starts to leak on RAM by a mechanism I just learned about (eviction)</div><div>And then, once the RAM is full, OpenGL fails completelly.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
You can diagnose which clients are causing the server to allocate<br>
resources by running tools such as xrestop, xwininfo -tree -root, and<br>
xlsclients before and after running your app each time.<br></blockquote><div>Here are my results on a test run using Xfce with compositor enabled.</div><div>nvidia-smi shows a 61Mb leak</div><div><br></div><div>xlsclient -l and xwininfo -tree -root outputs are strictly identical before and after.</div><div>xrestop -b shows a slight increase of lees than a Mb all process additionned.</div><div>(see attached)</div><div><br></div><div>Note : Even after multiples runs and hundreds Mb of memory leaked reported by nvidia-smi,</div><div>xrestop total memory usage does not increase.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
If you're still having trouble, you can email <a href="mailto:linux-bugs@nvidia.com">linux-bugs@nvidia.com</a> and<br>
we can try to help you out there.<br></blockquote><div>I definitely will if we can't figure out what is going on.</div><div><br></div><div>Best regards,</div><div> </div></div><br></div></div>