Jetson nano l4t top command

Recently I realized that Jetson nano’s CPU (Host) and the iGPU share SoC DRAM memory.
(CUDA for Tegra :: CUDA Toolkit Documentation)

In this case, ‘top’ command in l4t shows integrated memory usage that both CPU and GPU memory?

“top” shows the system RAM. As you observed, the GPU itself has no RAM of its own. The GPU for a Jetson is directly integrated with the memory controller rather than being on the PCI bus.

Thanks for your reply !

I have a question in a similar context.

In integrated memory, it access and use the same memory, but isn’t the memory usage in the CPU decreasing while GPU uses the memory?

Then shouldn’t the top command say that the amount of memory available to the CPU should be as small as the amount used by the GPU?

You are correct that using memory for the GPU decreases memory for the CPU. I like “htop” (“sudo apt-get install htop”), and there is the native “tegrastats”, and you could watch both and compare. A graphical tool of interest to you might be “xosview” (“sudo apt-get install xosview”), although most of these do not specifically give GPU info.

Notice that there are a lot of different ways to classify memory, and that applications like htop can be configured to show columns with different memory categories. The GUI (X) tends to be shown with a huge memory under “virtual”, but this is just the capability of video system…actual use would be listed in different columns. You could examine all of the different columns htop can display and research each type (there is no simple or quick way to really talk about it).

An example of a complication is that for example disk use can use RAM which is not dedicated to something else for buffering or caching, and this makes it appear the disk driver is using lots of RAM, but in reality all of that is given up if something else needs it. So do you list RAM in use but not dedicated as not available? How the memory is used and whether or not it is available to something else is not straightforward.