Operating System - HP-UX
1753261 Members
5102 Online
108792 Solutions
New Discussion юеВ

Re: Memory and Disk swap modification

 
John Love_3
Regular Advisor

Memory and Disk swap modification

Is it possible to specify how much memory is used for swap?

I have 2 N-Class servers both running Oracle. Each has 2GB of Ram, and is using 1.5 of that for swap.
The Oracle developers want me to change that to 500MB memory for swap.

Here's a paste of my swapinfo

TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1048576 512344 536232 49% 0 - 1 /dev/vg00/lvol2
reserve - 536232 -536232
memory 1563360 1501560 61800 96%

Let me know what I should do. The Syncher is very busy also. I probably need to add more ram but short of that, is there anything I can do to improve this situation?
5 REPLIES 5
Rita C Workman
Honored Contributor

Re: Memory and Disk swap modification

Well lvol2 is set up when the box was ignited. It's the device swap area that is used for dumps when the system panics also. So (although there is an authorized and unsupported way to reduce lvol2) I do not recommend trying to reduce lvol2. You can add more device swap.
Usually the problem can often be 'helped' by looking at all the factors here. Likely, your pseudo swap is turned on (which I prefer..). I would start by looking at my dbc_max_pct and dbc_min_pct. The default settings for these are max/min of 50/5. I strongly suggest that if your settings are at the default values you consider changing them. This means that 50% of your swap just got reserved....Ouch!. I recommend max/min of 10/5. Now some folks like to put their max a little higher say to 15 or 20, and if you have the resources then OK, but generally max of 10 will work just fine.
Now this is just addressing one parm issue - but I have found that often it's the one that is easily ignored and yet can impact memory so much. I don't know if this is true in your case though. Hope it helps,

/rcw
John Love_3
Regular Advisor

Re: Memory and Disk swap modification

I'm looking more to reduce the amount of Ram that is being used as swap.
There is 1.5GB being used and the Oracle people want me to free that up for Oracle.

Is that possible? Will HP-UX just use whatever is not used by the Kernel and it's modules?

If it is possible, how do I do that?

I'll look at the settings you mentioned, Rita, but I don't know if that's my problem. I don't want to resize my lvol2 swap, just my memory if possible.

Thanks again!
Rita C Workman
Honored Contributor

Re: Memory and Disk swap modification

I think maybe you it would help you to understand what swap (pseudo swap) and memory are and what they are really doing. Check and see if you have pseudo swap turned on..
http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xa464dfe5920fd5118fef0090279cd0f9,00.html

What I was trying to suggest (albeit poorly) was that to get the most of your system resources, is often a matter of tweeking your kernel parms. I took a closer look and your reserve amount of 500+mb this is 25% of your total RAM. If you want to free up some memory for use overall, then see if your dbc_max_pct is set to 25 - and possibly reduce this to 15 or even 10. If you feel you need additional device swap then set up some on a seperate disk (or some folks prefer file system swap...the choice is yours), but your swapinfo does not show you hitting this more than 49%, so your device swap was not maxed.
The best system performance is often gained by how the parms are tuned. This is one of the hardest things (in my opinion) to learn and do, but it gives greatest rewards when they are set well. Putting more memory (hardware) is always helpful...but even then if it's not tuned well with the kernel parms...you will not get the most benefit.

I hope the above thread will help,
/rcw
John Love_3
Regular Advisor

Re: Memory and Disk swap modification

Rita,
My dbc_max_pct is set to 50. What exactly is that doing?
I do not understand this very well (OBVIOUSLY!).
Perhaps you could explain what this dbc_max_pct is better, and also in the past of my swapinfo command the last line shows memory and some values and a percentage 96%. What is that showing? I looks to me that 96% of the 1.5GB of ram (swap?) is being used. is this correct?
Should I lower the dbc_max_pct as you stated to 15?

Thanks again!
Paul McCleary
Honored Contributor

Re: Memory and Disk swap modification

Hi John,

Firstly, your system is not using 1.5GB of RAM for swap, it is using 1.5GB of disk space for swap, of which you are using about 750MB, so to cut that to 500MB would not be a wise move!

Bascially, dbc_max_pct is the maximum % of system memory that the O/S can use for buffer cache and dbc_min_pct is the minimun amount of memory locked for buffer cache.

The 50% value is often too high for systems with RAM of >=1GB and should be reduced to 20-30%, possibly 15-20% would be OK for u?

The memory paging area refers to that used by psuedo-swap, which is used for paging when the other swap areas are full. As they are not full this figure of 96% shows that the system is memory bound and is why your Oracle guys are asking for more memory. By reducing dbc_max_pct you should be able to free up some memory.

I would record some stats now, swapinfo, memory usage, buffer cache hit ratio/usage etc.., reduce dbc_max_pct and reboot to rebuild the kernel. Now record the stats again. This should have improved your performance.

From the Oracle side you might want to look at tuning the SGA, if this is setup incorrectly and/or your database is not well designed this could also impact performance.

If none of this works, it will probably be advisable to increase your system memory.

I hope this helps, give us a shout if u get stuck.

Regards, Paul