Database Reference
In-Depth Information
# ramp up some workload
i=1
for i in $(seq 1 $SESSIONS) ; do
( sqlplus soe/soe\@localhost/${PDB} @burn > /dev/null 2>&1 ) &
done
# get the start time
STARTTIME=$SECONDS
# wait for the background processes to finish
wait
# calculate how long it took
((DURATION=$SECONDS-$STARTTIME))
# and tell us!
echo "elapsed time in seconds on ${PDB}: ${DURATION}"
All it really does is to launch an onslaught of calculations of the square root of an integer:
declare
v number;
begin
for i in 1..1000000000 loop
v := sqrt(v);
end loop;
end;
/
Remember that our resource plan was configured for CPU shares! The I/O portion can safely be ignored. You can
see the system was suitably under pressure as this output from “top” shows:
top - 16:27:31 up 26 min, 7 users, load average: 26.54, 11.49, 5.69
Tasks: 452 total, 25 running, 427 sleeping, 0 stopped, 0 zombie
Cpu0 : 95.7%us, 0.0%sy, 0.0%ni, 4.3%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu1 : 94.7%us, 0.0%sy, 0.0%ni, 5.3%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu2 : 93.7%us, 0.0%sy, 0.0%ni, 6.3%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
[...]
Cpu22 : 95.4%us, 0.0%sy, 0.0%ni, 4.6%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu23 : 87.4%us, 0.0%sy, 0.0%ni, 12.6%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 32994920k total, 26970360k used, 6024560k free, 24028k buffers
Swap: 524284k total, 0k used, 524284k free, 185932k cached
Now to answer the question about resource manager: yes it works. Starting three parallel sessions on the
database server resulted in these execution times:
Elapsed time in seconds on swingbench1: 188
Elapsed time in seconds on swingbench2: 265
Elapsed time in seconds on swingbench3: 266
Search WWH ::




Custom Search