Tinkering with my Raspberry pi 4b 4GB

I was looking around and I saw good information on what is a good amount of memory to dedicate to video on older versions, but my own searches yielded no definitive answer other than experiment regarding this.

I was hoping to see if I could get a possible response here as to what may be a decent value for it. Currently I at least bumped it from the paltry 74 that it defaulted to on Raspberry pi OS up to 256. I’ve seen some improvement, but didn’t wanna step up further if it was:

  1. Not necessary
  2. No visual improvement or reason to do so

Is this setting just never really discussed because there is no true answer? Is it just not discussed because that is not what the pi 4 was built for? My primary purpose may end up being just a web video playback machine on my dumb TV I still have that works, but doesn’t have that kind of stuff built in and after the tweak to 256 runs decently at 720 and okay at 1080 after it catches up. Setting I’m adjusting specifically is going from the Menu - Preferences - Raspberry Pi Configuration - Performance - GPU Memory

Thanks in advance!

Screen is 1920 pixels by 1080, assuming 32 bits per pixel for color data, divide by 1024 twice to get from bits to megabytes

(((1920*1080)*32)/1024)/1024 =63.28MB per raw frame.

I’d personally double it so the gpu isn’t paging or can work on the next frame while displaying the previous.

You could try to work out ram clock vs gpu clock and frame timings for a target frame rate.

But bare minimim for 1080 should be 64 megabyte. Any lower than that, your frame buffer isnt technically big enough to hold a full finished frame. Maybe it could interleave or something on lower amounts of ram or rely on persistence of vision tricks.

As for a definite answer, there really isn’t a perfect amount of ram because applications use ram in different ways. I guess you could experiment given a known gpu (based on max theoretical compute power) and fixed resolution, where the gpu isn’t fast enough to utilize any more ram. But then for all but the most demanding applications, there’s gonna be a bunch of ram sitting unused.


I think that with FydeOS or purpose built distros you can get better results, if you’re not already using one of those two options. FydeOS in particular can do 720p60 and 1080p30 pretty well.

That’s just to say that optimization will do more than upping video RAM further.
I don’t think it will do much more to up it further (384MB or 512MB) because the GPU is not that powerful and optimization is not there. But I always thought about Pis as tinkering platforms so just try it and see if you get better results.

With caution I also think that overclocking could net you some good improvements. I never overclocked the GPU on my Pi but the CPU has been running fine at 2Ghz overvolt 3 for a couple years. Some youtubers like Leepsp have some nice guides on SAFE overclocking.

Overall I’d say that a Raspberry Pi is much more designed to run headless and the GPU is almost an afterthought.

1 Like

Huh, I know there is overclocking for the CPU, but never considered carving more of it’s ram out for video use.
Very interesting!
I have a pi I occasionally use as a media browser, and am a little disappointed in it’s performance, but this has real potential. So will be trying this out tonight.

Thanks again!

1 Like

Yeah, I have it up to 2.147GHz (reports on neofetch as 2.200), over voltage of 6, GPU freq 750, RAM at 256 as already stated and CPU Temp stays between 40-60C in a NES4Pi case with a fan on 5V and small aluminum heatsinks on 4 chip components.

Prior to the RAM boost it felt harder to notice because of my use case (mostly video streaming). Which is why I thought I’d tap into the tinkering crowd here. I do appreciate some of the guidance already provided and glad my conversation brought it to the attention of others already.

– I’ll have to go looking for Fyde OS I’m thinking I missed that one as an option and was sticking with the Raspberry pi OS since a lot of its issues have been documented with work arounds etc - I have watched some of leeps more recent videos - that is where I found the tracker that I posted here on my previous forum post


thats a pretty spicy OC considering the base is 1.5ghz.

I feel like a Pi 4 could easily be a decent daily driver for a general surfing/office work machine.

My only gripe is even with high end microsd cards, all of the raspberry pi’s suffer from glacial “disk” IO to/from the microsd, even when compared to spinning rust on old core 2 duo systems.

the 8gb pi 4 with a decent ram caching setup or a usb3 attached SSD would probably be perfect.

1 Like

