|
Intermediate test result, Oracle 10.2.0.4 on RHEL 4:
On server 1, start 4 tight loop bash processes:
while true; do :; done &
while true; do :; done &
while true; do :; done &
while true; do :; done &
col metric_name for a25
select inst_id, round(value,1) val, metric_name, intsize_csec int from gv$sysmetric where metric_name in ('Host CPU Utilization (%)', 'Database Time Per Sec', 'CPU Usage Per Sec') order by metric_name, intsize_csec, inst_id;
INST_ID VAL METRIC_NAME INT
------- ------------ ------------------------- ------------
1 .4 CPU Usage Per Sec 6010
2 1.5 CPU Usage Per Sec 6010
1 8.5 Database Time Per Sec 1502
2 .8 Database Time Per Sec 1503
1 1 Database Time Per Sec 6010
2 2.1 Database Time Per Sec 6010
1 99.9 Host CPU Utilization (%) 1502
2 18.1 Host CPU Utilization (%) 1503
1 98.6 Host CPU Utilization (%) 6010
2 17.6 Host CPU Utilization (%) 6010
New sqlplus session using a service with service_time as goal does not always go to node 2. So it's not based on "Host CPU Utilization (%)". It seems to correspond to "CPU Usage Per Sec". But needs more test to confirm. This "CPU Usage Per Sec" is obviously a DB specific metric, not related to OS level CPU load or run queue.
Will post again once data is obtained.
Yong Huang
Actually, a better query to check the correlation between load balance redirection and system metric is:
select inst_id, round(value,1) val, metric_name, round(intsize_csec,-3) int
from gv$sysmetric
where metric_name in ('Host CPU Utilization (%)', 'Database Time Per Sec', 'CPU Usage Per Sec', 'Executions Per Sec', 'Redo Generated Per Sec', 'SQL Service Response Time')
order by metric_name, round(intsize_csec,-3), inst_id;
I added a few more metrics that look like possible metrics to control redirection. The name 'SQL Service Response Time' sounds very promising to correlate with service_time goal for a service. The value for this metric is very small so round() should be removed.
Yong Huang
[ 本帖最后由 Yong Huang 于 2009-12-18 22:22 编辑 ] |
|