Free up memory for Jetson Orin Nano Super JetPack 7.2

I just completed memory optimization to my Jetson Orin Nano Super Dev Kit after upgraded to JetPack 7.2.
✅ Add swap file for extended virtual memory
✅ Disable unnecessary desktop environment
✅ Disable background services (Bluetooth, ModemManager, WirePlumber, etc.)
✅ Toggle NVIDIA services and Docker as needed

The boot up memory usage is about 450MB

I saved these scripts in GitHub. You can use these scripts to free up memory by disable some services which you are not using it.

GitHub:

https://github.com/victortong-git/jetson-orin-nano-tuning

*** Please note that this reply is generated by LLM automatically ***

The Jetson Orin Nano Super Dev Kit is a powerful device that can benefit from memory optimization, especially when running multiple services or applications. The user has successfully optimized the memory usage of their device by implementing several tweaks.

Firstly, they added a swap file to extend the virtual memory, which allows the system to use the hard drive as an extension of the RAM when it runs out of physical memory. This is a common technique to prevent the system from running out of memory and crashing.

Secondly, they disabled the unnecessary desktop environment, which can consume a significant amount of memory and resources. By disabling it, the user has freed up memory that can be used by other applications.

Thirdly, they disabled background services such as Bluetooth, ModemManager, and WirePlumber, which are not essential for the device’s functionality. These services can consume memory and resources, and disabling them can help to free up memory.

Lastly, they toggled NVIDIA services and Docker as needed, which suggests that they have optimized the usage of these services to minimize memory consumption.

The result of these optimizations is a significant reduction in boot-up memory usage, from an unspecified amount to about 450MB. This is a notable achievement, especially considering that the user has documented their scripts on GitHub for others to use.

In comparison to other Jetson devices, the Jetson Orin Nano is a relatively powerful device, but it still has limited memory and resources compared to more powerful devices like the Jetson AGX Orin. Therefore, memory optimization is crucial to ensure that the device can run multiple applications and services smoothly.

It’s worth noting that the user’s approach to memory optimization is a good example of how to free up memory by disabling unnecessary services and optimizing system settings. However, it’s also important to consider the trade-offs of disabling certain services, as they may be necessary for specific applications or use cases.

Overall, the user’s achievement is a great example of how to optimize memory usage on the Jetson Orin Nano, and their scripts can be a useful resource for others who want to achieve similar results.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

Hi vtong,

I like this. I did all this “by hand”, leaving me with 6.9 GB free Ram at best.

What is your free Ram size on your Orin Nano, after running your script?

victor@jetson:~$ free
total used free shared buff/cache available
Mem: 7665088 601844 6758720 2420 508800 7063244
Swap: 16777212 0 16777212

📌 RAM Status

  • Total RAM: 7,665,088 KB (≈ 7.3 GB)

  • Used: 601,844 KB (≈ 0.57 GB)

  • Free: 6,758,720 KB (≈ 6.45 GB)

  • Available: 7,063,244 KB (≈ 6.73 GB)

6.9GB free memory is amazing. What did you disable?

More or less the same as you:

sudo systemctl set-default multi-user.target
sudo systemctl disable nvargus-daemon.service
sudo systemctl disable bluetooth.service
sudo systemctl disable avahi-daemon.service

I also run the command below (cleaning cache), before starting Ollama:

sudo sh -c ‘echo 3 > /proc/sys/vm/drop_caches’

I don’t run docker, or install jtop. Just the bare minimum.

Very good. I just learned this one.
sudo sh -c ‘echo 3 > /proc/sys/vm/drop_caches’

I don’t know why my ollama cannot work well. 100% on CPU as cannot detect JetPack
llama cpp is working good.

Many thanks for the sharing.