I believe the main question when choosing between 32 and 64 bits is not "Does my processor support 64 bits — if so then I should use 64 because that's twice as good", but "How much memory do I have?".
64-bit programs use about 50% more memory then their 32-bit counterparts. The results of this are:
less code/data can fit into processor caches -> more cache misses -> your super-fast processor waits more for memory controller to fetch data from RAM. Processor also needs to read more data because it's more bloated.
Linux uses non-allocated RAM to cache disks. Less free memory available -> less space for disk caches -> slower disk access
Once you're out of RAM and the system starts swapping - disk access is thousands times slower than RAM, so any potential benefits of 64-bit code (see below) are flying out of window.
On the other hand, in 64-bit mode processor has more registers, so it doesn't need to access memory that often, also, some calculations (64-bit numbers etc.) are more efficient. So generally, code which is not memory-restricted runs slightly faster in 64-bit mode.
So, if your system has, say, 2GiB of RAM or less then I would definitely choose 32 bits. More than 4GiB - the benefits of 64 bits are becoming more prominent. Around 4GiB is a "grey zone" - you need to make a choice yourself.
Here are screenshots of a (rather old) vanilla Ubuntu running in a VirtualBox with 1GiB RAM:
32 bit: uses 388 MiB of RAM right after booting, no additional applications running (from the screenshot, 397780KiB, which is 388MiB)
64 bit: uses 491 MiB of RAM (from the screenshot, 503452KiB = 491MiB)
Additionally, in my testing, a web-application written in Python used up to 60% more memory on a 64-bit machine which resulted in a test suite running in 380 secs on a 32-bit machine but taking 523 seconds on a 64-bit one (both with 1GiB of RAM). If the machines were not RAM-limited the results would likely be different (as phoronix tests show).
Here are some more thorough and recent tests: http://kernel.ubuntu.com/~cking/x32/Quantal-x32-power-memory-comparisons.ods
Basically, it's like giving up 30% of your RAM in exchange of possible gain of 10% CPU speed.
In order to be able to run a 64-Bit system in a VirtualBox, you need a cpu which supports virtualization. AMD calls this function AMD-V, Intel uses VT-x. The Wikipedia explains this quite good. There are a couple of Pentium-4 CPUs which are able to run a 64-Bit OS, but don't offer this VT-x technologie. You can check your system by...
$ egrep '(vmx|svm)' /proc/cpuinfo
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl vmx cid cx16 xtpr lahf_lm
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl vmx cid cx16 xtpr lahf_lm
If you don't get any output, you're not able to run a 64-Bit OS as guest inside your VirtualBox. But don't forget to check your BIOS settings. You might be able to activate these AMD-V/VT-x features inside the BIOS of your computer.
And finally there's a checkbox inside the VirtualBox-Settings. Start VirtualBox, select the virtual machine where you want to run your 64-Bit OS and go into the settings of this VM. Look for "Settings -> System -> Acceleration" and make sure that "Enable VT-x/AMD-V" is activated.
Best Answer
If you look at the
CPU op-mode(s)
line, you'll see a clue:So yes, your CPU supports 64bit instructions. You can use the 64bit version of Ubuntu if you want to. This will require reinstalling, there is no upgrade path.
Most CPUs you'll encounter —certainly from the last decade or so— will probably support 64bit. This isn't a guarantee because Intel still makes 132 32bit CPUs, however these are super-budget Atoms, Celerons and Pentiums, special-purpose Xeons and a few SoCs. AMD's offerings are similar.
If you can find out what the CPU is (i.e. read the
Model name
output), you end up with something very Google-able. Here is one of my servers:That gives this Intel ARK page which tells you all the CPU features and supported architectures. Of course yours will be different from that link but it's pretty reliable and easier to read then deciphering the flags in
lscpu
andcat /proc/cpuinfo
.