1833151 Members
3552 Online
110051 Solutions
New Discussion

Memory & Swapinfo

 
Doug Robb
Occasional Contributor

Memory & Swapinfo

I have a D370 with 512M of memory and two Oracle databases running. I have noticed when I run swapinfo that on the line for memory it is showing 381M allocated. When users are accessing the system that the percentaged used can go up to 78%. The only time this decreases is when I reboot the server. Shouldn't the percentage decrease when a users process ends? I'm trying to determined if I have a memory leak or do I need to upgrade my memory. Need all the help I can get.

Doug Robb
OMI Corporation
3 REPLIES 3
Rob Smith
Respected Contributor

Re: Memory & Swapinfo

Doug,
Couple of things. You might want to add more swap, either device or file system swap, preferably device, as a temporary boost. Another 256MB of RAM might be a good idea as well.

But before you do all that I think some investigating is in order. If you have glance installed you can use it to see what processes are using up all your memory, lsof is another great tool for tracking processes. Another thing to take into account is the size of your databases. Two large databases might be taking up a considerable chunk of memory. I have been working with Oracle for a while and I have never had a problem with memory leaks but I am sure that is a possibility as well. Hope this helps.

Rob
Learn the rules so you can break them properly.
Vincenzo Restuccia
Honored Contributor

Re: Memory & Swapinfo

Add secondary swap with SAM.
Ed Ulfers
Frequent Advisor

Re: Memory & Swapinfo

Senior Oracle DBA replying...
I also have D370's and D390's with multiple Oracle databases.

An Oracle database typically starts with its memory allocated in HP-UX, but does not generate OS memory pages as active until Oracle requires this memory. This is often misinterpreted as a memory leak (since memory usage ramps over time, limited to the specified Oracle size in the init.ora file), when it is actually a configurable parameter in Oracle. To configure Oracle so that it starts with all memory pages active (i.e., touches all memory so that it is marked in swap), there is an Oracle parameter "pre_page_sga".

To check if it is a memory leak:
1-Check the memory/swap size/usage before the Oracle databases are started.
2-After Oracle is running for some time, stop the databases (make sure to schedule/notify users of your plan).
3-Make sure that all oracle PID's have been terminated (viewed from 'ps -ef').
4-Make sure all Oracle IPC's are released (viewed from 'ipcs -a'), which should have normally occurred during database shutdown.
5-Compare memory/swap usage to the initial values. Make judgement calls on this information
6-Return databases to notmal functionality (inform users maintanence time is completed).

The other thing to check is your Oracle patch level, new oracle patches are always being released (just like HP-UX patches & patch bundles). Your memory leak issue may be a known bug that is already patchable, but you just did not apply the patch yet.

Hope this helps. If you need additional insight, email me at "Ed_Ulfers@Festo.com"
Put a smile on your users face, offer them a kiss (Hershey's Kiss).