Operating System - HP-UX
1819870 Members
2318 Online
109607 Solutions
New Discussion юеВ

Java Daemon and Memory Usage

 
SOLVED
Go to solution
Alex MacKay
Occasional Contributor

Java Daemon and Memory Usage

I am running 3 Daemons coded in Java. The classes were compiled on Windows using Microsoft compiler and a jar file created. Each daemon runs in its own process. The daemons execute prefectly, identical to when they run as services on Windows. The problem is that they take up 2 to 2.5 time the memory that is used on Windows.

Couple of points.
I use nohup to start the Java vm. "nohup ~~path/java ~~path-to-class/class". Like I said, the application works perfectly, the issue is the memory is uses which is 2 to 2.5 times the Windows usage.

I determined memory usage by the "top" command.

I understand that memory may be calculated differently on Windows than on UNIX. If that is my problem, can someone explain the difference.

If someone knows the answer, can they point me to documentation, etc as well as explain it.

I realize next week is vacation and people will be out (myself included).

I appreciate any help I can get.
2 REPLIES 2
Pierrick herve
Advisor
Solution

Re: Java Daemon and Memory Usage

on hp-ux, if you launch the JVM without any options, you 'll have 64Mb of Max Heap size.

If you want to use less, try :

for 32Mb
#java -Xmx32 yourclass

for 16Mb
#java -Xmx16 yourclass

youb can read (-Xmx ) in this release note:
http://www.hp.com/products1/unix/java/java2/sdkrte1_3/infolibrary/sdk_rnotes_1-3-1-07.html#additional

regards,
Pierrick
learn and explain
John Bolene
Honored Contributor

Re: Java Daemon and Memory Usage

UX 11 has much better memory stats than UX 10 and is able to place most all of the system requirements for memory in the application stats

Windows on the other hand will have memory for system stuff (technical term) not charged to the application.


Java is a pig for memory usage compared to a compiled application.
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com