Operating System - HP-UX
1834604 Members
4280 Online
110069 Solutions
New Discussion

How to allocate all the memory of the HP-UX OS ?

 
SOLVED
Go to solution
jean-yves poch
Advisor

How to allocate all the memory of the HP-UX OS ?


Hi all,

we have a server with 10 Go RAM + 4 Go swap
The server was installed with a make_tape_recovery.
The tape come from a same server with 4Go Ram.
The kernel of the new server was rebuild with the specifications from HP and from the software editor.

But when the OS is up, we can allocate to the
maximum only 5.80 Go RAM (malloc, realloc, ...).

the kmtune command return :

# kmtune
...
dbc_max_pct 2
dbc_min_pct 2
maxdsiz 3221225472
maxdsiz_64bit 0X3FFBFFFFFFF
maxssiz 0XC800000
maxssiz_64bit 0XC800000
maxtsiz 0X7B033000
maxtsiz_64bit 0X3FFFFFFFFFF
maxuprc 200
maxusers 256
msgmap (2+MSGTQL)
msgmax 32768
msgmnb 65535
msgmni 512
msgseg 20480
msgssz 128
msgtql 5120
shmem 1
shmmax 0X80000000
shmmni 512
shmseg 512
...
#

The physical memory
(sysconf(_SC_AVPHYS_PAGES) * sysconf(_SC_PAGE_SIZE)) is 10 Go RAM.

We missed something but we do not know what.

Thank you by advance for your assistance.

Jean-Yves





pitstop
12 REPLIES 12
Sridhar Bhaskarla
Honored Contributor
Solution

Re: How to allocate all the memory of the HP-UX OS ?

Hi,

I believe you need to increase your swap size. Your 4GB swap + psedo_swap may be limiting the memory allocation.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sandip Ghosh
Honored Contributor

Re: How to allocate all the memory of the HP-UX OS ?

It depends on the application you are using. If your applications are true 64 bit then only you can make use of all the memory. If you are using different Oracle (32bit) instance, you can configure the memory windows to use the memory beyond 4 GB.

Sandip
Good Luck!!!
jean-yves poch
Advisor

Re: How to allocate all the memory of the HP-UX OS ?


Sorry,

The kernel is 64 bits.
The application is in 64 bits mode, and stop after 5.80 Go.
We made tests with a small program compiled in 64 bits.
The small program gives value ENOMEM to the variable errno after a malloc or a realloc.
(ENOMEM = out of memory).
This binary allocate to the maximum 5.80 Go too.
In 32 bit mode the small program can allocate to the maximum only 820 Mo.

Jean-Yves
pitstop
Jeff Schussele
Honored Contributor

Re: How to allocate all the memory of the HP-UX OS ?

Hi Jean-yves,

Make sure the kernel parameter
swapmem_on=1
If it's not you're limited to only the value of swap for memory usage.
Raising swap to memory size would have the same effect - but you may not need all that swap.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Wodisch
Honored Contributor

Re: How to allocate all the memory of the HP-UX OS ?

Hi,

I guess Jeff's answer is the right one:
without "shmem_on=1" you'll need actually MORE swap than real RAM, but with it you can run with only 1/4 of your RAM size as swapspace...

HTH,
Wodisch
harry d brown jr
Honored Contributor

Re: How to allocate all the memory of the HP-UX OS ?


If you want to allocate all of your memory, just start oracle up.

:-)


live free or die
harry
Live Free or Die
jean-yves poch
Advisor

Re: How to allocate all the memory of the HP-UX OS ?


Thank you for your assistance.
Your answers solved our problem.

Finally, we increased the swap.
This choice is simple to explain.
The server is used for aerodynamic calculations with the Fluent software.
Aerodynamic calculations need always more memory for a good quality of results.
Thus the kernel variable swapmem must remained to 0.

Implementation :

# kmtune |grep maxswapchunks
maxswapchunks 16384
# vgdisplay /dev/vg00
...
Free PE 2824
...
# lvcreate -n lvswap -L 6144 -C y /dev/vg00
# swapon /dev/vg00/lvswap
# swapinfo -t
OK
# echo '/dev/lvswap ... swap defaults 0 2' >> /etc/fstab

