Date post: | 30-Jan-2016 |
Category: |
Documents |
Upload: | caroline-dennis |
View: | 217 times |
Download: | 0 times |
Informix Dynamic Server in aInformix Dynamic Server in aLinux-based EnvironmentLinux-based Environment
Craig SzczublewskiCraig SzczublewskiUnique Systems, Inc.Unique Systems, Inc.
Informix User Forum 2005 Moving Forward With Informix
Atlanta, Georgia December 8-9, 2005
Informix User Forum 2005 Moving Forward With Informix
Section 1: Linux - A Brief History
Foundations: An operating system born of the Internet
The Current State of Linux
A Sample of Major Linux-based Distributions
Informix User Forum 2005 Moving Forward With Informix
Linux: A Brief History
Foundations: An operating system born of the InternetAugust 25, 1991 (comp.os.minix) by Linus Benedict Torvalds
"I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones..."
1998 Informix Ported to Linux,SMP Kernel work begins
1999 Compaq, HP, Dell offer Linux basedsystems, Red Hat goes IPO
2000 Suse releases supported distro forIBM S/390
2001 IBM Invests $1 Billion in Linuxdevelopment
2002 Red Hat goes commercial only, announces Fedora Project
2003 Novell acquires Suse2004 2.6 Kernel released2005 Year of migration, fast adoption rate
Informix User Forum 2005 Moving Forward With Informix
1991 Linux version 0.1 released (kerneland a few basic utilities)
1992 SLS, the first standalone Linuxinstall, around 10MB
1993 Slackware founded – born from SLSnow at version 10.2
1994 Linux gains notice of the press, Linux Journal founded, Red Hat 1.0
1995 Linux version 1.2 released, many new distros form
1996 Alternate ports start to appear, MIPS, Alpha, etc.
1997 First Linux “virus” discovered
Informix User Forum 2005 Moving Forward With Informix
Linux: A Brief History
The Current State of Linux
o Linux is one of the world's fastest-growing operating systems.
o Growth of 16% in 2003, 35% in 2004. Outsold all other Unix
combined in 2003, exceeded all Unix installs in 2004.
o Ported to every major hardware platform: Intel, PPC, Alpha,
Sparc, Itanium, Mainframe.
o Supported by every major hardware vendor.
o Linux: Flexibility, Security, and Reliability
Informix User Forum 2005 Moving Forward With Informix
Linux: A Brief History
A Few of the Major Linux-based Distributions
Section 2: Why IDS on Linux?
Informix User Forum 2005 Moving Forward With Informix
64-bit Platform Support
Wide Variety of Hardware Platforms
IBM is a leader in hardware and software offerings for Linux
Support for the version 2.6 Kernel
Processor Affinity
SNMP Agent Support
Interprocess Communication with Stream Pipes
User Configurable Page Sizes
Informix User Forum 2005 Moving Forward With Informix
Why IDS on Linux?
64-bit Platform Support
o Increased performance of database servers, as well as
database applications.
o 32-bit platforms have an inherent address-space
limitation of 4 Gigabytes.
o 64-bit allows for the creation of larger buffer pools, sort
heaps, package caches, and other memory consuming
items.
o End result: bigger files and more memory.
Informix User Forum 2005 Moving Forward With Informix
Why IDS on Linux?
Wide Variety of Hardware Platforms
o x86 (32-bit Xeon, Pentium, AMD)
Support for legacy systems
o 64-bit EM64T (x86-64), IA64 (Itanium),
AMD64 Opteron & Athlon
o Power (iSeries, pSeries, OpenPower)
o zSeries
Informix User Forum 2005 Moving Forward With Informix
Why IDS on Linux?
IBM is a leader in hardware and software offerings for Linux
o Invested $1 Billion in Linux development across
all platforms.
o Linux Technology Center: designed to accelerate the
enterprise growth of Linux.
o Chiphopper: ISVs can port and test Linux
applications across all IBM platforms supporting
Linux.
o Over 7,000 service professionals working with Linux.
Informix User Forum 2005 Moving Forward With Informix
Why IDS on Linux?
Support for the version 2.6 Kernel
KAIO - Kernel Asynchronous I/O
o Allows applications to overlap processing with I/O operations
o Processes do not need to wait for I/O requests to complete
o Supported on character and block devices (raw or cooked)
o Enabled by default
o Requires a minimum libaio of 0.3.96-3
DIO - Direct I/O
o Direct I/O is turned ON when KAIO is enabled and a 2.6.x kernel
o An alternative caching method that reduces CPU utilization
o Data is transferred directly between the user buffer and the disk
o Usually beneficial when using cooked files
Informix User Forum 2005 Moving Forward With Informix
Why IDS on Linux?
Processor Affinity
o Allows to bind certain processes to a CPU or set of
CPUs overriding the default system scheduler.
o Beneficial in SMP and NUMA architecture.
o Increased chance the processor cache will contain
relevant data.
o May require experimenting to realize performance
benefits.
o Recently backported to run in a 2.4 kernel environment.
Informix User Forum 2005 Moving Forward With Informix
Why IDS on Linux?
SNMP Agent Support
o Based on the PEER Network's SubAgent Development Kit.
o Check engine availability, chunk status, table space.
o Allows for integration into existing network and system
monitoring utilities.
o Currently limited to running on a host with only one server.
o Cannot run in conjunction with other system SNMP agents.
$INFORMIXDIR/bin/snmpdp $INFORMIXDIR/snmp/peer/CONFIG NOV$INFORMIXDIR/bin/onsrvapd -l /tmp/onsrv -g 64
(note, snmpdp is not located in $INFORMIXDIR/peer per the release notes)
Why IDS on Linux?
Informix User Forum 2005 Moving Forward With Informix
Interprocess Communication with Stream Pipes
o Provides: A full-duplex communication path between two processes.
o Security: Stream pipes do not pose the security risk of being
overwritten or read by other programs that explicitly access the
same portion of shared memory.
o Flexibility: Stream Pipe connections allow distributed transactions
between database servers that are on the same computer.
o Disadvantage: connections might be slower than shared-memory
connections.
Informix User Forum 2005 Moving Forward With Informix
Why IDS on Linux?
User Configurable Page Sizes
o Fewer (but bigger) I/O operations for data and indices
o Less internal fragmentation on pages
o Longer rows fit into a single page
o Larger data pages maximize disk scan rates
o May improve table scan performance
o Caution: Large pages do not always reduce fragmentation
Section 3: IDS Installation
Informix User Forum 2005 Moving Forward With Informix
Preparing Disk Space under Linux
Maintaining the Latest Packages for Your OS
Starting the version 10 installer
Post Installation Tasks With Linux
Informix User Forum 2005 Moving Forward With Informix
IDS Installation
Preparing Disk Space under Linuxo Partition types available (ext2, ext3, jfs, xfs) Do not use SuSE
reiserfs which has performance issues in an IDS installation.
o Raw device definitions (distribution dependent)
SuSE: /etc/raw, Red Hat-ish: /etc/sysconfig/rawdevices
o Newer releases treat raw links as deprecated. With 2.6 kernel and
KIO it should not be necessary as you can use block dev
o Most drives will support 15 partitions under Linux, some RAID
controllers will only allow for 7.
Invoke using: fdisk devname (/dev/hda, /dev/sda, etc.)
Initialize new partition using: mke2fs partname
Informix User Forum 2005 Moving Forward With Informix
IDS Installation
Maintaining the Latest Packages for Your OS
o For production servers, try and minimize the installed
packages which are not necessary to the server workload.
o Will probably require compat-libstdc++
o If using 2.6 kernel, make sure your libaio is at least
version 0.3.96-3 (i.e., rpm -q libaio).
o Always run vendor update routines (up2date, yum, yast)
before putting a new install into production.
o Automatic update configurations are enabled via CRON.
IDS Installation
Informix User Forum 2005 Moving Forward With Informix
Starting the version 10 installer
o IDS 10.0 Uses Install Shield Multi-Platform (ISMP).
o An embedded JRE is included but may not function on your
Linux platform. You may need to load your own JRE
(Blackdown, Sun, RPM?).
o Bypass the Java installer by copying the relevant .rpm
files and the install_rpm utility to $INFORMIXDIR, then
run 'install_rpm'.
Informix User Forum 2005 Moving Forward With Informix
IDS Installation
Post Installation Tasks With Linux
o Choose a runlevel for your installation. Set the value in the
/etc/inittab file (id:x:initdefault:)
o Conserve resources: identify what processes you need for
your installation, disable the rest! (chkconfig, service).
o Starting IDS on system boot, many ways to skin that cat
(inittab, rc.local, init.d).
o Firewall control may prevent access to your database!
(iptables/ipchains).
o Identifying archive devices (scsi/ide device names, /proc/scsi).
Informix User Forum 2005 Moving Forward With Informix
Section 4: IDS Configuration
Setting Linux kernel parameters
Planning Shared Memory Location
Using Kernel Asynchronous I/O (KAIO)
Setting Network Protocol
Informix User Forum 2005 Moving Forward With Informix
IDS Configuration
Setting Linux kernel parameters
o System Control File is /etc/sysctl.conf
Load system settings by running: sysctl -p /etc/sysctl.conf
o Quick changes can be accomplished by manipulating the /proc filesystem:
echo “67108864” > /proc/sys/kernel/shmmax
o RHEL 3 users should disable Exec Shield or set INFORMIXSHMBASE to -1
o SHMALL will probably need to be adjusted out to 4194304 as
outlined in the Machine Notes. (kernel.shmall)
o Linux SHMMAX defaults to 32MB which may be a bit weak
for some workloads, change by adjusting kernel.shmmax value.
Informix User Forum 2005 Moving Forward With Informix
IDS Configuration
Planning Shared Memory Location
o Executables start at 0x0 and grow upward.
o Shared Libraries start at 0x40000000.
o The Stack starts at 0xC0000000 and grows downward but will
usually not grow to a significant size.
o IDS Machine Notes recommend starting at 0x44000000 which
skips past the standard start point for shared libraries yet is
well below the stack start point of 0xC0000000.
o Try and limit or remove programs like X-Windows which can
consume shared memory unexpectedly. (check ipcs and
/proc/PID/maps or /proc/sysvipc/shm).
Informix User Forum 2005 Moving Forward With Informix
IDS Configuration
Using Kernel Asynchronous I/O (KAIO)
o enabled by default, disable by setting KAIOOFF=1
prior to starting the engine
o run poll threads on separate virtual processors specifying
NET as the virtual processor (VP) class in the NETTYPE
o KAIO kernel param controlled by /proc/sys/fs/aio-max-nr (default 65536)
o By default, IDS 10.0 allocates half of the maximum number
of requests and assigns them equally to the number of
configured CPU virtual processors. The environment variable
KAIOON can be used to control the number of requests allocated per
CPU virtual processor. The minimum value for KAIOON is 100.
Informix User Forum 2005 Moving Forward With Informix
IDS Configuration
Setting Network Protocol
o Available Network Protocols under Linux:
- Berkley Sockets: onsoctcp
- Shared Memory: onipcshm
- Stream Pipes (version 10): onipcstr
o Unless you need the security of stream pipes, you will
probably realize better performance with shared memory.
Informix User Forum 2005 Moving Forward With Informix
Section 5: Resource Monitoring & Performance Tuning
Disk, Memory and CPU Monitoring
Network Utilizations & Monitoring
Informix User Forum 2005 Moving Forward With Informix
Resource Monitoring & Performance Tuning
Disk, Memory and CPU Monitoring
o Resource Monitoring utilities under Linux:
ps – support SYSV and BSD style syntax
iostat – part of the sysstat package
top – great for at-a-glance usage of cpu/mem
vmstat – virtual memory stats
sar/sa – also part of sysstat package, enable through
CRON for better statistic collection
ipcs – shared memory monitoring
Informix User Forum 2005 Moving Forward With Informix
Resource Monitoring & Performance Tuning
Network Utilizations & Monitoring
o Interface Speed and Settings: mii-tool
o Traffic Snooping/Analysis: ethereal
actual binary is tethereal, can dump to a variety of formats for
import into other analysis programs (LANalyzer, Netmon, Visual)
o Real Time Statistics: iftop
o Open/Listening Ports: lsof, netstat
o Iptables is enabled by default on most installations, check settings
if you cannot connect to the database server remotely.
iptables -L -v -n
Informix Dynamic Server in aInformix Dynamic Server in aLinux-based EnvironmentLinux-based Environment
Craig SzczublewskiCraig [email protected]@uniqsys.com
Informix User Forum 2005 Moving Forward With Informix
Atlanta, Georgia December 8-9, 2005