Documente Academic
Documente Profesional
Documente Cultură
Clients
IDS SDS Instance
OFFLINE
Scale Out Dynamic addition of Informix SDS Server
vPar1: Infx01
Shared Storage
vPar2: Infx02
IDS Primary Instance
ONLINE
IDS SDS Instance
ONLINE
Clients
Connection Manager
Informix
9
The results in Figure 6 show that as the workload on Infx01 exceeds the policy setting in the Informix
monitor script, it triggers the Informix SDS secondary server on Infx02 to startup. When the Infx02
SDS instance is started the Informix Connection Manager redirects connections to utilize the new
Informix instance. When the workload on Infx01 and Infx02 stops the Informix monitor script can
shutdown the SDS instance on Infx02. Note the Informix Connection Manager only redirects new
sessions, existing sessions already connected to Infx01 will continue to run on Infx01 until they
disconnect.
Figure 6. Dynamic Scale Out on Infx02
Infx01 (vPar1) server utilization
Infx02 (vPar2) server utilization
10
Conclusions
These scale up and scale out building blocks can be built from any model of HP Integrity or HP 9000
servers the specific model and configuration depends on the number and capacity needs of the
databases hosted.
The rationale behind this configuration is higher server utilization and simplicity:
Higher server utilization: Enterprise workloads typically exhibit CPU utilization profiles that allow
them to be consolidated on the same server. This is because the peaks of individual workloads do
not typically occur at the same time. These applications can thus use the HP Virtual Server
Environment to consolidate the workloads and provide better overall server utilization with less
active core counts and reduce costs.
Efficient high availability: In a dedicated infrastructure, each database instance may need to have
a dedicated standby server to handle failures. In a VSE infrastructure, a single server can serve as a
production server as well as a failover host.
Better quality of services: With HP VSE computer resources are shifted to match the varying
workloads and maintain Service Level Agreements (SLAs).
Lower administration costs: Consolidating multiple workloads on a single instance of HP-UX or
within a single HP-UX complex managed by gWLM, helps reduce the management and support
costs of multiple servers and OS instances. HP VSE provides an ideal balance between isolation
among multiple workloads and flexibility in sharing server resources. HP-UX 11i offers the robust
foundation to consolidate a large number of workloads.
The flexibility of the HP Virtual Server Environment and the powerful high availability and scaling
features of IDS can function extremely well together to satisfy the dynamic, ever changing needs of
todays enterprise customers. This paper only validates the functionality of two common ways to
deploy IBM Informix Dynamic Server in an HP Virtual Server Environment architecture. This paper
does not consider the licensing requirements of Informix Dynamic Server. Customers should consult
their Informix sales representative to assure they comply with their licensing requirements when
deploying Informix Dynamic Server in a Virtual Server Environment.
The scripts presented in this paper are very basic sample scripts and may not be suitable for all
customer environments. They are intended to show a simplistic approach at achieving scale up, scale
out, and scale back techniques. As an alternative to using an external script in the scale up scenario,
database administrators can pre-configure Informix with additional Informix CPUVPs in order to utilize
any additional physical CPUs if they are dynamically added to the Informix server after Informix
Dynamic Server is started. Additionally, when performing a scale back after a scale out, care must be
taken to shutdown the secondary server gracefully without terminating currently connected user
sessions to prevent client application connection errors, the sample scripts do not gracefully
disconnect user sessions and assumes the client application will handle the session shutdown
gracefully.
HP VSE Reference Architectures are designed to help you apply VSE in your IT solutions with ease
and efficiency. This white paper provided an overview of the VSE Reference Architecture for Informix
Dynamic Server database environments. For more information on the HP Virtual Server Environment
and HP VSE Reference Architectures, visit:
www.hp.com/go/vse
www.hp.com/go/vsera
11
Appendix A: Informix monitor scripts
getnumcores.c
#include <sys/mpctl.h>
#include <stdio.h>
main() {
int ncores;
ncores=mpctl(MPC_GETNUMCORES);
printf("%d\n", ncores);
}
Informix-ScaleUp-Monitor.sh
export intervaltime=15 # amount of seconds to wait between polling
export basecpuvps=4 # base number of Informix CPUVPS
export numcpuvps=$basecpuvps
while true
do
export currnumcores=`getnumcores`
# Don't allow adjustment of CPUVPS below the base level
if [ $currnumcores -lt $basecpuvps ]
then
export currnumcores=$basecpuvps
fi
# If there are more Physical CPUS then Informix CPUVPS / Add CPUVPS
if [ $currnumcores -gt $numcpuvps ]
then
export diffcores=`expr $currnumcores - $numcpuvps`
echo "onmode -p +${diffcores} cpu"
# onmode -p +${diffcores} cpu
numcpuvps=$currnumcores
fi
# If there are fewer Physical CPUS then Informix CPUVPS / Remove CPUVPS
if [ $currnumcores -lt $numcpuvps ]
then
export diffcores=`expr $numcpuvps - $currnumcores`
echo "onmode -p -${diffcores} cpu"
# onmode -p -${diffcores} cpu
numcpuvps=$currnumcores
fi
sleep $intervaltime
done
12
Informix-ScaleOut-Monitor.sh
export hightrigger=300 # Maximum amount of CPU utilization before triggering Scale Out
export lowtrigger=50 # CPU utilization threshold required to trigger Scale Back
export intervaltime=15 # amount of seconds to wait between polling
export triggercount=5 # number of consecutive polling samples before triggering
export tempfile=/tmp/topoutputfile.txt # temporary file for top output data
export remotesystem=infx02 # secondary server hostname
export scaleoutcommand="oninit -vy" # command to issue to start SDS secondary
export scalebackcommand="onmode -ky" # command to issue to stop SDS secondary
scaleout=0
export i=1
while true
do
# Collect Top CPU Utilization data
cat /dev/null > $tempfile
[ ! -f "$tempfile" ] && echo "Can't Create Temp File"
top -h -f $tempfile
# Calculate oninit CPU utilization
if [ `grep oninit $tempfile | wc -l` -gt 0 ]
then
export oninitutilization=`grep oninit $tempfile | awk '{s += $11} END { print s}'`
else
export oninitutilization=0
fi
if [ scaleout -eq 0 ] # if not already scaled out / check to see if we need to scale out
then
# Determine if Current Oninit utilization is exceeding limits
if [ ${oninitutilization} -gt ${hightrigger} ]
then
echo "onninit utilization is above high water mark for $i interval(s)"
i=`expr $i + 1`
else
i=1
fi
if [ ${i} -gt ${triggercount} ]
then
echo "Triggering Scale Out"
echo "remsh $remotesystem $startupcommand"
remsh $remotesystem $startupcommand
scaleout=1
fi
else # if already scaled out / Check to see if we need to scale back
# Determine if Current Oninit utilization is lower than low limit
if [ ${oninitutilization} -lt ${lowtrigger} ]
then
echo "onninit utilization is below low water mark for $i interval(s)"
i=`expr $i + 1`
else
i=1
fi
if [ ${i} -gt ${triggercount} ]
then
echo "Triggering Scale Back"
echo "remsh $remotesystem $scalebackcommand"
remsh $remotesystem $scalebackcommand
scaleout=0
fi
fi
echo "Current Utilization $oninitutilization"
sleep $intervaltime
done
13
For more information
HP Virtual Server Environment, http://www.hp.com/go/vse
HP VSE Management Software Installation,
http://docs.hp.com/en/T2786-90101/T2786-90101.pdf
HP VSE Tips for Application Developer,
http://docs.hp.com/en/9450/vse_tips_for_application_developers.pdf
HP Virtualization Technology, http://www.hp.com/go/virtualization
HP Systems Insight Manager, http://www.hp.com/go/hpsim
HP Systems Insight Manager Installation and Configuration Guide,
http://docs.hp.com/en/5991-4498/5991-4498.pdf
HP Serviceguard: http://docs.hp.com/en/ha.html
HP Instant Capacity, http://www.hp.com/go/utility
HP Integrity server: http://hp.com/go/integrity
HP Integrity Essentials, http://www.hp.com/go/integrityessentials
HP Integrity Essentials Global Workload Manager (gWLM), http://www.hp.com/go/gwlm
For gWLM white papers and documentation, click the Information Library link on the right
For gWLM online help, access online help in Systems Insight Manager by selecting Tools
VSE Management, followed by the tab Shared Resource Domain, and then the question mark
[?] in the top right corner
IBM Information Management Informix Product Family,
http://www-306.ibm.com/software/data/informix
To help us improve our documents, please provide feedback at www.hp.com/solutions/feedback.
2008 Hewlett-Packard Development Company, L.P. The information contained
herein is subject to change without notice. The only warranties for HP products and
services are set forth in the express warranty statements accompanying such
products and services. Nothing herein should be construed as constituting an
additional warranty. HP shall not be liable for technical or editorial errors or
omissions contained herein.
Intel and Itanium are trademarks of Intel Corporation in the U.S. and other countries.
4AA1-9747ENW, April 2008