Raspberry Pi 4 2GB or 4GB?
Gavin Smith (1413) 95 posts |
The Raspberry Pi 4 2GB model was recently re-priced to about £35. The 4GB model is still £55. I’m going to buy a Pi 4 this week to start testing RISC OS on and I’m just wondering if anyone thinks it worth buying the 4GB model. I haven’t tried OWB or Iris, which I assume could be memory hogs (as web browsers often are) so maybe the 4GB model would be worth it for those. Any opinions? |
Stuart Painting (5389) 714 posts |
If someone really is writing a browser that routinely needs more than 1GB of RAM, that’s going to restrict the user base a lot, given that the vast majority of RISC OS machines have 1GB RAM (or less). My personal view (and my rationale for purchasing a 2GB Pi 4) is that the extra memory in a 4GB machine is likely to go to waste in the short term. Wanting to run 3 or 4 memory-hungry applications at the same time is not a workmix I’m expecting to use on RISC OS any time soon. Of course, “never say never” and at the end of the day we’re arguing over £20, so the decision is yours to make. |
Gavin Smith (1413) 95 posts |
Well, yes, even 2GB is huge in general RISC OS terms. And yes, it’s only a 20 quid difference. I was just thinking that Iris, which uses WebKit, might necessarily be a memory hog and might appreciate the extra. I can’t think of any other app that would use that much memory. If Mr Rawnsley is reading, can he comment on Iris memory usage? Would it benefit from the extra memory? |
Alan Adams (2486) 1149 posts |
Can RISC OS software address 4GB correctly? Numbers > 2GB might be treated as negative by poorly written code, so some apps might be in trouble. |
Jeffrey Lee (213) 6048 posts |
Some software has trouble (e.g. old versions of SparkFS), but I believe most works OK. I posted a list of APIs here which clamp the reported amount of memory to just under 2GB, and the replacement APIs to use if you want the full value. In anticipation of machines with >4GB of RAM I’ve been working on long descriptor page table support – the new APIs are designed to cope with that. Since most apps don’t use that much memory, it’ll be interesting to see if we can find worthwhile uses for all the spare RAM, like improved filesystem caching. |
Alan Adams (2486) 1149 posts |
Interesting. I would assume that going beyond 4GB needs a 64-bit CPU – or am I assuming too much? |
Steffen Huber (91) 1953 posts |
As long as the MMU can make the memory appear at the below-4-GiB-logical-address place, there shouldn’t be a problem. |
Jeffrey Lee (213) 6048 posts |
A 64bit CPU isn’t needed. Programs use a 32bit logical address space, which the MMU maps to a larger physical address space (up to 40 bit – enough for 1TB of RAM). |
Alan Adams (2486) 1149 posts |
Yes I see. So any program is going to be limited to 4GB of memory, but multiple programs can use such memory spaces. That ought to be enough. |
Andrew Rawnsley (492) 1445 posts |
Iris should run on 1GB systems, and 2GB should be fine. I’ve not seen it exceed about 1 GB of total RAM used (app, dynamic areas and shared libraries), even with multiple tabs etc. The recommended spec is a 2GB i.MX6 (ARMX6 or mini.m) or Titanium, because of the SATA which will help with load times. With longer load times, it should be fine on ARMbo(o)k, Pi3, and I’d expect Pandaboard too, followed by Pi2. Pi1 and Beagleboard are likely below minimum spec (certainly Pi1, which lacks some of the VFP/NEON stuff). Beagle only had 512MB I think, which may be a problem. As for Pi4, I’d personally go for the 2GB version as it is likely to be less “experimental” in terms of software compatibility, although I say this with no knowledge of how much of a silver bullet Jeffrey’s changes will be. Based on past experience, I know to never underestimate Jeffrey! |
Andrew Rawnsley (492) 1445 posts |
I’d also like to query Stuart P’s assertion that the vast majority of RISC OS users don’t have 1GB of RAM. The only way that’s true is if you include the retro scene or VirtualRPC (both significant markets). Iris isn’t intended for either – it can’t possibly run on retro systems, and VirtualAcorn users have access to windows/mac/linux-based browsers. As such, Iris’ target market is ARM-based computers running RISC OS 5. Bearing in mind Pi2 has 1GB of RAM, the only machines that have less would be Iyonix, Pi1 and Beagleboard. I very much doubt if any of those has a substantial remaining userbase in RISC OS land, when a Pi2/3 can be had for less than a meal out. Note, I’m assuming Pi-Zero units are sold for very specific uses, and not including those here, as I have no data on how they are used. |
Stuart Painting (5389) 714 posts |
That was not what I said. I stated that the vast majority of machines would have 1GB or less. I readily accept that a numerical majority would actually have 1GB fitted. |
Andrew Rawnsley (492) 1445 posts |
My apologies Stuart, I did misread. As far as 1GB goes, it depends how large the silent mass of Pi owners are (who want to run Iris). I don’t really have a handle on that. Iris has been tested on Pi3 though, so that should be OK, but I suspect running from RAM disc wouldn’t be too sensible (the software will use a majority of the 1GB). Note that Pi2/3 support is important for RISC OS Direct initiative. I think you’d be surprised, however, at just how many people have access to 2GB machines who would be interested in Iris. There’s a reason for that recommended spec. That being said, by the time Iris launches generally, I expect (hope?) even the Pi audience will have moved to 2GB systems (Pi4) given the dramatic improvements offered by that platform. |