I have installed Raspbian Buster on a Raspberry Pi 3B+ and would like to set the gpu_mem to the value for the best performance. When I set it to 32, VLC would crash with no logged errors. After setting it to 128, VLC now displays streaming network video. What is the best value for gpu_mem or how to determine or calculate that value.
The only things that benefit from more than a minimal amount of GPU memory are:
- 3D graphics supported by the GPU (ie., openGL).
- Video playback supported by the GPU (eg. h.264).
- The CSI based camera.
Notice this doesn't include GUI desktop stuff generally, or, for the most part, web browser content (with the except of video and 3D stuff). So if you aren't making use of any of that the "value for the best performance" will be the one that maximizes the RAM split,
If you are, you probably want at least 128 MB for the camera; as per Dmitry's answer you can check usage while watching video, etc. 4K stuff I imagine is the most intensive, besides 3D graphics, which won't have an upper bound.