1845682 Members
3701 Online
110247 Solutions
New Discussion

memory issue

 
logaraman
Regular Advisor

memory issue

Hi,

below is the output of swapinfo -m

# swapinfo -m
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 8000 798 7202 10% 0 - 1 /dev/vg00/lvol2
localfs 3000 0 3000 0% 3000 0 1 /trims_home/paging
reserve - 10202 -10202

Even though i have free paging space , i get the below error ' Not enough memory is available to finish the compilation'

any suggestions
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: memory issue

Shalom,

Perhaps the lacalfs swap is not properly activated in the OS.

See the command swapon -a

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
logaraman
Regular Advisor

Re: memory issue

hi , its enabled

swapon -a
Enabling file system paging on /trims_home.
swapon: /trims_home: minimum blocks (256000)
must not exceed the number of free blocks in the file system (222906).


but i see no difference
James R. Ferguson
Acclaimed Contributor

Re: memory issue

Hi:

The output of 'swampinfo' is more meaningful with the total line. Do:

# swapinfo -tam

Regards!

...JRF...
Dennis Handly
Acclaimed Contributor

Re: memory issue

(When you use swapinfo, add -mta to get all of the info.)

>i get the below error 'Not enough memory is available to finish the compilation'

This could be that you don't have maxdsiz big enough, do you have it set to 2 Gb?

What is your OS version? What is your compiler version? What compile options are you using?
Don Morris_1
Honored Contributor

Re: memory issue

Device Free: 7202.
FS Free: 3000.

Reserved swap: 10202 (7202 + 3000, mind you).

So while only 798Mb of your swap is actively being paged to... *all* of it is reserved at this time. [All virtual objects in HP-UX must reserve someplace to page them out to... file mmap's can use the file they represent (unless they're private/transient copies), malloc(), private mmaps, etc. reserve from Swap].

You have no remaining swap reservation resources, so you'll fail on any new virtual object creation -- which means your compilation is likely failing a malloc() or a fork().

Add more memory (paging isn't good for performance), or add more swap (since you're out of virtual address space), or lower maxdsiz or other tunables to force your workload to use less virtual address space. (At the risk of the application just giving up). I'd recommend option 1 first, then 2.

More information on swap reservation:
http://docs.hp.com/en/1218/mem_mgt.html

http://docs.hp.com/en/1218/mem_mgt.html#Reservation%20of%20Physical%20Swap%20Space (to go right to that section).
logaraman
Regular Advisor

Re: memory issue

Hi ,

The output of swapinfo -tam is

# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 8000 719 7281 9% 0 - 1 /dev/vg00/lvol2
localfs 3000 0 3000 0% 3000 0 1 /trims_home/paging
reserve - 5827 -5827
memory 3062 2285 777 75%
total 14062 8831 5231 63% - 0 -

I shall increase the maxdsiz and revert back
Bill Hassell
Honored Contributor

Re: memory issue

There are many reasons that a program gets a "not enough memory" error -- you have to check all of the limitations. First, if you are running 32 bit applications (or compiler) then everything is severely limited regard;ess of how much RAM you have. Start with:

ulimit -m

It should report unlimited which means that the limit is the kernel limit of maxdsiz (for 32 bit programs). Now look at maxdsiz:

kmtune | grep maxdsiz

If it is only a paltry 67Mb (or small 200Mb) then the kernel is using the defaults. Set maxdsiz to 1800Mb and try again. Now if you get an out of memory error, it is swap space. Add more using swapon, but realize that actual pageouts to the swap area will seriously degrade overall performance.


Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: memory issue

>Bill: if you are running 32 bit ... compiler then everything is severely limited

The next version of the IPF compiler is 64 bit. As long as you have 4+ Gb of swap space, you should be able to compile anything. ;-)

>Set maxdsiz to 1800Mb and try again. Now if you get an out of memory error

It also could be that the source and compiler opt level is just too big. You'll have to drop the opt level or break up large functions.