Operating System - HP-UX
1752794 Members
6320 Online
108789 Solutions
New Discussion юеВ

Re: Running 32 bit programs on 64 bit HP UNIX

 
Prem Mehrotra
Occasional Advisor

Running 32 bit programs on 64 bit HP UNIX

HP UNIX 64 BIT OS Running 32 bit executables

I am using HP UNIX 11.23 on Itanium 64bit. My OS is 64 bit and my server has 24 GB
Memory, most of the memory is free when I see in glance.
If I run 32 bit application like java, does each java process can address maximum of 4GB (may be less)
Or all java processes combined can only 4GB, so rest of the memory is unused.
i.e.
Java (process 1 can access 4GB memory)
Java (process 2 can access another 4GB memory)
Total memory taken to be 8GB instead of 4GB.
My server has several java processes running; glance shows 15GB free memory. When I start a new
Jvm by typing:
Java
Java immediately gives error:
тАЬError occurred during initialization of VM
Could not reserve enough space for object heapтАЭ

Unfortunately I am stuck using 32 bit java, but I will be really surprised that on a 64 bit OS 4GB limit will apply to all the 32 bit processes combined instead of each 32 bit process.
тАж
20 REPLIES 20
Aneesh Mohan
Honored Contributor

Re: Running 32 bit programs on 64 bit HP UNIX

Hi,

>>Could not reserve enough space for object heap├в

How much swap space you have ?

#swapinfo -tam

Regards,
Aneesh
Aneesh Mohan
Honored Contributor

Re: Running 32 bit programs on 64 bit HP UNIX

hi,

The maximum memory limit for 32 bit process data is 3.8 Gb if fourth quadrant is enabled .

You can verify by using

# chatr file|grep -e disable -e enable

But this 3.8 GB is shared among all 32 bit programs ,so the total data space of all 32bit process will be the maximum of only 3.8 GB.

For more information ,

#man chatr

Regards,
Aneesh
Prem Mehrotra
Occasional Advisor

Re: Running 32 bit programs on 64 bit HP UNIX

Thanks for the information. I learnt something new.
By the way what is the file in
chatr file
command you provided.
Prem Mehrotra
Occasional Advisor

Re: Running 32 bit programs on 64 bit HP UNIX

1. swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 8192 0 8192 0% 0 - 1 /dev/vg00/lvol2
reserve - 5184 -5184
memory 24443 4304 20139 18%
total 32635 9488 23147 29% - 0 -
psgtwp1.twpora=>

2. Will 4th quardent be enabled by default? If its not enabled, is 2GB is the limit for all 32 processes.
I want to check with my UNIX administrator but still not clear what to run to get this verification:
chatr fiel...
Dennis Handly
Acclaimed Contributor

Re: Running 32 bit programs on 64 bit HP UNIX

>If I run 32 bit application like java, does each java process can address maximum of 4GB (may be less)

It depends on how it was linked. By default it can only get 1 Gb, and much less if maxdsiz is smaller or if maxssiz is large.

Using chatr(1) on your "real" java executable will tell you. See Aneesh's reply.
Except +q3p and +q4p do not apply to Integrity executables. You are looking for MPAS.

>Or all java processes combined can only 4GB, so rest of the memory is unused.

This is a 64 bit machine. So every region that is private, is separate.

>"Error occurred during initialization of VM
Could not reserve enough space for object heap"

What options did you give to java? This seems to indicate your maxdsiz is too small.

>I am stuck using 32 bit java

Why? You use 32 bit JNI?

>4GB limit will apply to all the 32 bit processes combined instead of each 32 bit process.

Right, even on a 32 bit OS (PA-RISC), multiple processes combined, can address more than 4 GB.

>By the way what is the file in "chatr file" command you provided.

The real java executable. Not the one you invoke.

>2. Will 4th quadrant be enabled by default?

I assume MPAS is enabled for java but you'll need to check.

>is 2GB is the limit for all 32 processes.

It depends on how it was linked, then maxdsiz.

>I want to check with my UNIX administrator but still not clear what to run to get this verification:

You first need to check the kernel parms maxdsiz and maxdsiz_64bit.
Prem Mehrotra
Occasional Advisor

Re: Running 32 bit programs on 64 bit HP UNIX

My maxdsiz is 1G and maxdsiz_64nit is 24? Does this mean 32 bit java can only access 1GB of memory, but this limit is for individual java vm but not all the jvm's combined.

When I run chatr on /opt/java1.5/bin/java
file is not a valid elf file.
Prem Mehrotra
Occasional Advisor

Re: Running 32 bit programs on 64 bit HP UNIX

Based on various tests I did, most likely there is a limit of 3.8GB or so for all java processes (may be also other 32 bit processes) on this box. Can I change any kernel parameters to increase this because my server has 24GB memory and I cannot utilize most of it despite 64BIT OS.

I was able to start a jvm with 3600M of hepa memory even thousg maxdssize parameter is 1G. How is that possible?
Dennis Handly
Acclaimed Contributor

Re: Running 32 bit programs on 64 bit HP UNIX

>My maxdsiz is 1G and maxdsiz_64bit is 24? Does this mean 32 bit java can only access 1GB of memory, but this limit is for individual java vm

Yes, only 1 Gb. Yes.

>When I run chatr on /opt/java1.5/bin/java: file is not a valid elf file.

This isn't the "real" java executable. This driver execs the real one.

>Can I change any kernel parameters to increase this

maxdsiz, increase it to 4 Gb.

>I was able to start a jvm with 3600M of heap memory even though maxdsiz parameter is 1G. How is that possible?

You might get the error later?

Venkatesh BL
Honored Contributor

Re: Running 32 bit programs on 64 bit HP UNIX

> >I was able to start a jvm with 3600M of heap memory even though maxdsiz parameter is 1G. How is that possible?

Are you sure that your jvm is 32 bits? The kernel will not & cannot allow such a heap memory for a 32bit process. Because, not that 250MB is allocated for I/O space in every 32 bit process.