Peterborough Linux User Group (Canada) Forum

Linux & Android => Raspberry Pi & Single-Board Computers => Topic started by: fox on March 27, 2021, 01:58:13 PM

Title: Raspberry Pi OS: 32 bit vs 64 bit beta
Post by: fox on March 27, 2021, 01:58:13 PM
Good YouTube video here (https://www.youtube.com/watch?v=gmMEf9zvZ5Y) testing the speed of the two doing common operations.
Title: Re: Raspberry Pi OS: 32 bit vs 64 bit beta
Post by: Jason on March 28, 2021, 03:46:53 AM
I only watched the first half of the video but the results at least up to that point were as I suspect - a 64-bit OS isn't going to be intrinsically faster than a 32-bit OS. I think one of the reasons for that is that we don't normally just use the OS part of the platform isolated from running applications. A 64-bit OS can, if it has backwards compatibility, run 32-bit apps, too. So are the apps in the 64-bit version of Rasberry Pi OS also compiled for 64-bit? That matters although not as much as one would think (i.e. 64-bit isn't going to be double as fast no matter what).

But the other point I didn't see mentioned (but maybe it was later in the video) is that a 64-bit OS is going to use more RAM. In order to keep track of processes in RAM, you need a list of referenced addresses that use up a portion of that same RAM. A 64-bit OS is going to use 64-bit addressing. You can have more RAM because of this (over 4 GB) but the downside is that you need more of that RAM to manage the addresses (double what you needed for 32-bit addresses). So if your applications are already using too much RAM, then a 64-bit OS could end up being slower than its 32-bit cousin. Also, I believe that compiling applications for 64-bit means they will be bigger, too. But if it's not close to using that amount of RAM, the difference won't matter.
Title: Re: Raspberry Pi OS: 32 bit vs 64 bit beta
Post by: ssfc72 on March 28, 2021, 05:39:27 AM
Thanks Mike, for the Link to that RPi YouTube video.
Title: Re: Raspberry Pi OS: 32 bit vs 64 bit beta
Post by: fox on March 28, 2021, 11:00:14 AM
Quote from: Jason on March 28, 2021, 03:46:53 AM
....
But the other point I didn't see mentioned (but maybe it was later in the video) is that a 64-bit OS is going to use more RAM. In order to keep track of processes in RAM, you need a list of referenced addresses that use up a portion of that same RAM. A 64-bit OS is going to use 64-bit addressing. You can have more RAM because of this (over 4 GB) but the downside is that you need more of that RAM to manage the addresses (double what you needed for 32-bit addresses). So if your applications are already using too much RAM, then a 64-bit OS could end up being slower than its 32-bit cousin. Also, I believe that compiling applications for 64-bit means they will be bigger, too. But if it's not close to using that amount of RAM, the difference won't matter.

I don't recall anything in the video about keeping track of RAM use; it was focused on speed. One surprising thing was that at the beginning, the 32-bit OS booted up much faster than the 64-bit. But that seemed to be negated with a reboot, followed by a shutdown and a second boot. I don't understand those results; in particular why the 64-bit OS took so much longer to boot from a completely cold start.
Title: Re: Raspberry Pi OS: 32 bit vs 64 bit beta
Post by: Jason on March 28, 2021, 02:35:13 PM
Quote from: fox on March 28, 2021, 11:00:14 AM
I don't recall anything in the video about keeping track of RAM use; it was focused on speed. One surprising thing was that at the beginning, the 32-bit OS booted up much faster than the 64-bit. But that seemed to be negated with a reboot, followed by a shutdown and a second boot. I don't understand those results; in particular why the 64-bit OS took so much longer to boot from a completely cold start.

Yeah, that doesn't really make sense to me, either. But perhaps the 64-bit system had to load a different driver for the different display (especially since it has touch capability) and the first time it had to detect and download it or at least spend some time setting it up. The second time it was ready to go. I'm just spitballing. Being able to view the boot logs could show the difference.