Does 64bit GNU/Linux have better performance?

-1

I had 32bit Ubuntu (with Xfce) and now I switch to 64bit Xubuntu and I'm not sure but I think that 32bit had better performace, but just a feeling. I want to know which one 32 or 64 will give better performace.

I'm don't ask about the kernel but the whole system.

My Machine: Asus laptop k51e with 4GB Ram and AMD Sempron 2 GHz processor.

jcubic

Posted 2013-08-30T06:26:23.613

Reputation: 1 533

For which host machine? – 174140 – 2013-08-30T06:27:06.147

@uprego 64bit laptop, I think that you can't install 64bit on 32bit processor machine. – jcubic – 2013-08-30T06:28:20.793

how much memory do you have? – Keltari – 2013-08-30T06:29:12.363

For which x86_64 compatible host laptop? – 174140 – 2013-08-30T06:31:33.353

Updated info about my machine. – jcubic – 2013-08-30T06:44:54.190

Answers

3

AMD crammed 64-bit support into the Sempron without a redesign. This necessarily entailed a lot of compromises as a design optimized for 64-bit operation would have a lot of fundamental differences at a very low level.

As a result, 64-bit operations in 64-bit mode are about 35% slower on the Sempron than similar 32-bit operations in 32-bit mode. Of course if you would need two 32-bit operations instead of one 64-bit operation, that's still a win for 64-bit mode. But if you replace 64-bit operations with 32-bit operations, as the kernel does for pointers, you take that performance penalty.

There are still a lot of benefits to 64-bit operation. 64-bit operations are significantly faster for those times when you need them. And you have twice as many general purpose registers.

Unfortunately, 64-bit programs tend to require more memory bandwidth than 32-bit programs, and the Sempron has a memory controller with just a single channel. It relies on caches to hide this cost, but 64-bit programs move more data and so tend to have higher cache miss rates for the same cache size.

So your results aren't really all that surprising.

David Schwartz

Posted 2013-08-30T06:26:23.613

Reputation: 58 310

So your results aren't really all that surprising. OP bought a machine with an AMD CPU and has concerns about performance? I agree, this is expected. – ta.speot.is – 2013-08-30T07:27:28.490

@ta.speot.is Intel did the same thing with the Pentium D with similar results. But your response is very funny. – David Schwartz – 2013-08-30T07:29:18.573

What 64bit processor will be faster in 64bit mode then? What to know if I plan to buy another machine. – jcubic – 2013-08-30T08:04:17.807

1Pretty much every x86 CPU put on the market since 2008 was designed from the ground up to perform well in 64-bit mode. – David Schwartz – 2013-08-30T20:29:43.880

2

You would typically expect the same or better performance (depending on the way the software is written and the compile option) from a 64 bit OS unless your system is very memory constrained - 64 bit computers may take up more memory when representing some values.

davidgo

Posted 2013-08-30T06:26:23.613

Reputation: 49 152

2

Do a search and you'll find tons of benchmarks out there like this. On average a 64-bit application will have slightly better performance because they x86-64 has a larger register number (which reduces memory access and in many cases also reduces cache misses), implied SSE2 by default and other newer features. But some programs may suffer from more cache misses because they use a lot of pointer accesses and possibly types that are bigger on 64-bit OS (like long on Linux, although this doesn't happen on Windows)

The performance difference comparing an application running on a 64-bit platform versus a 32-bit platform on SPARC is on the order of 10-20% degradation when you move to a 64-bit VM. On AMD64 and EM64T platforms this difference ranges from 0-15% depending on the amount of pointer accessing your application performs.

https://www.oracle.com/technetwork/java/hotspotfaq-138619.html#64bit_performance

phuclv

Posted 2013-08-30T06:26:23.613

Reputation: 14 930

1

Space is performance.

Little caches perform better than big ones, and more 32-bit entries will fit in a fixed-size cache than 64-bit ones.

So, all other things being equal, 32-bit systems perform better than 64-bit ones.

lledr

Posted 2013-08-30T06:26:23.613

Reputation: 111

The thing is, all other things are not equal. For example, his CPU has more general purpose registers in 64-bit mode than it does in 32-bit mode. So while this answer is correct, it doesn't apply to any real-world situation. – David Schwartz – 2013-08-30T07:01:42.553

How do you get that little caches perform better then big ones ? This makes no sense to me - and in the case where you are talking of a cache with fewer entries being faster to parse then a cache with lots of entries, the number of entries are the same in a 32 and 64 bit system, just the byte offsets will be different. As an operation typically takes place across all the bits, you will get performance speedups for some representations of data, and operations on variables optimumly represented with fewer bits will take the same amount of time. – davidgo – 2013-08-30T07:08:36.670

Little caches perform better than big ones, and more 32-bit entries will fit in a fixed-size cache than 64-bit ones. What if the host system has 128 GB of RAM and the size of the fixed-size cache is 64 GB? How much faster will the 32-bit system be now? – ta.speot.is – 2013-08-30T07:25:51.407

Performance is inherently tied to a component complexity. Little cache (as direct-mapped against fully associative) are faster because simpler. The cache number of entries is the same regardless of the 32/64-bit aspect (in general 64 bytes cache lines), but the point is that such a 64 bytes cache line would contain 16 32-bit entries and only 8 64-bits ones. Memory use is 'stretched', leading to more cache lines being used for the same program, and finally to more cache eviction. – lledr – 2013-08-30T07:33:12.213

@ysomane: in fact due to the large register file, memory access on x86_64 would be much less than on x86. Consequently, cache miss on x86_64 is less than on x86 http://i.imm.io/1g4yc.png http://www.cs.ucf.edu/~wspires/32bit_versus_64bit_amd64.pdf

– phuclv – 2013-09-13T05:16:50.847

@LưuVĩnhPhúc Of course recent architecture perform better than older ones (at least globally). The fact that x86_64 architectures have more general-purpose registers is not tied to their 64-bits aspect. My point is that better performance is not related to word size. It is related to architecture enhancement. – lledr – 2013-09-14T05:28:08.927

@ysomane: of course architectures have been enhanced. But even in the same architecture, 64-bit mode is often faster than 32-bit mode because of the reduced memory access due to larger number of registers. In lack-of-registers architectures such as x86 or ARM, compilers must often push-and-pop variables to/from stack because there aren't enough registers, which makes a lot of bottlenecks in memory. This problem is partially solved in x86_64/ARM 64 – phuclv – 2013-09-14T10:31:19.717