Operating System - HP-UX
1820619 Members
1928 Online
109626 Solutions
New Discussion юеВ

Re: Regarding out of memory error msg

 
Satish Kumar_5
Regular Advisor

Regarding out of memory error msg

Dear Experts,

We are frequently getting an error with the message "Out of memory" and the server doesn't allow login into any of our applications for quite a long time. Telnet sessions also freeze out during this error and release them after very long durations. In fact the output of swapinfo indicates that a lot of swapmemory is still free as mentioned in the attached .txt file.Output of swapinfo and other commands also included.We have about 10 Oracle databases running simultaneously on this server. All these databases are up and are being accessed by 10 different instances of java for different environments. When our application calls resin which calls java the total physical memory gets exhausted while the swap memory is not getting called.It has been configured that java uses heapmemory configured within the physical memory

Thanks a lot for ur valuable help and time.
5 REPLIES 5
Arunvijai_4
Honored Contributor

Re: Regarding out of memory error msg

Hi Satish,

Which version of java you are running ? Download and install the latest (supported as well) version of java and install required and recommended patches,

www.hp.com/go/java should help you.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Steve Steel
Honored Contributor

Re: Regarding out of memory error msg

Hi

This sort of thing is hard to be exact on but you are probably running out of memory due to buffer caching and it takes a while for the daemon to give it back.

ftp://eh:spear9@hprc.external.hp.com/memory.htm


Is a mine of info and a great troubleshooting aid for this sort of thing.


Also see www.hp.com/go/java for java tuning tools available


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Kent Ostby
Honored Contributor

Re: Regarding out of memory error msg

Satish --

You are probably hitting a limit on DISK SWAP SPACE.

While many people like to configure swap mem, you still need to have roughly 2xRAM worth of DISK SWAP SPACE.

If you don't, this is the error message you will get.
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Bill Hassell
Honored Contributor

Re: Regarding out of memory error msg

Because you very small RAM, you are using a *LOT* of swap space which has a huge impact on performance. Now you might add another 5-10 Gb of swap space temporarily to see if the errors go away, but it will not improve performance at all.

Out of memory errors are difficult to troubleshoot because the error message is very non-specific. It's possible that you are truly out of memory (well, virtual memory which is a combinatgion of RAM and swap), but it may also be due to Oracle SGA's fragmenting the shared memory map (does not apply if your HP-UX *and* Oracle are 64 bit), and it may be due to several executables (Oracle, Java code, etc) that are 32bit but not compiled with EXEC MAGIC that allows access to additional memory quadrants.

With so many tasks running at the same time, it will be difficult to find a simple cause, especially if *any* processes are being killed with -9 (NEVER do this in a production system). You may not be up to date on patches which can manifest as memory mapping issues.


Bill Hassell, sysadmin
Emil Velez
Honored Contributor

Re: Regarding out of memory error msg


Every time you start a process you need to reserve swap memory for that process. If you have 2 GB of swap once you run 2GB of processes then you cannot reserve any more swap and you will get a error out of memory.

The amount of physical memory you have is a performance issue and limitation.

HP implements something called pseudo swap which basically recognizes that some programs will never need to swap pages out.

This is implementted in a kernel tunable called swapmem with a default value.

SO if you have 1 GB of Physical memory and 2GB of swap then you have 2.75 GB of reservable swap memory.

SO after you run 2.75GB of reserved swap (no matter how much memory you are using and no matter how much is actually in memory) you will get that error.

I hope this makes sense.. Good luck