see also :
http://www.hp-partners.com/fluent_public/

I believed that Oracle was a boat which sailed in New Zealand (Louis Vuitton Cup), and not a memory hoover :-)

Thank's for all.

May the force be with you !

Jean-Yves (little HP-UX padawan)

pitstop
Jeff Schussele
Honored Contributor

Re: How to allocate all the memory of the HP-UX OS ?

Hi (again) Jean-Yves,

Although it's certainly your call, but you should note this from the swapmem_on man page

http://www.docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/TKP-90202/TKP-90202_top.html&con=/hpux/onlinedocs/TKP-90202/00/01/160-con.html&toc=/hpux/onlinedocs/TKP-90202/00/01/160-toc.html&searchterms=swapmem_on&queryid=20021010-113211
\Quote
swapmem_on - allow physical memory size to exceed the available swap space

When Should the Tunable Be Turned On?

If this tunable is set to 0 (off), and a fork() or exec() process is failing with an ENOMEM error message and has sufficient system memory but insufficient unreserved swap space, then setting this tunable to 1 (on) will allow these processes to use pseudo-swap space and execute.

What Are the Side Effects of Turning the Tunable On?

Some physical memory is set aside for pseudo-swap, but since the kernel can steal pages from this allocation if needed (for locked memory or kernel memory), and the rest of the pages will only be used when physical swap is completely filled anyway, this is quite harmless.

When Should the Tunable Be Turned Off?

This tunable can be turned off if there are sufficient physical swap devices or file systems such that the system workload never fails to reserve swap. However, turning this feature off really does not gain the system anything.

What Are the Side Effects of Turning the Tunable Off?

Processes will be limited to physical swap devices or file systems for reserving their swap on a fork() or an exec().

What Other Tunables Should Be Changed at the Same Time?

None.
\EndQuote

So in my opinion there is really no reason why swapmem_on should be off on your system.
The strongest case FOR having this on for your system would be - You'd have to increase swap AGAIN if you ever increase RAM.

My 2 cents,
Jeff

PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Sridhar Bhaskarla
Honored Contributor

Re: How to allocate all the memory of the HP-UX OS ?

Hi Jean,

Jeff is correct that enabling swapmem_on does not really make use of your memory. It is only for reservation purpose and no pages will be *physically* alloted for swapping purposes.

But there is one issue that cannot be ignored while using this parameter. swapmem_on allows the system to spawn more processes than the device swap would allow. However, during the pageout situations, you may get into a situation where you would start paging and will not have enough device swap pages to hold the paged out pages which may result in a critical situation.

Also remember, once the kernel starts locking the memory, you will not be able to get the 7/8th number.

So, even if you turn on swapmem_on, it is suggested to add reasonable amount of device swap depending on your application behaviour. 10GB is not too much for a 64bit app.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Jeff Schussele
Honored Contributor

Re: How to allocate all the memory of the HP-UX OS ?

Good point Sridhar.

Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
jean-yves poch
Advisor

Re: How to allocate all the memory of the HP-UX OS ?


Hi,

I agree with you.
To add as many swap that of RAM is stupid.

The choice was simple :

1)We did not need to stop the server

2)The software calculates between 3 and 5 days by job when all the data are in RAM.
There are only one and one job at the same time on the server.
The phase of calculation is an element in chains of design.
Calculations are used for saying if our engineers make bad technical choices. And not for saying if the solution is good.
And thus the answer must be fast.
We prohibit ourselves the use of the swap.
The variable swapmem_on=1 is a temporary help which we must control.
We need really performance.
Thus not of use of the swap.

I thank you for your vigilance.
That enabled us to look further into our reflexion on the operational limits of this server.


Jean-Yves

pitstop
bva
New Member

Re: How to allocate all the memory of the HP-UX OS ?

Recherchons Jean-Yves Poch pour reconstitution P41 (20 ans après).

Si c'est toi, tu peux me répondre par eMail

bva35@free.fr

A+, peut-être ...

Bruno.

PS : si pas concerné alors désolé pour ce message.