Hello,
When starting up Issac Sim I noticed that the application heavily strains the GPU at the default blank environment. I have tried to mitigate this issue using the following method:
- Preferences > Rendering > Lower UI FPS Limit from default 120 to 30
- Preferences > Rendering > Yield ‘ms’ while in focus to max
- Turned off all lights in simulation
The above helps only for a little while, I noticed that with the main viewport camera, GPU memory will continue to collect without freeing the GPU cache.
A simple experiment that I ran to confirm this is adding multiple camera Prims (called in python using Camera class) and noticing the “GPU resources” tab adding ~1 Gb of memory for each camera. When I tried to delete the created camera prim via the GUI, I noticed the GPU memory not freeing the added memory.
I have 2 questions:
- Is there a current way to free the GPU memory without restarting Isaac Sim?
- Is there a way to save the rendering preferences such that I don’t have to type them every simulation startup?
Platform:
- Windows 11
- Isaac Sim v.2022.2.1
Hi @InfraredLaser - There is a new Isaac Sim release coming around Aug/Sep timeframe. Please try that release and report back if you are seeing the same or other issues.
Meanwhile, to answer your question in terms of Isaac Sim 2022.2.1 release:
-
Freeing GPU Memory: Currently, there is no explicit way to free GPU memory without restarting Isaac Sim. The GPU memory management is handled by the underlying graphics API and the operating system. When you delete objects in the scene, the memory they occupied may not be immediately released back to the system, but should be reused when new objects are created.
-
Saving Rendering Preferences: Isaac Sim should save your preferences automatically when you close the application, and restore them when you start it up again. If this is not happening, it could be a bug. As a workaround, you could create a startup script that sets your preferred settings each time Isaac Sim is launched. You can use the omni.kit.settings
API to get and set various settings. For example, to set the UI FPS limit, you could use:
from omni.kit.settings import get_settings_interface
settings = get_settings_interface()
settings.set("/app/renderer/uiFpsLimit", 30)
Please replace “30” with your desired FPS limit. You can use similar code to set other settings. This script could be run automatically at startup by placing it in the ~/.config/ov/kit/startup
directory (create this directory if it doesn’t exist).
1 Like
Thank you for the reply.
In response to the two points:
-
I noticed that when running IsaacSim helper scripts to import the camera
from omni.isaac.sensor import Camera
the resource from deleting the camera is not freed. However, if I create the camera using prims then delete it the resource is freed omni.isaac.core.utils.prims
.
-
When trying to run the script I get an error at the import: from omni.kit.settings import get_settings_interface
ModuleNotFoundError: No module named ‘omni.kit.settings’.
I tried importing the module via the IsaacSim internal Script Editor and through Python Extensions and I still receive the error.
Hi @rthaker,
It seems I forgot to tag you in the above post.
Doing this now for some visibility.
Also, I am not quite sure where to place the directory ~/.config/ov/kit/startup
.
Should I place this folder in the installed IsaacSim directory being:
C:\Users\<user>\AppData\Local\ov\pkg\isaac_sim-2022.2.1
Thanks
Replying to earlier post after I did further testing regarding point 1.
Regardless of the API to insert a camera the resources are not cleared by GPU (adding via prim API or using IsaacSim API). Adding, then deleting camera prims overtime will slow down IsaacSim.
A workaround until a fix is made in a future update is to reload the level. This will ensure the GPU cache to properly clear. IsaacSim performance wise will run without slowing down the simulator unless camera prims are added again. Reloading will also hold previously changed settings.
1 Like