Beorn_Bear wrote: ↑
Tue Aug 13, 2019 9:01 pm
What is the optimum split of main versus GPU memory for a Raspberry Pi 4 with 4GB RAM?! The default configuration is 64. Would 128? 256? 1 gb?What would provide the best performance balance? Will it assist in reducing the choppy youtube videos?!
The optimum split is to leave it on the default. On Pi 4 all of the 3D stuff has been removed from the static gpu_mem allocation, and is instead dynamically allocated within Linux. Also, on my Pi 4 there is no gpu_mem option set in config.txt - it seems to be automagically configured by the firmware at boot.
You can find what your current static GPU memory allocation is using the following command:
On my Pi 4 running 1080p60Hz this reports 76MB. If you are using 4K it may be set higher.
Youtube video performance is known to be suboptimal at present - it is being worked on. Which videos are you having trouble with?
For reference, the docs will soon say something like this (work is in progress at the moment to update it):
gpu_mem refers to memory that is addressable from the GPU, which includes the VPU, HVS, legacy codecs (e.g. H264), and camera, and on devices before the Raspberry Pi 4, the 3D system. The Raspberry Pi 4 3D system now has it's own Memory Mangement Unit (MMU) so textures and other GL resources are not allocated from the gpu_mem but Linux system memory instead. This means that gpu_mem can be set to a lower value, so even if you are using the H264 and camera then 128MB will probably be enough. On earlier models without the 3D MMU, you may need up to 256 or 512 in some more unusual cases.
For performance reasons, you should set gpu_mem as low as possible to give the Linux system as much memory as possible. However, setting gpu_mem to too low values may automatically disable certain firmware features, as there are some things the GPU cannot do if it has access to too little memory. So if a feature you are trying to use isn't working, try setting a larger GPU memory split.
Values of gpu_mem over 512 are not recommended, will provide no performance improvements, and are untested.