32- or 64-bit

Michael Hirsch mdhirsch at gmail.com
Fri Aug 6 16:20:15 UTC 2010

On Fri, Aug 6, 2010 at 3:05 AM, Alexander Smirnov
<alexander.v.smirnov at gmail.com> wrote:
> O. Sinclair wrote:
>> Right,
>> new computer on the horizon (next week) and it has 3Gb RAM and iCore 5
>> and what what.
>> So the question is: stay on good-old 32-bit Kubuntu or leap into the
>> future of 64-bit? I know the thing about memory addressing but 3Gb is
>> not quite there if I get it?
>> is 64-bit ready? Will I notice improved speed?
> Currently my computer has 4Gb and 64bit KK installed. Since i frequently
> execute java-based applications, like Eclipse, Ant, ExecuteQuery, I feel
> that it is choking. Probably because these applications consume too much
> memory. Earlier, i had 32-bit kubuntu on this computer. I didn't notice
> difference when moved to 64-bit .

64 bit vs. 32 bit has some interesting tradeoffs.  You can access more
ram with 64 bit, but if you have only 4 gig, all the ram is available
in 32 bit anyway.  The biggest downside to 64 bit is that pointers are
now twice as big.  Java uses a lot of pointers, some programs more
than others, so sometimes 64 bit java can be significantly slower than
32 bit java.

In particular, I've recently switched to a 64 bit machine and I found
that my Java IDE was using way more ram than it did under 32 bit Java.
 Fortunately, I had recently researched this issue for my job and I
knew the cause.

The solution is to make your IDE run with the option
"-XX:+UseCompressedOops" in its JVM.  This makes java so some magic so
that it compresses its pointers so they are 32 bit, but can still
access 32GB of ram.  After doing that my program was a lot smaller.

I'm not sure how to do that in eclipse.  I use Intellij IDEA and there
is a file idea.vmoptions that I put it in.  I'm sure eclipse has
something similar.

But in general, if you don't have more than 4 GB of RAM, I don't think
there is any real advantage to going 64 bit--stick with 32.


More information about the kubuntu-users mailing list