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.

  • What screen resolution and color depth are you using with VLC? The higher the definition, the more gpu memory. Minimum HD video at 24 bit depth is 18m, although I would double it for buffering. I didn't think VLC used the gpu for video playback?
    – tbitson
    Jul 19, 2019 at 19:54
  • Apparently VLC does use gpu because when set too low, it crashes. My Chromium just locked up the system and I had to reboot it. I changed the gpu_mem=64 and VLC still streams video correctly. Screen resolution is 1280x720, 24bit depth. Jul 19, 2019 at 20:12

2 Answers 2


This depends on the task you are running and the screen resolution.

If you want to optimize the GPU memory consumption, you can run

vcgencmd get_mem reloc
vcgencmd get_mem reloc_total

and see how much of the memory you have allocated is actually in use.


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, gpu_mem=16.

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.