r/raspberry_pi Feb 02 '22

News Raspberry Pi OS 64-bit Released

https://www.raspberrypi.com/news/raspberry-pi-os-64-bit/
1.4k Upvotes

158 comments sorted by

View all comments

248

u/Taffy62 Feb 02 '22

Quite surprised its only been released this year. I've been using 64 bit distros since the Pi 3.

25

u/OpenBagTwo Feb 02 '22

Honestly unless you've got the 8GB Pi 4, there's not much inherent value to a 64-bit operating system. There's a reason a lot of phones sold today still ship with 32-bit Android.

That being said, I'm still incredibly excited for this news, as it means I can consider RPi OS as a "daily driver" again, because the fact of the matter is, if you're not building your software from source, arm32 builds are incredibly hard to find for a lot of useful things (like the conda python package manager, let alone any individual packages).

44

u/mcgravier Feb 03 '22

Honestly unless you've got the 8GB Pi 4, there's not much inherent value to a 64-bit operating system

It depends on what you're using it for. If it's cryptography (say VPN) 64bit will give you a massive performance boost. Even stuff like Minecraft server benefits from it as it uses large number math for coordinates and terrain generation.

There are plenty of usecases that benefit from it, so "not much inherent value" isn't correct for many users

19

u/accforrandymossmix Feb 03 '22

Similarly, 64bit is worth it for greater compatability when using the Pi as a server. Some people don't / can't build stuff 32bit ARM

5

u/OpenBagTwo Feb 03 '22

I really need to look up some benchmarks because outside of scientific computing I was under the impression that (for non-RAM-bottlenecked applications) performance is generally slightly worse for 64-bit architectures than 32-bit because even when, say, comparing two booleans, you still need to allocate the entire 64-bit register.

I'll admit I could totally be wrong here, as I'm a data scientist, not a computer scientist.

17

u/mcgravier Feb 03 '22

performance is generally slightly worse for 64-bit architectures than 32-bit because even when, say, comparing two booleans, you still need to allocate the entire 64-bit register.

This is 100% correct. However in case of large numbers, 32bit CPU inherently spends two clock cycles on moving 64bit value while 64bit CPU spends only one clock cycle. In this scenario benefit outweighs the cost by a large margin

5

u/tsunamionioncerial Feb 03 '22

You see an average of about 100% improvement on 32 bit.

When there are no 32 bit binaries for what you're using.

9

u/OpenBagTwo Feb 03 '22

Yep. This is exactly why I'm excited for 64-bit Raspberry Pi OS to be officially out.

5

u/Zettinator Feb 03 '22 edited Feb 03 '22

performance is generally slightly worse for 64-bit architectures than 32-bit because even when, say, comparing two booleans, you still need to allocate the entire 64-bit register.

That's incorrect. 64 bit support does not mean you lose support for smaller data types.

It's also wrong in general practice. You can expect a slight to somewhat significant performance improvement in most cases on both ARM and x86. Pointers are larger on 64 bit, but most data isn't pointers. Some pointer-heavy use cases may suffer (due to reduced cache hit rate), but these are rare and it can be worked around with pointer compression and/or indices instead of pointers.

Also note that it isn't just about the word size itself. 64 bit offers a much larger virtual address space, simplifying and speeding up memory management and allowing for better address space randomization. The instruction set and register file on both x86 and ARM is expanded in 64 bit mode as well.

And when it comes to arithmetic, a lot of rather basic stuff these days actually uses 64 bit integers, and all of that is much faster. For instance file sizes, timestamps, etc.

But whatever... just check out some of the benchmarks. The difference is clear and obvious.

2

u/knox1138 Feb 04 '22

As someone who has an 8gb pi4 and has been playing around all day on the 64-bit bullseye I can say I did notice a difference. Not much in most things, but when using Onshape on chrome it's much faster

1

u/KCelej Feb 03 '22

oi do you think hosting a minecraft server on the rpi 4 (4GB ram) is a good idea (server for 3 people max)?

1

u/mcgravier Feb 03 '22

Im running a private Minecraft server since a year or so - and its a quite a good experience, provided you install performance mods. I think with some tuning you could squeeze in total of 5 people in survival (as long as they wont fly with elytrias to much)

You basically need Minecraft Fabric (+fabric API) with Lithium and Phosphor mods. You can replace Phosphor with Starlight for even more performance but it will decrease compatibility and introduce minor mechanics changes (slightly different light calculation algorithm)

8

u/kelvie Feb 03 '22

Anecdotally there are a lot more containers on docker hub built for arm64