Announcement

Collapse
No announcement yet.

Ubuntu 14.10 Linux 32-bit vs. 64-bit Performance

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Originally posted by schmidtbag View Post
    I personally don't understand why anyone with a 64-bit compatible CPU specifically chooses to use a 32-bit OS. Of course there are scenarios where that is the best route, but it's pretty rare.
    There seems to be a lot of information about how when you have 2GB of memory or less, it makes sense to run 32-bit OS because it uses less memory (some say that it is faster too in that case). Then again there are others that say the increase in memory usage when using 64-bit is negligible.

    My 2GB home server is currently 64-bit but I'm tempted to try 32-bit OS on it to see if any of the claims are true or not.

    Comment


    • #12
      Originally posted by joh??n View Post
      There seems to be a lot of information about how when you have 2GB of memory or less, it makes sense to run 32-bit OS because it uses less memory (some say that it is faster too in that case). Then again there are others that say the increase in memory usage when using 64-bit is negligible.

      My 2GB home server is currently 64-bit but I'm tempted to try 32-bit OS on it to see if any of the claims are true or not.
      Even in this case the memory doesn't really matter unless you're very tight on memory. The fact that the amd64 architecture wins over i686 is why amd64 will likely run faster. Memory is cheap so its a shame if you still use 2Gb on a PC while that's the norm on smartphones.

      Comment


      • #13
        There are many small devices that do not need over 2G. You have to have larger CPU caches when you go to 64b.
        To do an apple to apple comparison you have to run two OSs on the same 64b CPU... so you have to keep in mind that you are comparing an "x86 OS running on an x86_64 CPU" vs a "x64 OS running on an x86_64 CPU".

        When you run an x86 OS on a x86_64b CPU, is there any wasted CPU overhead required to accommodate a true x64b OS that is being wasted on an x86 application?

        Comment


        • #14
          Originally posted by schmidtbag View Post
          I agree, x86-32 should have died years ago, but Intel, adobe, and MS unfortunately kept it alive. But as these benchmarks show, not all applications have any particular gain running in 64 bit. There doesn't appear to be any significant downsides though, so there's really no reason to stick with 32 bit anymore (unless you're forced to).

          I personally don't understand why anyone with a 64-bit compatible CPU specifically chooses to use a 32-bit OS. Of course there are scenarios where that is the best route, but it's pretty rare.


          For the record - regarding my earlier post, I was merely saying that in many cases, there is no gain in optimizing software for 64 bit. I'm not saying there's anything wrong with it, and I wholeheartedly welcome 64 bit ports (preferably optimized).
          There are BIOS's out there that won't let you run 64bit on your 64bit CPU. These hardwares are not even that old.

          Making assumptions about bitness causes exactly problems like http://www.phoronix.com/scan.php?pag...tem&px=MTQ5NzE (in this case UEFI bios wanting to run 32 bit OS, but linux not supporting that).

          Comment


          • #15
            What's up with Postmark? There's no obvious reason why a 64-bit database would do 10x more transactions than a 32-bit database, when databases are usually IO and not CPU bound. A CPU running 32-bit code should be easily capable of maxing out a SATA link. Looking at past benchmarks it seems the Postmark divide did not exist in Ubuntu 13.04 but by 14.04 64-bit Postmark had 2x throughput. I wonder if the fall in relative performance is related to Ubuntu switching to a PAE kernel on 32-bit last year.

            Comment


            • #16
              Originally posted by ferry View Post
              in this case UEFI bios wanting to run 32 bit OS, but linux not supporting that
              Possible since kernel 3.15 : http://kernelnewbies.org/Linux_3.15#...974d2b71ffecf4

              Comment


              • #17
                Originally posted by joh??n View Post
                There seems to be a lot of information about how when you have 2GB of memory or less, it makes sense to run 32-bit OS because it uses less memory (some say that it is faster too in that case). Then again there are others that say the increase in memory usage when using 64-bit is negligible.

                My 2GB home server is currently 64-bit but I'm tempted to try 32-bit OS on it to see if any of the claims are true or not.
                IMHO there is no need for 32-bit even on a 2GB system. It is easy to test specific use cases. From a 2GB VirtualBox VM with Ubuntu 14.04.1 ISO booted into the live desktop, run some apps and look at the non-cache output of 'free -m':

                Code:
                Ubuntu 14.04.1 32bit 1024x768
                xterm used=428M free=1586M
                +firefox,lowriter,localc used=616M free=1399M
                +4 firefox sites used=819M free=1196M
                
                Ubuntu 14.04.1 64bit 1024x768
                xterm used=514M free=1487M [+20%]
                +firefox,lowriter,localc used=779M free=1222M [+26%]
                +4 firefox sites used=1084M free=917M [+32%]
                The number in square brackets shows the % more memory used by 64-bit. So clearly there is a memory hit with 64-bit, but even with xterm, firefox, lowriter, localc and Firefox open with 4 tabs loaded, there is still 917M free, so there is plenty of physical memory left and a 2GB system should not be swapping.

                Plot from the three cases above (xterm), (firefox,lowriter,localc), (firefox+4 sites,lowriter,localc), data points are MB used/free:



                The difference between 64bit and 32bit in the worst case test (xterm+firefox+loaded tabs+lowriter+localc) is 1084-819=265MB. So even with three heavy apps running in parallel the total cost of 64-bit in this test is an extra 265MB, and there is still 917MB left for other stuff; 46% of the physical memory is still available to use before the system will be forced to swap.

                With Firefox running and 30 tabs open on random sites, the system still had 210MB free. Most users with low memory systems could probably run a 64-bit desktop without swapping, and most applications will generally run considerably faster under 64-bit. It's worth the tradeoff.

                Comment


                • #18
                  chrisb, thank you for the post, interesting data!

                  Comment


                  • #19
                    depends

                    Originally posted by mark45 View Post
                    Even in this case the memory doesn't really matter unless you're very tight on memory. The fact that the amd64 architecture wins over i686 is why amd64 will likely run faster. Memory is cheap so its a shame if you still use 2Gb on a PC while that's the norm on smartphones.
                    ram is cheap? no so cheap in some same places,.. depends. do not forget that ,there are laptops with only one ram slot occupied and comes with a 1GB ram...

                    but i have a intel atom single core with a 3150 with a 2 gb ram running 64 bit lubuntu without problems

                    Comment


                    • #20
                      Originally posted by magika View Post
                      So the SSE compiled binaries are faster? Shocker.
                      Amazing what a few registers and --NEW-- features can do for you. Sometimes I think there are too many Luddites in the Linux community. Running in 32 bit mode on 64 bit hardware should have come to an end years ago.

                      Comment

                      Working...
                      X