Should I choose 32 or 64 bit for Linux?

18

2

I own a Linux workstation which currently has 4 GB of RAM and planning to go for 8 GB in the near future. CPU is a Core2Quad Q9550.

Should I install a 32 or 64 bit variant of Linux?

Robert Munteanu

Posted 2009-07-15T11:23:51.957

Reputation: 4 240

Answers

18

You should install 64-bit linux. Even though there are ways for the 32-bit kernel to address more than 4 GB the applications will still have a 3 GB limit.

D. Wroblewski

Posted 2009-07-15T11:23:51.957

Reputation: 442

1Really the only reason not to use PAE is the ~0.1% performance decrease, which is so insignificant that you would never even notice it. – Zifre – 2009-07-27T14:28:04.587

Thanks for the answer. Are you talking about PAE? Does that work properly in practice? – Robert Munteanu – 2009-07-15T11:30:22.580

1I am currently using PAE to access 4GB with no problems. – Mark – 2009-07-15T11:31:48.740

1I'm afraid of PAE. It's like to wake up in 16-bit world. – Kirill V. Lyadvinsky – 2009-07-15T11:42:33.440

@jia3ep : any specific reasons to avoid PAE? – Robert Munteanu – 2009-07-15T12:17:14.217

You can use a 64bit kernel with a 32bit userspace and properly access RAM >= 4GB without the hack that is PAE. – TRS-80 – 2009-07-19T21:38:09.857

5

You can run a 64-bit kernel and a 32-bit distribution which will give you full access to 4 GB or more of RAM, without the performance penalty of PAE. This is what I do on my machine. Debian has linux-image-amd64 available for i386. Unfortunately Ubuntu doesn't, you'd have to compile your own kernel there, and I don't know if other distributions have packages.

Having said that, for new installations I'd recommend 64-bit as performance is better, so long as you can live with hacks for 32-bit-only binaries like Skype and some browser plugins. RPM distributions have OK support for this at the moment, while Debian and Ubuntu don't, but are working on multi-arch support now, with a first release expected for Ubuntu 9.10 this year.

TRS-80

Posted 2009-07-15T11:23:51.957

Reputation: 2 923

1The performance penalty of PAE comes from the extra level in the page table lookup. However, while PAE systems use a three-level page table system, x86-64 systems running in long mode use four levels. If that is the only penalty for using PAE, wouldn't 64bit always have worse performance in this regard? Certainly, 64bit offers some other features which may make up for the tradeoff, but you appear to recommend against PAE due to the extra page table lookup. – ChrisInEdmonton – 2009-07-23T20:44:13.590

I have to admit I haven't benchmarked it, and Wikipedia says "On x86-64 processors, PAE is obligatory in native long mode". Ingo benchmarked it http://groups.google.com/group/linux.kernel/browse_thread/thread/e312a11935a37aea/1ec5705a2e2f95e2#1ec5705a2e2f95e2 and 64bit is worse than PAE is worse than 32bit due to page tables in a worst-case fork benchmark. Driver performance will be better if the hardware supports 64bit as bounce buffers won't need to be used, which is the penalty I was thinking of.

– TRS-80 – 2009-07-24T03:25:43.420

4

I'd install a 64-bit version and potentially something like VirtualBox so I can run a 32-bit version in parallel in case I'd need some software that is only available in 32-bit.

You won't be able to make use of more than 4 GB of memory using a 32-bit kernel without jumping through some hoops like PAE which is IMHO better avoided.

Timo Geusch

Posted 2009-07-15T11:23:51.957

Reputation: 490

4

32-Bit can only use less than 4 GB for a single process, but it can use more for the whole system. There are not many non-server applications on Linux that will want that much RAM that I can think of.

You will just need to install the PAE (Physical Address Extension) kernel:

sudo sudo apt-get install linux-headers-server linux-image-server 

and then reboot. Run top or free and you should more ram. I recommend 32-Bit for desktop users.

Kyle Brandt

Posted 2009-07-15T11:23:51.957

Reputation: 3 089

3ockquote>

I recommend 32-Bit for desktop users.

Why? There used to be no 64-bit (Sun) Java plugin and no 64-bit (Adobe) flash plugin, but aren't those two cases solved by now? – asjo – 2009-07-27T15:23:48.967

4

Here is one overview from LinuxForums.

I would hesitate if you do a lot of work with niche or developing tools written in entirely compiled languages. Many of the projects I'm interested in, like LDC, are only beginning to support 64 bit. Personally I'm holding off, but I'm holding off on more RAM too, so that's not an issue for me.

Nikhil Chelliah

Posted 2009-07-15T11:23:51.957

Reputation: 1 028

1+1 for checking that all the software you need is supported on 64-bit. – Mark – 2009-07-15T11:32:21.907

3

I run 64bit 9.04 for my home desktop. I do quite a lot with this machine, and the only 64bit related issue I encounter is stability problems with 64bit Adobe Flash.

Colin Pickard

Posted 2009-07-15T11:23:51.957

Reputation: 6 774

2

Go for 64-bit. 32-bit can only access about 3.5 GB of RAM, and most of the compatibility issues have been ironed out. To make it even easier, use a popular distribution like Ubuntu.

Lucas Jones

Posted 2009-07-15T11:23:51.957

Reputation: 669

1My 32-bit Ubuntu is able to use all 12 GB of RAM, though each process is limited. It is not the case that 32-bit OS's can only access about 3.5 GB of RAM. You just have to use PAE, Physical Address Extensions. – ChrisInEdmonton – 2009-07-23T20:45:45.833

My 32-bit Ubuntu is able to use only 2.9Gb. 3.5Gb is a dream :) – Kirill V. Lyadvinsky – 2009-07-15T11:27:57.813

1

To use all 8 GB naturally you should install 64-bit version.

Kirill V. Lyadvinsky

Posted 2009-07-15T11:23:51.957

Reputation: 5 028