Operating System - HP-UX
1822330 Members
5729 Online
109642 Solutions
New Discussion юеВ

Unable to allocate memory, HP-UX B.11.11 U 9000/800 (tb)

 
Ping Ho
New Member

Unable to allocate memory, HP-UX B.11.11 U 9000/800 (tb)

Hello,

(I submitted below question a few hours ago. I'm submitting it again only because I don't find it listed in the Forums. I may have done something wrong.)

Our app (a C program) fails while trying to allocate shared memory of size 220771328 in a shmget() call. The error message is "Not enough space", so I think the error # may be 12.

Below are some kernel parameters:

dbc_max_pct 7 - 7
dbc_min_pct 2 - 2
max_thread_proc 256 - 256
maxdsiz 2063835136 - 2063835136
maxdsiz_64bit 2147483648 - 2147483648
maxssiz 134217728 - 134217728
maxssiz_64bit 1073741824 - 1073741824
maxtsiz 134217728 Y 134217728
maxtsiz_64bit 0x40000000 Y 0X40000000
maxuprc 4090 Y 4090
msgmax 65535 Y 65535
msgmnb 65535 Y 65535
nclist 35840 - 35840
nfile 63488 - 63488
npty 200 - 200
select_enh 0 Y 0
shmmax 0x1a0000000 Y 0X1A0000000 (6979321856 Y 6979321856)
swchunk 2048 - 2048

The program was compiled in 32-bit on a HP-UX B.11.00 U 9000/889 (tb) machine.

The current memprog shows:
Memory Stat total used avail %used
physical 16382.0 7273.4 9108.6 44%
active virtual 5672.0 2889.3 2782.6 51%
active real 4176.6 1877.2 2299.4 45%
memory swap 13149.1 2377.5 10771.7 18%
device swap 16096.0 5388.5 10707.5 33%

and swapinfo -tam shows:
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 0 4096 0% 0 - 1 /dev/vg00/lvol2
dev 12000 0 12000 0% 0 - 1 /dev/vg00/lvol11
reserve - 5411 -5411
memory 13149 2377 10772 18%
total 29245 7788 21457 27% - 0 -

The error occurs after a few other shmget() calls.

Do you have any suggestions?

I searched IT Resource Center and found a thread with subject "Unable to allocate memory, HP-UX B.11.11 U 9000/800". I feel that we have similar issues.

Thanks!
Ping

4 REPLIES 4
Don Morris_1
Honored Contributor

Re: Unable to allocate memory, HP-UX B.11.11 U 9000/800 (tb)

Sounds like the global virtual address space for 32-bit (Quadrants 3 and 4) are fragmented. Or the "a few other shmget() calls" you're glossing over add up to around 1.5Gb or so.

Keep in mind 32-bit PA-RISC programs are limited to 1.75Gb of shared address space shared across the entire system. So libc and other critical system libraries are in there, your other SysV segments, etc.

If it is just fragmentation, this is where Memory Windows can help. If it is that the total shared objects created by this process is too large, only going 64-bit will suffice.
Dennis Handly
Acclaimed Contributor

Re: Unable to allocate memory, HP-UX B.11.11 U 9000/800 (tb)

>found a thread with subject "Unable to allocate memory, HP-UX B.11.11 U 9000/800".

You should include a URL to that thread.

Have you also looked at the output of "ipcs -ma" to see what is already allocated?
Ping Ho
New Member

Re: Unable to allocate memory, HP-UX B.11.11 U 9000/800 (tb)

Thank you for looking into my issues.

Here's URL for the other thread with subject "Unable to allocate memory, HP-UX B.11.11 U 9000/800":

http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1228406636049+28353475&threadId=1291368


I also run ipcs -ma command. Please see attachment for the output along with other system info.

Thanks.
Ping
Dennis Handly
Acclaimed Contributor

Re: Unable to allocate memory, HP-UX B.11.11 U 9000/800 (tb)

>Here's URL for the other thread

That's a 64 bit application, unrelated to your case.

>I also run ipcs -ma command. Please see attachment

(Next time please use a simple .txt file.)

You have some fairly large segments. The total size is 3.6 Gb.
sort -k10,10 317527.txt | awk '
/^m / {
sum += $10
print $2, $5, $10
}
END { printf "%.0f\n", sum }'
m 7175 tuxdev 126452000
m 16400 tuxdev 220522496
m 16401 tuxdev 220592128
m 517 oracle 285827072
m 8207 tuxdev 412325888
m 7176 tuxdev 633472000
m 14340 oracle 1560903680

So your shared memory is probably fragmented and I hope that 1.5 Gb one is only put in the 64 bit area and won't interfere?