Last Updated on May 24, 2020 by admin
Changing the memory distribution of Raspberry Pi (Memory Split) On Raspberry Pi is an SDRAM semiconductor memory, which is used as a “shared memory”. This means that the memory of the CPU and the graphics memory of the GPU must share the memory capacity of the SDRAM chip.
On the software side, you can set how much memory should be allocated to the graphics memory of the GPU. By default, the GPU memory is 64 MB in size. The remainder of 256, 512 or 1,024 MBytes is then available for the main memory.
How big should the graphics memory be?
It depends on what you do with Raspberry Pi. Basically, one could say that if you can do without a graphical output, then you could set the graphics memory to 0 MB. But it is not that easy. To boot Raspberry Pi, the GPU needs at least 16 MB of graphics memory. Less is not possible.
If you do not need the window manager because you run Raspberry Pi as a server or gateway, for example, then you can lower the memory for the GPU. At least 16 MB.
The default value for Raspbian is 64 MB. If you use the graphical window manager, like LXDE, on Raspberry Pi, then you should not change that. That is a very meaningful value. Because some features are not usable with too little graphics memory.
Media centers, like Kodi, only work with higher values. Depending on how much physical memory is available with 128 or even 256 MB. Once you have video or graphics-heavy applications, this is recommended.
In general, the CPU cores should have as much RAM as possible. But if the GPU has too little memory, then there are speed issues. For example, jerky videos.
- Reduce the memory for the GPU to 16 MB.
Solution: Customize storage distribution with raspi-config
The easiest way to change the storage distribution is via raspi-config. Here is a dedicated menu item.
In the “Advanced Options” there is the menu item “Memory Split”. There you can set the memory size for the GPU. The lowest possible value is “16” MByte.
For the change to take effect, Raspberry Pi needs to be restarted.
Solution: Adapt storage distribution via “/boot/config.txt”
It is more complicated about a file of the boot configuration. For this we open the file “/boot/config.txt”.
sudo nano /boot/config.txt
There we search the line with “gpu_mem” and change the value to “16”.
gpu_mem = 16
Then we have to save and close the file: Ctrl + O, Return, Ctrl + X.
For the change to take effect, Raspberry Pi must be restarted.