Java Performance Series -1

26 Mar

Over the years working with various Java technologies applications, I have seen the below memory set for java heap with regard to various operating systems.

Operating System Heap Size JVM(Java Virtual Machine)
Windows < 1500mb 32 bit
Windows Between 1600mb to 32gb 64 bit
Linux <2gb ;appx 1800mb 32 bit
Linux Between 1600mb to 32gb 64 bit
Solaris <3g 32 bit
Solaris Between 3g to 32gb 64 bit

There always exists some restrictions with regard to 32 bit systems given that OS reserves around 2 gb for its use and another 2 gb is given to programs for their use.

Among all the operating systems Solaris tends to give more horse power to the applications compare to Windows/Linux when it comes to Performance.Though I believe Solaris works much faster or give more horsepower is because they are non gui or has limited GUI features in it compare to other OS’s.The heap size is often configured via

-Xmx(size) – to set the maximum Java heap size

-Xms(size) – to set the initial Java heap size

When it comes to hosting on 64 bit systems , there often exists a performance issues with the application in spite of having sufficient memory and horse powers, and quite often I have seen people using   -XX:+UseCompressedOops flag to boast the performance of the application.However testing should confirm you about the gain in performance.

If you want to check as what version of VM application is using, use below command,

C:\>java  -version
java version “1.6.0_31”
Java(TM) SE Runtime Environment (build 1.6.0_31-b05)
Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode, sharing)

Technorati Tags: ,
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: