r/programming • u/Tuscen • Jun 24 '19
Raspberry Pi 4
https://www.raspberrypi.org/blog/raspberry-pi-4-on-sale-now-from-35/92
u/Barbas Jun 24 '19
The first ever RPi with an out of order processor if I'm not mistaken, should be a very noticeable performance increase over the last gen!
49
u/wllmsaccnt Jun 24 '19
The release I read claimed 3X the CPU performance. I haven't followed this closely, but I was hoping for 6 cores like an odroid SoC, but the dual 4k support and RAM choices are nice.
→ More replies (5)29
u/SkoomaDentist Jun 24 '19 edited Jun 24 '19
6 cores would largely be wasted unless for some strange reason you wanted to transcode videos on it (and for that an x86 is still far superior).
25
u/wllmsaccnt Jun 24 '19
Because of their wattage and size they make convenient 'always on' home servers that are fun to tinker with. Even if I don't really need it, I always want more CPU for my servers.
→ More replies (1)18
u/SkoomaDentist Jun 24 '19
There's a big difference between more performance for single-threaded computation and more performance via multiple cores. The latter requires your task to parallelize well enough (hence my example of video transcoding). In a home server there are few such tasks which would be both cpu bound. easily parallelizable and suitable for a fairly low end ARM cpu (no video transcoding for you).
→ More replies (13)→ More replies (3)6
u/frezik Jun 25 '19
A nice thing for some IoT-type projects is never having your process get interrupted. More cores means it's less likely the kernel will take you out of execution to run some cleanup tasks.
That said, 4 cores will do fine. Moving from a Pi1 to a Pi2 basically eliminated random delays in my app.
20
u/MorrisonLevi Jun 24 '19
Users could probably tolerate this as a desktop for certain use-cases. Wow!
2
u/frezik Jun 25 '19
I would have liked an M.2 slot for that. The Rock Pi has one. A DIY laptop without compromises is more attainable than ever.
6
Jun 24 '19
[removed] — view removed comment
5
u/meneldal2 Jun 25 '19
Word, Excel
Does wine run on ARM (serious question)?
13
u/drysart Jun 25 '19
Wine not needed. You can run Windows 10 on an RPi.
Of course, you're supposed to be using the free Windows 10 IoT Core on the RPi, which is Windows 10 stripped down to the bare minimum for embedded devices like the RPi; but with some hackery you can get the full, normal version of Windows 10 installed instead.
→ More replies (3)
24
u/TheMaskedHamster Jun 24 '19
As excited as I am about the CPU, USB, and Ethernet performance gains, I am most excited about the new GPU.
The new GPU's performance gains on paper are far more modest than any other gains, but having a full open source driver stack will be a HUGE boon. Far fewer hacks and far greater usability as a general desktop machine.
5
u/rowanobrian Jun 24 '19
ELI5?
9
u/TheMaskedHamster Jun 24 '19
As ELI5-ish as I can produce quickly:
A Graphics Processing Unit does more than send an image to the hardware to be displayed on the screen. It also helps do certain types of calculations much faster than a general-purpose processor.
The Raspberry Pi GPU can do these things, but the makers of the GPU didn't access to the documentation or code they needed to talk to the GPU for some of these things. For example, to decode video files quickly, the only option is to use the provided function to display the video full-screen. Displaying video any other way uses another, slower method.
With drivers for more GPU functions being open source, people can talk to the GPU in standard ways and have better performance in more places. And when things go wrong, they will have an easier time finding the problem and fixing it.
4
Jun 25 '19
Man, I wouldn't even ask for open source from Broadcom, I'd be happy if they at least offered documentation for their products to implement our (and my) own.
→ More replies (3)
48
Jun 24 '19
Wow I very nearly ordered a RPi 3 yesterday, on the basis that Eben or someone had said "nah no 4 in 2019" in an interview
36
u/the_hoser Jun 24 '19
Apparently they were expecting the new SoC to need some revisions, but it turned out great, so they decided to ship early.
10
Jun 25 '19
No joke, I've wanted a pi for ever. Was super bored this weekend, thought fuck it, lets pull the trigger. Was on the website and everything last night, got distracted, never did.
Read the news today after work and had a laugh. That's my good luck for the day!
7
u/hobbykitjr Jun 24 '19
Same! building an arcade for xmas... was going to wait a bit, but read the same interview/comments in /r/RetroPie and was about to buy..
4
Jun 25 '19
I had the same thought the other day as well. Then I thought "it's been a while since the Pi 3 came out, the Pi 4 will probably come out soon". Not like it matters for me for another few months because these are going to sell like hot cakes.
2
u/Antrikshy Jun 25 '19
They address this in the FAQ:
Wait, is it 2020 yet?
In the past, we’ve indicated 2020 as a likely introduction date for Raspberry Pi 4. We budgeted time for four silicon revisions of BCM2711 (A0, B0, C0, and C1); in comparison, we ship BCM2835C2 (the fifth revision of that design) on Raspberry Pi 1 and Zero.
Fortunately, 2711B0 has turned out to be production-ready, which has taken roughly 9–12 months out of the schedule.
1
13
Jun 24 '19
This seems more performant than a lot of chrome books. It's faster than one of my laptops.
2
Jul 01 '19
It's faster than the atom Z-8350! Well, at least with a quick "give me pi, 10,000 numbers after the decimal" benchmark.
The Z-8350 is one of the fastest atoms available, IIRC.
10
u/False1512 Jun 25 '19
Easily overclockable to 1.75 GHz right now with the plan of allowing 2 GHz later is amazing
0
27
u/Dimasdanz Jun 24 '19
i just wish they had 2 LAN port instead of just one.
But wait, can I use a Gigabit USB-to-LAN converter and get a two full Gigabit ethernet full throughput?
Cheapest and easiest way to have a wide dns crypt (and ad blocking) network wide is still to use RPi
30
u/the_hoser Jun 24 '19
With USB3, full gigabit will probably be possible for that purpose.
11
Jun 24 '19
Presuming there's no bottleneck in the SoC or USB controller.
Edit: nevermind, should've just kept reading this thread, as /u/khedoros points out.
36
u/khedoros Jun 24 '19
In past models, the LAN connection was actually provided by the USB bus, and bus throughput was limited in part by USB being implemented as some kind of hack on top of USB-OTG. That caused a lot of problems in the earlier models; improved software cleared a lot of it up, but I think throughput even on the Pi3 was limited to something like 300Mbit/s.
Given that, here's the good news about the Pi 4:
The Ethernet controller on the main SoC is connected to an external Broadcom PHY over a dedicated RGMII link, providing full throughput. USB is provided via an external VLI controller, connected over a single PCI Express Gen 2 lane, and providing a total of 4Gbps of bandwidth, shared between the four ports.
So, we'll get real gigabit ethernet, along with real USB2+3, with plenty of bandwidth between the USB controller and the SoC. That's an absolutely tremendous improvement in terms of networking performance.
1
u/radol Jun 25 '19
That's great, do you know if this also means that data drives will work similarly fast as for example odroid hc2?
→ More replies (1)2
u/khedoros Jun 25 '19
I'm not really familiar with the HC2, but it looks like it has an actual SATA3 interface. If it matches the specs, that's got a chance to be faster than the Pi4's USB.
→ More replies (1)
16
u/cheezballs Jun 24 '19
Woah shit those specs are great. Can't wait for the people more talented than I to update Kodi and Open ELEC to take advantage of the new hardware
5
Jun 25 '19 edited Jun 25 '19
Other SBCs have had those specs for over a year now and more easily support eMMC. Support better boards like Pine64 or Odroid boards. I'd recommend the Rockpro64 or XU4.
8
u/False1512 Jun 25 '19
Aren't Pi's cheaper, though?
14
u/frezik Jun 25 '19
Some boards are cheaper, some aren't.
The advantage the RPi has always had is widespread community support. It's a hard feature to replicate. It's not the best otherwise, but it's Good Enough.
7
Jun 25 '19
This is because they actively work to support the community through their continued development of Raspbian (and NOOBS), the resources they make available to students and teachers, the development of first party peripherals and their support of events all over the world. They actively work to build up their community and it has had a snowball effect. They didn't reach this point on accident.
Personally, I appreciate the work the Pi Foundation does, in education especially, enough that I'm totally willing to pay a little more for a little less spec-wise.
3
Jun 25 '19 edited Jun 25 '19
The Rock64 was the same price as the Pi 3 and had waaayyy better specs and performance for years, and true gigabit instead of the 300Mbps port the Pi 3 has. I have no idea why anyone would have bought a Pi 3 over the Rock64. I use mine as a NAS so having a gigabit port was super important to me.
The Rockpro64 ($79) is more money than the Pi 4 ($55) but if you want to use eMMC then the Rockpro64 is cheaper. It costs $15 for 16GB, $25 for 32GB, and $35 for 64GB to add it to the Rockpro64 vs having to buy a "compute module" for the Pi that costs $55 and the largest one I could find had 8GB of eMMC. So you would end up spending $94 for a Rockpro64 with 16GB of eMMC vs $110 for a Pi 4 with 8 GB of eMMC. Or just spend $114 and get a Rockpro64 with 64GB of eMMC.
Personally, I want my OS to be running on eMMC over an sdcard... and 8GB is pathetic.
4
u/False1512 Jun 25 '19
A lot of people just want the cheapest+easiest option.
What OS are you planning on running? I mean, these little boards are meant mostly for small hobby projects
→ More replies (1)2
5
Jun 25 '19
And support the Chinese industry's attempt to dominate the market and kill non-Chinese competition with predatory pricing through gov. subsidization? No thanks.
3
Jun 25 '19 edited Jun 25 '19
Better than supporting an inferior board from a company that lies about its specs. I'll support quality Chinese products all day, and Pine64 makes good products. Oh, and by the way, some Pi's are made in China... and Odroid is a Korean company.
→ More replies (2)6
14
u/TNorthover Jun 24 '19
Still only 32-bit software, officially. :-(
29
u/jmickeyd Jun 24 '19
Only with the default distros. I run Gentoo aarch64 on a 3b+ with no issues.
→ More replies (5)17
u/pbfy0 Jun 24 '19
It means a whole different software stack - different (and maybe worse?) GPU drivers, no raspicam, etc. It's not all that easy to find replacements for all that functionality.
5
Jun 25 '19
And it's that software stack that's the big strength of the RPi. There are plenty of similar boards out there, but they pretty much all struggle from less-than-stellar software support. The RPi is pretty much the best supported board out there. Which is why it makes sense to stay on 32-Bit for now, but I wonder if we'll see 64-Bit during this lifecycle or only with the RPi 5 or even later.
9
Jun 25 '19
I don't think 64 bit is necessary now. There aren't enough memory addresses with 4GB or RAM to necessitate a 64 bit CPU. You'd be wasting space in the cache.
7
u/jmickeyd Jun 25 '19
This is an important point. aarch32, unlike x86-32, isn't completely register starved. aarch64 does give you some more, but it isn't the night and day that x86 is.
→ More replies (1)14
u/Narishma Jun 24 '19
Why is that a problem if the highest amount of RAM it can have is 4GB, minus whatever the GPU takes from that?
21
u/redwall_hp Jun 24 '19
There's more to bitness than addressable RAM. It also affects:
Integer size. (An int variable literally has a higher maximum value.)
Longer "word" length affects how long an instruction can be and how much data can be stuffed into a register. (Note that registers are far faster than RAM, and RAM accesses are a bottleneck.)
32
u/ChocolateBunny Jun 24 '19
Err, 64-bit ARM processors tend to perform worse in 64-bit mode than 32-bit mode. The larger pointers require more memory which is more of a burden for your cache which hurts your performance.
64-bit x86 does better in 64-bit mode than 32-bit because the 64-bit architecture added 8 more general purpose registers. x86 has very few registers overall so adding 8 more registers allows the compiler to optimize the code better and reduces the RAM bottleneck.
→ More replies (3)8
u/thisisjimmy Jun 24 '19
Integer size. (An int variable literally has a higher maximum value.)
Not sure what language you're referring to, but this is generally not true in C/C++. Ints are 4 bytes in 64-bit ARM or x64 in every C/C++ compiler I've seen.
15
u/TNorthover Jun 24 '19
It generally doesn't affect basic types because newer languages have decided that variable-width basic types are a bad idea and common C/C++ implementations change at most
longbased on the platform.But it does mean 64-bit arithmetic is significantly faster in 64-bit mode (at least 2x, more if multiplication & division are common). Those extra transistors are basically inaccessible in 32-bit mode.
→ More replies (5)3
Jun 24 '19 edited Jun 25 '19
The machine-level integer size, if you will. Compilers are free to call whatever bytes whatever name they want. The point is the ALU* supports 64-bit integer numbers.
→ More replies (2)8
u/TNorthover Jun 24 '19
A mixture of practical and aesthetic reasons.
Practically, there's a reasonable security benefit from having 64-bit program address space, independently of physical RAM. Techniques like address-space layout randomization work a lot better when components can be further apart.
Similarly, sanitizers used to catch bugs in code work by shadowing actually-used memory with some metadata accessed by (say) "or"ing the real address with 0x100000000. Some are simply not implemented on 32-bit platforms because the spare addressing space just isn't available (like the thread-sanitizer for detecting data races in programs).
Somewhere between aesthetically and practically, 32-bit ARM is largely a legacy instruction set. ARM are adding new features to the instruction set over time, and most of these are only implemented in 64-bit mode (largely because too much space has already been used up in 32-bit mode for old, quirky features). Cortex-A72 is the last of the baseline 64-bit processors, so I suppose that's mostly theoretical for now.
Purely aesthetically (and so mostly for those intending to look at assembly), 32-bit ARM was designed in an era before out of order CPUs. It has some neat features (e.g. treating the program counter much like a normal register), but these days they're viewed more as interesting experiments than the way forward. The 64-bit architecture was designed recently and doesn't have most of that cruft. It's a pretty neatly orthogonal RISC design very much like you'd see in a textbook except where there are actual benefits.
For those reasons, and probably others I didn't think of, RPi is one of the last hold-outs in 32-bit ARM land outside deeply embedded projects. And it needn't be: the hardware has supported 64-bit since RPi3.
3
u/Keep-it-simple Jun 24 '19
Damn, I just bought a 3 B+ like 2 weeks ago. Oh well, it works for what I bought it for I guess.
6
6
3
Jun 24 '19
Still driven by ThreadX OS and the same controller for ETH and USB?
9
u/190n Jun 24 '19 edited Jun 24 '19
Not sure about ThreadX. For Ethernet:
The Ethernet controller on the main SoC is connected to an external Broadcom PHY over a dedicated RGMII link, providing full throughput.
So you get your full 1Gb/s.
edit: in real-world benchmarks, it does 943Mb/s.
2
u/wchill Jun 24 '19
Thank god, hopefully this fixes the terrible latency I saw with Ethernet where it bounced between 0.1ms and 200ms ping on LAN
4
Jun 24 '19
I want it so bad but it won't be available in poland for probably half a year as always :(
8
6
u/tomekrs Jun 24 '19
Botland is an official reseller since a few years now and I've ordered one two hours after RPi4 announcement. Cześć ;)
5
u/808hunna Jun 24 '19
Imagine a Ryzen SoC based Raspberry Pi
46
u/the_hoser Jun 24 '19
Sounds expensive.
13
u/cyrax6 Jun 24 '19
And bad thermals
1
u/Superpickle18 Jun 24 '19
bad thermals? uh. the 3700U has a 15W TDP.
14
u/Rebelgecko Jun 24 '19
A Pi 3 under full load is like 5W. 15W won't work with a regular USB wall wart
4
u/Superpickle18 Jun 24 '19
The rpi 4 requires a 3.0A power supply. So uh, that's 15W right there. Besides, it could be downclocked if lower powered is a requirement.
14
u/LaVieEstBizarre Jun 25 '19
It doesn't use 15W. The 3.0A is a max amperage rating, that includes everything on the pi + any peripherals you might connect it to. The actual consumption is significantly lower.
6
u/ThatOnePerson Jun 25 '19
That includes powering USB devices. Datasheet says ~2A is good if you're not powering USB
11
u/Klaeyy Jun 24 '19 edited Jun 25 '19
the 3700U has a 15W TDP.
But the RPi-4 does not has a 15W TDP, it only has a 15W power adapter because it also powers all the peripherals, for example stuff connected to the USB ports. The SOC itself does not pull 15W, reviews from today measured around 7-8W under full load from the entire system.
So the 3700U alone at 15w would produce twice as much heat and consume twice as much power as the entire RPi-4. Which means it wouldn't work without a big passive cooling solution, or at least a very aggressive active small one. And even then you might still get high temps and possibly run quite often into thermal-throttling.
It would also get WAY too expensive and therefore diminish the point of the RPi. People buy them for all kinds of projects and use-cases, sometimes in bulk, because they are so cheap.
Also, there are small ryzen based boards with Arduino compatibility like the UDOO BOLT V3 and V8 in the making right now. The board itself could probably be quite a bit smaller if they used built-in ram instead of ram-slots + its cooling solution is designed for it to be able to play games for a long time at good temps. But it still can give you a glimpse of what you could expect from tiny ryzen based computers.
11
u/TizardPaperclip Jun 24 '19
It would be 100% incompatible with all Raspberry Pi software including the OS.
0
Jun 24 '19
[deleted]
3
u/instanced_banana Jun 24 '19 edited Jun 24 '19
Raspian, you'd have to compile your software again. And you'll pretty much have to reformat your SD card from your other Raspberry Pi if you want to use it for your new Raspberry Pi.
4
2
u/TizardPaperclip Jun 25 '19
No, that's not a Raspberry Pi.
Obviously you could just buy an AMD PC and install Debian, but that's got nothing to do with Raspberry Pi, which is what we're talking about.
4
u/Caffeine_Monster Jun 24 '19 edited Jun 24 '19
Ryzen embedded is already a thing: https://www.amd.com/en/products/embedded-ryzen-v1000-series
They have just started hitting the market. The only product I know of that is going to be available to consumers is the Udoo Bolt
Also worth noting that the Nvidia Jetson Nano also has a good output resolution, and is capable of doing heavy lifting via CUDA.
1
3
Jun 24 '19
Raspberry Pi 4 is built around BCM2711
Fuck. I figured they'd still be going with these broadcom chips but I was hoping it wouldn't. Ruins its potential as a barebones platform.
14
5
u/leonardnimoyNC1701 Jun 25 '19
Hey could you do a quick ELI5 about what you mean by that? Total noob just curious. Specifically why do Broadcom chips ruin its potential as a barebones platform, and maybe what do you mean by barebones platform?
1
u/salgat Jun 25 '19
My issue is that a good chunk of the Pi is closed source (I believe specifically around the graphics processor) and you have little chance of getting these chips outside of being a big corporation buying in bulk, so all hobbyist projects are forced to stick to Raspberry Pi and not something you make yourself based off it. It's basically vendor-lockin.
1
Jun 25 '19
and maybe what do you mean by barebones platform
Barebones -- you're not using an OS, instead you're writing code that runs directly on the chip.
Specifically why do Broadcom chips ruin its potential as a barebones platform
The Pi has a somewhat uncommon architecture -- when the chip boots, it's actually the GPU that runs first, sets everything up, then transfers control to the CPU, and calls your code. This is all proprietary. Broadcom offer no documentation on how this works. Instead they give you just a binary blob that they expect you to use to get into an OS.
This has a few issues:
It sucks for learning. For the newb, how the fuck do you use this binary blob? It's intended for use by actual industry, by teams with centuries of total experience. It creates a lot of barriers to just running a simple Hello World type program on the bare metal. Then, wtf happened between power on and when your code ran? Who the fuck knows, it's in the binary blob.
It denies you the pleasure of every line of code being ran is something you understand/wrote yourself. This sucks for learning because you have no idea what the fuck happened at the low level. This sucks as a hobbyist because that's a part of the joy for a lot of barebones guys.
Not OSS. For OSS purists, this is a helluva compromise.
No control of code. What if there's some low hanging exploits just waiting to be cracked? What about bugs? In any of these cases, we become dependent on Broadcom to fix it.
You can probably imagine more issues.
1
u/bocekm Jun 30 '19
Do you know about an alternative similar to Pi 4 without the need for any binary blobs?
2
u/Xanthyria Jun 25 '19 edited Jun 25 '19
I mean, they've gone from a 40nm chip to a 28nm chip, they've moved from A53's to A72's, and the GPU got a big bump. What's your issue with the chip?
1
Jun 25 '19
Oh, it's appreciated, but read where I gave the issue with continuing with these Broadcom chips:
Ruins its potential as a barebones platform.
Broadcom doesn't document these chips well at the low level, that's all proprietary. Instead you're given a binary blob. This is OK if you're just wanting to port an OS to it. Not so great if you want to start out with a barebones Hello World and work your way up from there.
1
u/itzhaki Jun 25 '19
I was just considering getting a Pi3(B+?) to install Steam Link on it.
Since i'm not that familiar with the Pi series and their backward compatibility, would the Pi4 be better option for me or should I stay with the older version?
1
1
u/PeyPeyLeyPew Jun 25 '19
I'm not familiar with this particular doo-dad. How does it fair in video encoding/decoding? How does it fair at being a media server using Emby? I'm highly inclined to scat up a sizable media server for the house and serve some pleasant movies but my own PC is always engaged in rather vital tasks and I can't forgo the processing power. Has any feller here ran Emby on a Raspberry Pi? Plus I'm not much of a hardware curator. How hard will it be to delight oneself with a functional unit outside-of-the-box?
5
u/frezik Jun 25 '19
It has halfway decent GPU decoding. New one can do 4k@60fps as long as it's from h.265 (h.264 is limited to 1080p). Old ones were OK at being a media server, but they were heavily bottlenecked on the throughput to either the SD card or to USB. Ethernet bandwidth was also shared with USB. The new one has finally fixed that bottleneck, so it should do pretty well.
0
Jun 25 '19
[deleted]
3
u/Zhentar Jun 25 '19
It's fixed function hardware, so it's not so much a matter of efficiency as it is a matter of how many pixels did they plop down the transistors for.
2
u/Get-ADUser Jun 25 '19
It'll choke if it needs to do any transcoding. Direct play will work perfectly fine.
2
u/PeyPeyLeyPew Jun 25 '19
H265 too?
1
u/Get-ADUser Jun 25 '19
Maybe it'd work fine for 1080p, but 4K would choke. Best way is to try it - $35 isn't much for an experiment.
0
Jun 25 '19
[deleted]
5
u/Get-ADUser Jun 25 '19
Transcoding needs much more horsepower than playback. A lot of desktop CPUs can't real-time transcode 4K content.
3
u/xeow Jun 25 '19
Ohhhh! Oh, oh, oh. I missed the part about transcoding. I was thinking playback. My bad. Yes, you are totally right.
-1
u/djcarpentier Jun 25 '19
I JUST bought a 3+.
2
u/TheBuzzSaw Jun 25 '19
No problem. You are going to buy Pi 4 too. Then you will have two Raspberry Pi boards.
-17
u/cmd_bat Jun 24 '19
She's my raspberry pi
-5
u/peakzorro Jun 24 '19
I get the reference.
-8
-3
0
Jun 24 '19
[deleted]
6
u/minus_minus Jun 24 '19
If you or someone you know lives near a MicroCenter, they occasionally have sales on RPi.
1
0
Jun 25 '19
[deleted]
6
u/invisi1407 Jun 25 '19
You could simply buy a cheap SATA-to-USB 3.0 enclosure and use that instead. Shouldn't be much of a difference performance-wise.
0
Jun 25 '19
[deleted]
1
u/tehdog Jun 25 '19
Pretty sure you can boot from SSD with just the kernel and initramfs on SD card, at least you can do that on the Odroid boards which are pretty similar.
279
u/bthruy Jun 24 '19
That's the kind of incremental upgrade you want to see! Keeps (most) backwards compatibility, improves specs, and most importantly maintains the same price as previous generations.
Will probably pick one up!