Page 1 of 2 12 LastLast
Results 1 to 10 of 48

Thread: Ubuntu 12.10: 32-bit vs. 64-bit Linux Performance

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Posts
    14,373

    Default Ubuntu 12.10: 32-bit vs. 64-bit Linux Performance

    Phoronix: Ubuntu 12.10: 32-bit vs. 64-bit Linux Performance

    In past years on Phoronix there has been no shortage of 32-bit vs. 64-bit Linux benchmarks. Assuming you don't have a limited amount of RAM and under memory pressure, 64-bit distributions tend to be much faster than the 32-bit versions. However, some Linux users still often wonder whether they should use the 32-bit or 64-bit version of their distribution even when on 64-bit hardware. So with that said, here's some more 32-bit vs. 64-bit benchmarks of Ubuntu 12.10 with the Linux 3.5 kernel.

    http://www.phoronix.com/vr.php?view=17994

  2. #2
    Join Date
    Nov 2010
    Location
    Stockholm, Sweden
    Posts
    399

    Default

    Hi Michael, I just thought of an improvement to your graphs: Instead of just writing "More is Better/Less is Better" you could make the "winning" graph a slighly different color, for instance brighter and more saturated. That would give the user instant feedback on which one won a test (when numbers aren't as important).

  3. #3
    Join Date
    Jun 2007
    Location
    The intarwebs
    Posts
    385

    Default

    Is it theoretically possible for 32 bit to be superior to 64 bit for some workloads, and if so, what kinds? Or, if not, should we file bugs on software packages whose performance regresses when compiled for 64 bit?

  4. #4
    Join Date
    Apr 2009
    Posts
    20

    Default

    64bit in itself will only help an algorithm if data structures larger than 32bit are used, or could be used to increase performance.
    This is especially true for applications that need more than 4GB of RAM (forget PAE, it is slower).

    Now what happened to the x86 world is that with the introduction of AMD64 (x86-64 extension) the registers did not only get wider but doubled!
    Integer registers and SIMD registers. The latter recently even quadrupled (AVX).
    Apart from that the 64bit mode offers new ways of addressing code, relative to the instruction pointer.
    And maybe more I'm not aware of.

    Also there have been loads of additions to the x86 instruction set since AMD64 was introduced in 2003 (Intel implemented it a bit later). I don't know if some of these additions can only be used in 64bit mode. If so, they add to the potential performance gain for 64bit software.

    But if your algorithm just can not be improved via wider registers more registers or other voodoo, it is probably faster on a 32bit CPU. This is because full 64bit operations take probably more time to compute (transistor latency) and compressing 32bit (and often much smaller) numbers such that they do not waste 80% (or so, on average) of the available 64bit registers/computational units is pretty slow, if even attempted.

    Therefore I conclude that if programmed wisely or at least put through a great compiler most software should be faster on a modern 64bit CPU. But there are algorithms that just don't scale. Maybe those could be exchanged for better ones, maybe not.
    Filing a bug could make the programmer think about optimizations. But don't spam with those ;-)

  5. #5
    Join Date
    Sep 2012
    Posts
    48

    Question

    Quote Originally Posted by enteon View Post
    64bit in itself will only help an algorithm if data structures larger than 32bit are used, or could be used to increase performance.
    This is especially true for applications that need more than 4GB of RAM (forget PAE, it is slower).

    Now what happened to the x86 world is that with the introduction of AMD64 (x86-64 extension) the registers did not only get wider but doubled!
    Integer registers and SIMD registers. The latter recently even quadrupled (AVX).
    Apart from that the 64bit mode offers new ways of addressing code, relative to the instruction pointer.
    And maybe more I'm not aware of.

    Also there have been loads of additions to the x86 instruction set since AMD64 was introduced in 2003 (Intel implemented it a bit later). I don't know if some of these additions can only be used in 64bit mode. If so, they add to the potential performance gain for 64bit software.

    But if your algorithm just can not be improved via wider registers more registers or other voodoo, it is probably faster on a 32bit CPU. This is because full 64bit operations take probably more time to compute (transistor latency) and compressing 32bit (and often much smaller) numbers such that they do not waste 80% (or so, on average) of the available 64bit registers/computational units is pretty slow, if even attempted.

    Therefore I conclude that if programmed wisely or at least put through a great compiler most software should be faster on a modern 64bit CPU. But there are algorithms that just don't scale. Maybe those could be exchanged for better ones, maybe not.
    Filing a bug could make the programmer think about optimizations. But don't spam with those ;-)

    Dear enteon,

    very nice post with great info. love it.

    my concern is that we (specially i) develop and write applications in high-level languages.
    so i generally don't concern with the no of 'registers' or 'integer size' etc.
    isn't it the concern of the compiler that i am using ?
    shouldn't it optimize the binary for me for 32bit and 64bit ?

  6. #6
    Join Date
    Jul 2012
    Posts
    598

    Default

    Yeah sure, 64bit is better in some aspects than 32bit...but the opposite is also true.

    In the end i will prefer always 32bit for compatibility issues with games....i had a bad enough experience with 64bit in a recent past to even consider it any time soon...

  7. #7
    Join Date
    Apr 2009
    Posts
    20

    Default

    Quote Originally Posted by ayandon View Post
    my concern is that we (specially i) develop and write applications in high-level languages.
    so i generally don't concern with the no of 'registers' or 'integer size' etc.
    isn't it the concern of the compiler that i am using ?
    shouldn't it optimize the binary for me for 32bit and 64bit ?
    I'm no expert on this, but I'd say it depends on your language and time available. In java you have almost no chance of optimizing for different hardware. C on the other hand allows you to do that. Both use compilers that are supposed to optimize. But creating a good compiler is one of the most difficult things to do for a programmer. Therefore you may want to not rely on the compiler for optimization, if you have the time and the time invested is less than the saved runtime.

    But still there are algorithms that no compiler can optimize. It's your responsibility to choose the best algorithm for the data you are to compute. No compiler can ever do that (perfectly).
    This includes (I believe, but don't have experience in it) the usage of x86 extensions, SSE units, AES units, even GPGPU (not x86 of course). You have to implicitly use these features, no compiler will add them automagically.

    But just like good software engineering pushing such things through management may be hard



    Quote Originally Posted by AJSB View Post
    In the end i will prefer always 32bit for compatibility issues with games....i had a bad enough experience with 64bit in a recent past to even consider it any time soon...
    Of course if your application can't do 64bit then all hope is lost. But blame the producer, not the CPU

  8. #8
    Join Date
    Dec 2009
    Posts
    492

    Default

    Quote Originally Posted by ethana2 View Post
    Is it theoretically possible for 32 bit to be superior to 64 bit for some workloads, and if so, what kinds? Or, if not, should we file bugs on software packages whose performance regresses when compiled for 64 bit?
    If a piece of software uses pointers heavily (memory addresses for the uninitiated), there is a strong possibility it will run faster on 32 bit hardware. Because on 64 bit addresses are twice as long, therefore 'harder' to access. Techniques have been developed to use 32 bit pointers on 64 bit hardware when addressing less than 4GB, but even their use is slower than direct 32 bit access.

  9. #9
    Join Date
    Jul 2008
    Posts
    1,720

    Default

    reeeeaaallly?

    and you have some sources for that claim? because I read it here first....


    and please - whoever mentioned x32 - forget it. As fast as you can. It was created by Intel to make Atom suck a bit less. Breaking all and everything just to make a crap CPU look better is NOT a good thing to do.

  10. #10
    Join Date
    Apr 2011
    Posts
    155

    Default

    Quote Originally Posted by energyman View Post
    reeeeaaallly?

    and you have some sources for that claim? because I read it here first....


    and please - whoever mentioned x32 - forget it. As fast as you can. It was created by Intel to make Atom suck a bit less. Breaking all and everything just to make a crap CPU look better is NOT a good thing to do.
    ...and you have some sources for that claim?
    If you want to deal with the large memory footprint of a native 64bit application you're certanly welcome.
    But i'd rather prefer X32 abi and my cpu cache to be used better, instead.

    --

    Said that, Not only the benchmark compared 32 vs 64bit here, but even two different instruction sets.
    A more fair comparision would be the same application compiled for the amd64 instruction set running on a 64bit and a 32bit kernel.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •