how frequent do you run "onmode -F"
Posted in 2006
Topics: Server Administration
Hi,
Just want to have a feel what is t= he frequency you run the "onmode
-F" as a crontab ?
Best&= nbsp;Regards,
Dominic Seah
64616826
= Disclaimer:-
The information contained and transmitted by this e-mail = is intended
for use only by the individual or entity to which it is address= ed
and may contain information that is privileged, confidential or exem=
pt from disclosure under applicable law.
If you are not the inte= nded recipient or it appears that this mail
has been forwarded to you witho= ut proper authority, you are hereby
notified
that any use, di= stribution, printing, copying or dissemination of
this e-mail in an= y manner or taking action in reliance on the
contents of this
e-mail = is strictly prohibited.
If you have received this e-mail in erro= r, please notify us
immediately at paullee@parkway.sg and permanently d= elete the
original and
any copy of this e-mail and any printout there= of.
=
Dominic
Somewhere between in frequently and never! If you are getting many
segments added you need to increase SHMVIRTSIZE (and possibly SHMADD).
Why do you feel you need to run onmode -F??
Keith
On 06/11/06, Dominic Seah Chin Teck <dominic@parkway.sg> wrote:
>
> Hi,
>
> Just want to have a feel what is t= he frequency you run the "onmode
>
> -F" as a crontab ?
>
> Best&= nbsp;Regards,
>
> Dominic Seah
>
> 64616826
>
> = Disclaimer:-
>
> The information contained and transmitted by this e-mail = is intended
>
> for use only by the individual or entity to which it is address= ed
>
> and may contain information that is privileged, confidential or exem=
>
> pt from disclosure under applicable law.
>
> If you are not the inte= nded recipient or it appears that this mail
>
> has been forwarded to you witho= ut proper authority, you are hereby
>
> notified
>
> that any use, di= stribution, printing, copying or dissemination of
>
> this e-mail in an= y manner or taking action in reliance on the
>
> contents of this
>
> e-mail = is strictly prohibited.
>
> If you have received this e-mail in erro= r, please notify us
>
> immediately at paullee@parkway.sg and permanently d= elete the
>
> original and
>
> any copy of this e-mail and any printout there= of.
>
> =
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
> Dominic Seah Chin Teck wrote
> Hi,
>
> Just want to have a feel what is t= he frequency you run the "onmode
> -F" as a crontab ?
This depends on your DB version. In IDS 9.x it shouldn't be necessary
at all. IDS 9.x frees memory automatically from session pools.
In IDS 7.x the policy on memory allocation by sessions was different .
In IDS 7.x a session keeps all the memory it gets and never released it
back to
the free memory blocks. 'onmode -F' would loop through all sessions
pools
then and return any available blcoks back to the free blocks in shared
memory.
These free blocks can then be reused by other sessions.
The advantage of behaviour in IDS 9.x is more efficient memory
management
The disadvantge is higher pressure on CPU cycles (more latching and busy
waits)
See also IBM Technote 1222085 .
As for the frequency to run 'onmode -F' , I'd run it every time the
number of freeblks is less then a certain threshold (depending on
your own instance).
You may use this little skript to do that - adjust to your needs.
HTH
Tilman
-----------------------------------------------------------------------
#!/bin/sh
###############################################################
# onmode_F_check.sh #
# A little skript to run onmode -F only when needed #
# #
# Adjust INFORMIXSERVER, INFORMIXDIR, etc to fit your needs #
# Author: Tilman Model-Bosch, Apr 03 2001 #
# #
###############################################################
LOGFILE=/tmp/onmode_F.log
INFORMIXSERVER=<informixserver>
INFORMIXDIR=<informixdir>ONSTAT=$INFORMIXDIR/bin/onstat
ONMODE=$INFORMIXDIR/bin/onmode
while true
do
NUM_VIRTUAL_SEGS=`$ONSTAT -g seg | grep ' V ' | wc -l`
echo "Number of virtual shared memory segments: $NUM_VIRTUAL_SEGS" \\\\
>>$LOGFILE
FREEBLKS=`$ONSTAT -g seg | grep ' V ' | awk '{sum+=$8}END{print
sum}'`
echo "Number of free blocks in Virtual Shared memory = $FREEBLKS "\\\\
>> $LOGFILE
echo "\\
" >> $LOGFILE
if [ $FREEBLKS -le 1000 ] || [ $NUM_VIRTUAL_SEGS -ge 5 ]
then
$ONMODE -F
echo "onmode -F executed at `date` " >> $LOGFILE
echo "\\
" >>$LOGFILE
fi
sleep 900
done