/tmp/nsight_systems/injection_files consumes disk space

I am running JetPack on a Xavier.

The /tmp/nsight_systems/injection_files directory consumes large amounts of space. When I compiled a project, it created 1.2GB of space. When I started roscore, it consumed about 13MB of space and seems to be adding about 5MB a minute while it is running.

Is there a description of what is creating these files and what they are used for? It would also be helpful if I could direct the files to the large attached hard drive, rather than the limited storage on the Xavier itself.

The system appears to create a new file for every process. Mostly, these are very small, on the order of tens of bytes. Also, when the profiler finishes tracing a process, the directory is cleared. However, if the profiler is not used for a while and several compilations occur, it can completely fill the available space.

Hello @dkane,

Files in /tmp/nsight_systems/injection_files are created when Nsight Systems launches a process on the target, and any trace options (such as CUDA trace or OS Runtime trace) are selected in project options. To collect this trace information, NSys injects its libraries into the target process, and the files in /tmp are created to store the collected data. If an injected process forks child processes, they will inherit the injected libraries too, that’s probably why you see the additional files being created. Under normal circumstances, they get cleaned up after the profiling session ends.

Unfortunately, if Nsight Systems needs to collect lots of trace data, the files can understandably grow large. If you redirect the storage directory (such as by symlinking /tmp/nsight_systems/injection_files onto an external drive) and the storage is not very fast (such as an HDD), this may cause the profiler to unnecessarily slow down your processes.

One way to reduce the size of the injection storage files is to focus your profiling session on a single process, and limit the duration of the profiling session.

If you could maybe explain what kind of performance issues you are trying to debug, I might be able to give better advice.

Best regards,

What I see is that profiling files are generated, even though I don’t have Nsight Systems running on the attached computer. While building a library, profile files were generated for every process. To keep the disk from filling, I had to continually select and delete files while the build script ran.