Maximizing ram on jetson tk1

I noticed that my jetson is always using at least 1.3 gigs of memory and I was wondering what I should do to free some of it up? I don’t really quite understand why so much memory is constantly being used…

How you measure usage may change the answers.

One use-case is RAM used as buffer or cache. Your RAM usage can be (and often is) reported including buffer and cache. The system is being very efficient when unused RAM is used to buffer or cache all kinds of things, especially hard drive buffering. As more hard drive is read (or various other activities which benefit from cache/buffer), more of the unused RAM will be used for performance reasons (hardare like hard drives benefit from caching and buffering, but don’t require this to operate).

However, as the system needs more RAM for actual running programs, any buffer or cache which is just for performance will be instantly available and so the RAM isn’t really in use. Any tool which doesn’t distinguish cache/buffer may lead you to believe more is in use than what is really from running programs, and more will be available to start new programs than what it looks like.

There are two tools I like which can be added to Jetson tend to color-code different RAM usage types to some degree. You may want to install xosview and htop. If you run xosview, be sure to enlarge the window so you can see the color coding. If it turns out that actual memory being used is required and not merely some performance benefit, run htop and have it sort by memory use to see what’s using it.

FYI, one thing you’ll perhaps run into for real memory use is that the GPU on a Jetson is not separate memory like in a desktop graphics card…GPU memory requires taking over some of the main system memory. If you’re doing CUDA work which keeps 1GB of data, then you will actually use a GB of RAM for this.

Thanks for this informative answer! I will try out those tools you mentioned.