Saturday, December 27

This week Movies

1) Neninthe (Telugu)

2) The Great Escape (English, 1963)

3) Raging Bull (1980)

Sunday, December 14

This Week Movies

Rebecca (1940) : a psychological thriller directed by Alfred Hitchcock.

Dostana :

Monday, December 8

Java Virtual Machine (JVM) Heap Sizing

Report on JVM Heap sizing ( based on various web resources):


32-bit JRE

The maximum theoretical heap limit for the 32-bit JVM is 4G. Due to various additional constraints such as available swap, kernel address space usage, memory fragmentation, and VM overhead, in practice the limit can be much lower. On most modern 32-bit Windows systems the maximum heap size will range from 1.4G to 1.6G. On 32-bit Solaris kernels the address space is limited to 2G. On 64-bit operating systems running the 32-bit VM, the max heap size can be higher, approaching 4G on many Solaris systems.

64-bit JRE

A 64-bit capable J2SE is an implementation of the Java SDK that runs in the 64-bit environment of a 64-bit OS on a 64-bit processor. The primary advantage of running Java in a 64-bit environment is the larger address space. This allows for a much larger Java heap size and an increased maximum number of Java Threads, which is needed for certain kinds of large or long-running applications. We can run things under the 32-bit JRE on a 64-bit OS without any problems. All existing 100% pure Java programs would continue running just as they do under a 32-bit VM.


If Java application requires a very large heap we should use a 64-bit VM on a version of the operating system that supports 64-bit applications. Using the 64-bit will cause the JRE to run in server mode, which has a slower startup time, and then on top of that, the 64-bit JRE may result in a performance degradation. So experts suggests that unless we have a compelling reason, to switch, we're fine staying with the 32-bit.


We need to use the -d64 switch to request the 64-bit JVM. E.g., We could specify even 20GB heap size ( -Xmx20g), but if the total of the memory needed by all the processes on our machine ever exceeds the physical memory on our machine, we are likely to end up paging. Garbage collections will be slow. A larger heap will cause garbage collection pauses to increase because there is more heap to scan.


Conclusions:

* The maximum allowable heap size for 32-bit JVMs on 32 bit systems is 2GB(depends).
* If java application requires a very large heap (> 2GB) you should use a 64-bit VM on a version of the operating system that supports 64-bit applications
* Or divide large application into smaller applications, and assign each application 2GB heap.
* The maximum allowable heap size for 32-bit JVMs on 64 bit systems is 4GB (on solaris).
* It's fine staying with the 32-bit JVM even on 64 bit systems (unless there is a strong reason).


References:

http://www.ddj.com/architect/184405993
http://benjchristensen.com/2007/02/16/32-bit-versus-64-bit-jdk-memory-usage/
http://java.sun.com/docs/hotspot/HotSpotFAQ.html
http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html
http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp

Sunday, December 7

Sunday Lunch




I always wanted to cook for myself. This Sunday i prepared food
for lunch. I prepared rice, Egg Curry and Potato Fry. This was my
first attempt. Thanks to raghu and harish for daring to eat ;-).

Sa-Ro-Ja

Today i watched "Saroja" tamil movie. Its good time pass movie.

Saturday, December 6

Welcome to Sajjan Pur

I always wanted to note down movies i watched. Finally i decided to use my blog to note down those movie names . Today i watched movie "Welcome To Sajjan Pur" at OAT. This movie story is based on village atmosphere. Many characters are very natural, realistic. Some scenes and dialogs are based on current politics,situations (SEZ,movies). After very long time i watched movie like this. You feel a different experience than current movies. Story telling is good. Overall this movie is good.

Thursday, December 4

RMI Server API access on a Virtual Private Network (VPN)

When the Remote Server RMI API is accessed from a client on a Virtual Private Network (VPN), the VPN assigns an IP address to the RMI client machine. This VPN-assigned IP address needs to be specified in an RMI Java system property. If the RMI client is the Remote , then this property can be set by adding the following line to the java command.

-Djava.rmi.server.hostname=<IP_address>

Where IP_address is the VPN-assigned IP address.

If the RMI client is a custom Java program, then this property can be set from within the Java code in the following way:

java.lang.System.setProperty("java.rmi.server.hostname", "IP_Address"); 

Where IP_address is the VPN-assigned IP address.

Please note that the RMI Java system property needs to be set before any RMI Server API related RMI code.