1847055 Members
6547 Online
110261 Solutions
New Discussion

kernel tuning

 
SOLVED
Go to solution
Jimmy Kong_1
Frequent Advisor

kernel tuning

Application users have been complaining about slowness. glance snapshot taken on HP-UX 10.20 as follows:
B3692A GlancePlus B.10.31 14:07:39 vuh202 9000/879 Current Avg High
--------------------------------------------------------------------------------
Cpu Util S SAU U |100% 91% 100%
Disk Util | 0% 3% 87%
Mem Util S SU UB B | 93% 92% 94%
Swap Util U UR R | 94% 91% 96%
--------------------------------------------------------------------------------
MEMORY REPORT Users= 102
Event Current Cumulative Current Rate Cum Rate High Rate
--------------------------------------------------------------------------------
Page Faults 22050 52971251 4240.3 796.5 7232.5
Paging Requests 10750 24267221 2067.3 1928.8 3506.8
KB Paged In 0kb 40kb 0.0 0.0 873812.5
KB Paged Out 0kb 0kb 0.0 0.0 0.0
Reactivations 0 0 0.0 0.0 0.0
Deactivations 0 0 0.0 0.0 0.0
KB Reactivated 0kb 0kb 0.0 0.0 0.0
KB Deactivated 0kb 0kb 0.0 0.0 0.0
VM Reads 0 2 0.0 0.0 0.2
VM Writes 0 0 0.0 0.0 0.0

Total VM : 572.0mb Sys Mem : 343.0mb User Mem: 981.5mb Phys Mem: 3.00gb
Active VM: 78.9mb Buf Cache: 1.50gb Free Mem: 211.6mb

The kernel parameter values are attached. I need a second opinion on resolving the slow performance.
10 REPLIES 10
RAC_1
Honored Contributor

Re: kernel tuning

You have 3GB RAM.
I am almost certain that the buffer cache is not properly set. You values for dbc_max_pct is at 50%-the default value. Set it at 10 % and you will be able to free up some memory for users and applications.

Also what do you run on this system??
There is no substitute to HARDWORK
Jimmy Kong_1
Frequent Advisor

Re: kernel tuning

there are 2 oracle databases (SGA ~177mb and ~74mb respectively) running on that machine.
RAC_1
Honored Contributor
Solution

Re: kernel tuning

Oracle does it's own caching. You OS buffer cache is too high. dbc_max_pct is at 50%
In this case 50% og RAM will be used as buffercahe. In your case 1.5 GB. System does not need that much. About 300-500MB is quite generous in your case.

sar -b 1 4
Look at %wcache rate. Should be around 90% or more.

Reduce the dbc_max_pct to 10% and check. you will have more memory for users. Tuning of this parameter will require a reboot.
There is no substitute to HARDWORK
Jimmy Kong_1
Frequent Advisor

Re: kernel tuning

sar -b 1 4 gives the following:
HP-UX vuh202 B.10.20 U 9000/879 10/28/05

14:52:22 bread/s lread/s %rcache bwrit/s lwrit/s %wcache pread/s pwrit/s
14:52:23 0 3321 100 1 3 67 0 0
14:52:24 0 6462 100 1 32 97 0 0
14:52:25 0 7025 100 1 12 92 0 0
14:52:26 3 3472 100 0 5 100 0 0

Average 1 5062 100 1 13 94 0

Reducing dbc_max_pct to 10 has been planned, are the following changes necessary?
1. increase swap space from 512m to ~2gb
2. increase maxdsiz (67m) and maxssiz (8m) to 134m and 16m respectively
3. decrease dbc_min_pct to 2 from 5
RAC_1
Honored Contributor

Re: kernel tuning

1. increase swap space from 512m to ~2gb
2. increase maxdsiz (67m) and maxssiz (8m) to134m and 16m respectively
3. decrease dbc_min_pct to 2 from 5

1. you can. Add it on seperate disk than the primary swap disk. Keep priority same as primary swap. this will do round robin swapping and is good. You might need to tune maxswapcunks kernel tunable.

2. keep as it is. Increase if you encounter any erros.

3. Yes. you can.
There is no substitute to HARDWORK
Jimmy Kong_1
Frequent Advisor

Re: kernel tuning

current maxswapchunk is 4096, how much can I increase that to? Though I have stated ~2gb for swap space, under what circumstances do I need to consider the swap space to be the same as RAM or twice?
vuh202:/tmp#swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 512 0 512 0% 0 - 1 /dev/vg00/lvol2
reserve - 512 -512
memory 2219 2063 156 93%
total 2731 2575 156 94% - 0
We are also looking into adding more RAM and CPU? Should we wait and see after the kernel parms tuning, before adding any more RAM and/or CPU?
RAC_1
Honored Contributor

Re: kernel tuning

If swapcunks is 4096, swap space that can be configured is 8GB. so no need to change it.

But do one thing at a time. Change dbc_max_pct and dbc_min_pct.
There is no substitute to HARDWORK
Jimmy Kong_1
Frequent Advisor

Re: kernel tuning

I didn't mean to add CPU or/and RAM at the same time as tuning the kernel parms. How about increasing the swap space and decreasing dbc_max_pct to 10 from 50 and dbc_min_pct to 2 from 5 for the same reboot?
RAC_1
Honored Contributor

Re: kernel tuning

Go ahead. Add 2GB of swap space. (Again, better on seperate disk than the primaruy swap disk and same priority.)
Make an entry in /etc/fstab to reflect changes after reboot.
/dev/vgxx/lvolx . swap pri=1 0 0

Also tune dbc_max_pct to 10 and dbc_min_pct to 2.
There is no substitute to HARDWORK
Jimmy Kong_1
Frequent Advisor

Re: kernel tuning

Thanks for the advice.
The machine is running faster now after the swap size increment and reduction in dbc_max_pct to 10 and dbc_min_pct to 2 via SAM. However, I don't see any entry for /dev/vg00/lvol2 which was added originally? Is that normal?
swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 512 0 512 0% 0 - 1 /dev/vg00/lvol2
dev 1536 0 1536 0% 0 - 0 /dev/vg01/SWAP
reserve - 897 -897
memory 2304 324 1980 14%
total 4352 1221 3131 28% - 0