Yeah, been watching it work, but may pull it back some and see how things flow since I have so many options to tweak now that I’d not really done previously. I ran it through a pair of longer news episodes on YT in the default Chromium browser at those settings and never broke 60C mostly hanging out in the 50s then immediately cooling back down to 40 once browser was closed.

In the end, I was just happy my pi was totally fine with all of the tweaks on at once.

You got it figured out, nice! I didn’t know it when I replied to the thread so I hope I didn’t sound condescending in any way :sweat_smile:

Absolutely, we’re here to tinker so this is a very appealing thread!
I’m gonna summon @Biky that’s been messing with SBCs for quite a while and hopefully they got much more details for you.

It’s basically Chrome OS reworked to be installed on other devices. They got something of their own baked in, but it shouldn’t be anything malicious or spying. Let us know how it works for you!

I used to run the Pi 4 on a 4K TV with just the default 256MB and it was fine. I was playing local video in mpv and it was fine. On youtube I was dropping frames even at 720p because neither the CPU or GPU could keep up with the insane computing that is happening in a browser to show content in “real time” (using this terminology loosely). In other video streaming platforms, it was fine after the content buffered a little.

I’m still running the Pi 4 8GB as my daily driver for anyone interested, with a USB m.2 SSD attached where the root partition resides on. If you don’t want to deal with that, you could try Alpine and keep it minimal, as the rootfs is mounted in RAM when the Pi starts up, but keeping your installation under 2 GB might be hard if you plan on using GUI programs, so an 8 GB model is a must. Without a GUI, Alpine runs on peanuts.

One thing to note, on my setup, at some point after either a sway or mesa update, I had to enable dtoverlay=vc4-kms,cma-256. I could not get sway to work with anything else. I believe by default the Pi allocates only 128 to heap. So I got that setting and the gpu_mem=512 in config.txt. I don’t really know what those settings do, but it took me 2 or 3 days to get sway to launch again and only those settings worked.

Edit: I know what gpu_mem does, I meant I don’t know what the heap memory allocation does and how it works and how is that any different than gpu memory - especially because both of them are allocated from the system RAM.


I didn’t feel any condescension sent my way and

I appreciate the tag in for even more people on the thread here.

I did find Fyde OS and some people worried about it being targeted for a China release or subscription fees and various other oddities like that to the point that most of the larger techtubers I watch seem intimidated to talk about much more than the performance. Might give it a shot with an alt Gmail or something first and see if I like it still but not in a rush to do so.

Latest Buster release it seems that is the default, I had to update it slightly to work on the 1080p to dtoverlay=vc4-fkms,cma-256

I’ve not made the splurge to pick up a m.2 SSD + (EDIT: larger) enclosure for the pi I still have a gaming rig for heavier stuff so this is an enthusiast effort to see how good I can get it to go and to make a spare TV not so dumb :smile:


I would say to give Alpine Linux a go. With something like JWM, Xorg or sway and kodi and firefox, you would only use like 1.5GB of storage, thus about 1.5GB of your RAM, with 2.5GB left to your programs. When I tested Linux on a 2GB x86 tablet, firefox was crashing, at least with my insanely bloated profile with 100s of tabs on standby (not technically open / loaded, just “there”). Running your OS from RAM is definitely a great experience, just that the boot process might take a little, as the install has to extract the rootfs from a tar.gz archive into RAM.

You could emulate that with other distros, it’s called a “frugal install,” Alpine calls it diskless (and it’s default on the rpi image), but alpine makes it easy. I enjoy Alpine on my Pi 3, which only runs on a microSD card and given that it runs from RAM, it extends the longevity of the SD, which is what I’m after. But it is a headless router and I barely interact with it, it’s just doing its purpose and that’s about it.

1 Like

I’ve been really happy with the Argon One M.2 eclosure. It doesn’t really uses the full potential of the SATA M.2 SSD you put in, but it’s a nice overall package that suits every ambient. I don’t know how it’s gonna do with the big overclock you applied but, for me, it’s keeping the device at around 45°C with the 2GHz ov. 3. The fan in it is not that great and I’d say is there for emergency cooling only.

A case I would try aswell is the DeSalvo passive case. All billet alluminium so really expensive for what it is. But it can handle any overclock without needing active cooling at all. That one + external NVME M.2 eclosure and you’re set!

About external drives: make sure the eclosure you buy supports TRIM.