Re: NUMAIOVPS setting
Posted in 2004
Hi Andy,
The best way I've come up with getting an overall feel for how many is
needed, is to combine the Informix 'onstat -g glo' information with that of
the operating system 'ps -ef'.
Here are two scripts you can use as examples...
<-------- vpscheck1.sh script -------->
#!/bin/sh
# Usage vpscheck1.sh [aio|cpu|adm|pio|lio]
trap "rm $$.db" 0
# step 1) get: vpnum pid vpclass (sort by pid)
onstat -g glo | grep -v total | grep "$1" |
awk '{if(NF==6)print $1, $2+10000, $3}' |
sort -b -n -k 2,2 > $$.db
# step 2) get: time pid (sort by pid)
ps -ef | grep oninit | grep -v grep |
awk '{if($6=="?")time=$7; else time=$8;
print time,$2+10000}' |
sort -b -n -k 2,2 |
# step 3) combine steps 1 and 2:
join -j 2 -o 1.1,1.2,1.3,2.1 $$.db - |
sed -e "s/:/ /g" |
# step 4) convert: vpnum pid vpclass minutes
awk '{printf("%s %s %s %d\\n",
$1,$2-10000,$3,($4*60)+$5);}' |
sort -b -n -r -k 4,4 |
# step 5) display: vpnum pid vpclass minutes
awk '
BEGIN {
printf("\\nvp# class pid cpu-min\\n");
printf("---------------------------\\n");
}
{ printf("%3s %-3s %5s %9.2f\\n",
$1,$3,$2,$4/60); }
END { printf("\\n"); }'
<--- end --->
<-------- vpscheck2.sh script -------->
#!/bin/sh
# Usage vpscheck1.sh [aio|cpu|adm|pio|lio] | vpscheck2.sh
# step 6) display: workload usage
egrep -v "^$|^vp|^--" |
awk ' { vps[++num]=$4; total+=$4; }
END {
for(a in vps) { ap=vps[a]/total*100;
printf("%3.3f %% workload handled by vps#%03d\\n", ap, a);
} }' |
sort -b -k 6,6 |
awk '
{ printf("%s \\t--> workload total = %.2f %%\\n", $0, sp+=$1); }'
<--- end --->
The above was tested on Informix 7.31 with HP-UX 11.11.
As you will see, there is a diminishing of returns as you add more and more
VPS's for a class. If you find that the AIO at the bottom of the pyramid is
actually being used (ie, there is cpu usage), you may consider the
'workload total' to see just how much added benefit it is giving you...
For example, a 'workload total' of 100% with a 'bottom of the pyramid' AIO
giving 5% benefit may only require 40 AIO VPS's. A 'workload total' of
100% with a near zero percent for the 'bottom of the pyramid' AIO, means
that whenever an AIO VPS is needed, there is one available -- leaving
little or no async i/o requests hanging around in the queue -- that is,
little or no async i/o's waiting for an available AIO process. However, to
shrink the 'bottom of the pyramid' from 5% to 0% may require an additional
35 AIO VPS's.
BTW, you may want to consider Kernel AIO (KAIO). See the release notes at
$INFORMIXDIR/release/*/* to see if it is supported.
Good luck,
-Tim
"Bent_Andy"
<abent@aetinc.com> To: <informix-list@iiug.org>
Sent by: cc:
owner-informix-lis Subject: NUMAIOVPS setting
t@iiug.org
05/24/2004 10:47
AM
HP-UX 11.11 - 7.31.fd5 - Baan IVc4 (OLTP)
I have a question about numaiovps. Our current setting is 52 and we
have 68 chunks. Notes from a performance class say if onstat -g ioq
shows maxlen > 25 then time to add more aiovps. The system is not slow,
I am only looking to improve performance.
Doing a search on cdi:
Art Kagel says "7.3x 1-1.5 per chunk plus a few extras."
Madison Pruet: "Generally what I do is to check onstat -g iov. This
will display the io activity of each of the vps. What I look for is an
inverted pryamid on the aio VPs. The first should have a rather high
io/s field. At some point, this should approach zero. Once I have
several aio VPs that are below 1.0 io/sec, then I know that I've gone
past the point where adding aioVPs will do any good. You might want to
examine onstat -g iov to determine if you will gain any practical
advantage by adding additional aioVPs."
Based on the output below, do I need to add more aio vps?
onstat -g ioqq name/id len maxlen totalops dskread dskwrite dskcopy
adt 0 0 0 0 0 0 0
msc 0 0 1 1387 0 0 0
aio 0 0 51 228 34 6 0
onstat -g iov
AIO I/O vps:class/vp s io/s totalops dskread dskwrite dskcopy wakeups io/wup
errors
msc 0 i 1.0 450204 0 0 0 450060 1.0
0
aio 0 s 11.9 5621387 5565146 52144 0 5443752 1.0
0
aio 1 i 11.0 5193030 5139920 52600 0 5034246 1.0
0
aio 2 i 10.2 4812009 4755547 52519 0 4662685 1.0
0
aio 3 i 9.4 4441062 4387927 52561 0 4305144 1.0
0
aio 4 i 8.4 3960855 3908214 52144 0 3833875 1.0
0
aio 5 s 6.8 3209144 3156686 52050 0 3092328 1.0
0
aio 6 s 5.9 2770143 2717850 51842 0 2659455 1.0
0
aio 7 s 5.3 2477346 2424829 52209 0 2375016 1.0
0
aio 8 i 4.7 2216737 2165108 51409 0 2119768 1.0
0
aio 9 s 4.2 1986931 1935263 51502 0 1896927 1.0
0
aio 10 i 3.8 1788848 1737954 50739 0 1705304 1.0
0
aio 11 i 3.4 1615150 1564533 50496 0 1537729 1.1
0
aio 12 i 3.1 1465034 1414838 50089 0 1393282 1.1
0
aio 13 i 2.8 1334102 1284303 49717 0 1266368 1.1
0
.......
aio 42 i 0.6 283402 238669 44730 0 202147 1.4
0
aio 43 i 0.6 279139 234368 44765 0 194185 1.4
0
aio 44 i 0.6 274000 229338 44660 0 186691 1.5
0
aio 45 i 0.6 270863 226257 44604 0 179108 1.5
0
aio 46 i 0.6 269319 224544 44774 0 172231 1.6
0
aio 47 i 0.6 269227 224147 45079 0 165614 1.6
0
aio 48 i 0.6 271074 225345 45728 0 158997 1.7
0
aio 49 i 0.6 274434 228433 45996 0 152370 1.8
0
aio 50 i 0.6 285348 238643 46699 0 145705 2.0
0
aio 51 i 0.7 311878 264228 47649 0 138893 2.2
0
Stats reset 130:46:18 ago.
Thanks,
Andy Bent
sending to informix-list
sending to informix-list