If you have created any sort of file or media server with your Raspberry Pi, chances are you do not need it to be connected to a monitor or external display of any sort. In my upcoming ultimate Raspberry Pi Media Server Guide i will assume headlessness and therefore we will be freeing more of its precious RAM. The Raspberry Pi only has 512 MB of DDR2 RAM which means every megabyte is valuable and must not be wasted. By default the Raspbian configuration uses 64MB of RAM for the GPU so it can output to an external display. Thanks to a firmware update we can reduce this number to 16MB so we get 48 more megabytes of precious RAM for the Raspberry Pi to do useful things with like searching for movies, downloading TV shows or serving up your media or files across your home network. This works on the B+ and Raspberry Pi 2, I don’t have the older models to test it on but I imagine it will work on the model A and B as well.
If you are trying to figure out which hardware would work best for you, consider reading the Pi benchmarks.
|Raspberry Pi 3|
|Raspberry Pi 2|
|Banana Pi Pro|
Raspberry Pi RAM Memory Tweak for all Models
Look at how much free memory is available
You will see some output like this, the total memory is 437 MB, free memory is 405 MB
total used free shared buffers cached Mem: 437 74 363 0 13 28 -/+ buffers/cache: 32 405 Swap: 99 0 99
By default the Pi has 64 MB for the GPU, let’s change it to 16MB
Update the Raspberry Pi firmware files with rpi-update which allows you to change the GPU RAM to 16 MB
It will download some files and then tell you to reboot
Time to reboot
Then login again and run the configuration
Go to option 8 – Advanced Options
Choose A3 Memory Split
It says enter GPU Memory which is currently 64
Delete this and change it to 16 and press Enter
You will be back at the configuration screen, press Tab and move to Finish
You will then need to reboot by pressing Enter
When you log back in now you can check the free memory
Notice that the output has changed, total available memory is now 484 MB instead and free memory is now 452 MB
total used free shared buffers cached Mem: 484 74 410 0 13 28 -/+ buffers/cache: 32 452 Swap: 99 0 99
I have increased the total available RAM memory from 437 MB to 484 MB and the free memory from 363 MB to 410 MB.
Now you have 48 MB of free RAM that your Raspberry Pi can now use do some more real work.