Re: Mapping cpuvp's to IBM virtual processors on p
Posted in 2007
Topics: Storage & Space Management, Server Administration, Security, Permissions & Auditing, Triggers, Constraints & Referential Integrity, Transactions, Locking & Isolation, Logging & Checkpoints, Networking & sqlhosts Configuration, Platform-Specific Issues, Versions, Editions & End-of-Life
Your assumption is partially correct. You don't NEED all 6 CPU's allocated to
CPU VPs, but it's a good thing. The IDS scheduler will allocate sessions to CPU
VPs as needed so it's possible that one or a few logical CPUS will be harder
hit than the others. That said there are tunables that can affect that. For
example if you are using shared memory connections to the instance you should
have ipcshm poll threads running in all 6 CPU VPs or the load will not be
balanced as well as it could be and responsiveness will suffer. I don't see any
NETTYPE entries in the partial ONCONFIG you posted so you're probably running
with the default of one poll thread.
Also note that your instance is poorly tuned. BR is over 20 and values > 7
indicate a slow server needing more LRUs and more CLEANERS (and possibly more
BUFFERS). Your BTR (estimated since you didn't post any BUFFERS or BUFFERPOOL
parameters) looks very high indicating that you may need more buffers.
Can't tell much else based on your post alone.
Art S. Kagel
----- Original Message -----
From: Dave Thacker <ids@iiug.org>
At: 2/22 15:57:30
We're currently running a read-only instance of IDS 10.0FC6 on AIX 5.3
TL-05. The logical partition (LPAR) hosting IDS has 2.4 physical CPU's,
divided into 6 logical CPU's. Running nmon's cpu monitor shows CPU 0
at about 50% used, CPU1 used occasionally, and CPU 2-5 are idle. I'm
assuming that my CPUVPS should equal the number of *logical* CPU's. Is
that correct?
IBM Informix Dynamic Server Version 10.00.FC6 -- On-Line -- Up 6
days 00:13:54 -- 380512 Kbytes (stats were reset 105 minutes ago-DT)
Profile
dskreads pagreads bufreads %cached dskwrits pagwrits bufwrits
%cached
542354 567359 107069044 99.49 12757 18870 100973
87.37
isamtot open start read write rewrite delete
commit rollbk
91733072 689270 7162014 62601768 8944 33817 8862
21144 0
gp_read gp_write gp_rewrt gp_del gp_alloc gp_free
gp_curs
0 0 0 0 0 0 0
ovlock ovuserthread ovbuff usercpu syscpu numckpts flushes
0 0 0 1028.98 933.25 23 46
bufwaits lokwaits lockreqs deadlks dltouts ckpwaits
compress seqscans
144605 46 19779528 0 0 10 945
64620
ixda-RA idx-RA da-RA RA-pgsused lchwaits
178985 16216 3 195178 6932
------
excerpts from cat onconfig.usw
# Root Dbspace Configuration
ROOTNAME uswdbs # Root dbspace nameROOTPATH /usr/informix/links/uswdbs # Path for device
containing root dbspace
ROOTOFFSET 0 # Offset of root dbspace into device
(Kbytes)
ROOTSIZE 80000 # Size of root dbspace (Kbytes)
# Disk Mirroring Configuration Parameters
MIRROR 0 # Mirroring flag (Yes = 1, No = 0)
MIRRORPATH # Path for device containing mirroredroot
MIRROROFFSET 0 # Offset into mirrored device (Kbytes)
# Physical Log Configuration
PHYSDBS uswdbs # Location (dbspace) of physical log
PHYSFILE 4000 # Physical log file size (Kbytes)
# Logical Log Configuration
LOGFILES 8 # Number of logical log files
LOGSIZE 2000 # Logical log size (Kbytes)
# Tablespace Tablespace Configuration in Root Dbspace
TBLTBLFIRST 0 # First extent size (Kbytes) (0 =
default)
TBLTBLNEXT 0 # Next extent size (Kbytes) (0 =
default)
# Security
# DBCREATE_PERMISSION:
# By default any user can create a database. Uncomment
DBCREATE_PERMISSON to
# limit database creation to a specific user. Add a new
DBCREATE_PERMISSION
# line for each permitted user.
#DBCREATE_PERMISSION informix
# DB_LIBRARY_PATH:
# When loading a (C or C++) shared object (for a UDR or UDT), IDS checks
that
# the user-specified path starts with one of the directory prefixes
listed in
# the comma-separated list of prefixes in DB_LIBRARY_PATH. The string
# "$INFORMIXDIR/extend" must be included in DB_LIBRARY_PATH in order for
# extensibility and IBM supplied blades to work correctly.
# DB_LIBRARY_PATH $INFORMIXDIR/extend
# IFX_EXTEND_ROLE:
# 0 (or off) => Disable use of EXTEND role to control who can register
# external routines.
# 1 (or on) => Enable use of EXTEND role to control who can register
# external routines. This is the default behaviour.
#
IFX_EXTEND_ROLE 1 # To control the usage of EXTEND role.
# Diagnostics
MSGPATH /logs/online.usw.log # System message log file path
CONSOLE /logs/online.cons.log # System console message path
# To automatically backup logical logs, edit alarmprogram.sh and set
# BACKUPLOGS=Y
ALARMPROGRAM /usr/informix/etc/alarmprogram.sh # Alarm program path
ALRM_ALL_EVENTS 0 # Triggers ALARMPROGRAM for any eventoccur
TBLSPACE_STATS 1 # Maintain tblspace statistics
# System Archive Tape Device
TAPEDEV /dev/null # Tape device path
TAPEBLK 32 # Tape block size (Kbytes)
TAPESIZE 10240 # Maximum amount of data to put on tape
(Kbytes)
# Log Archive Tape Device
LTAPEDEV /dev/null # Log tape device path
LTAPEBLK 32 # Log tape block size (Kbytes)
LTAPESIZE 10240 # Max amount of data to put on log tape
(Kbytes)
# Optical
STAGEBLOB # Informix Dynamic Server staging area
# System Configuration
SERVERNUM 23 # Unique id corresponding to a OnLineinstance
DBSERVERNAME usw_tcp # Name of default database server
DBSERVERALIASES usw # List of alternate dbservernames
NETTYPE # Configure poll thread(s) for nettype
DEADLOCK_TIMEOUT 60 # Max time to wait of lock indistributed env.
RESIDENT 0 # Forced residency flag (Yes = 1, No =
0)
MULTIPROCESSOR 1 # 0 for single-processor, 1 formulti-processor
NUMCPUVPS 6 # Number of user (cpu) vps
SINGLE_CPU_VP 0 # If non-zero, limit number of cpu vpsto one
NOAGE 0 # Process aging
AFF_SPROC 0 # Affinity start processor
AFF_NPROCS 0 # Affinity number of processors
# Shared Memory Parameters
LOCKS 4000 # Maximum number of locks
NUMAIOVPS 1 # Number of IO vps
PHYSBUFF 64 # Physical log buffer size (Kbytes)
LOGBUFF 64 # Logical log buffer size (Kbytes)
CLEANERS 2 # Number of buffer cleaner processes
SHMBASE 0x700000000000000L # Shared memory base address
SHMVIRTSIZE 327680 # initial virtual shared memory segmentsize
SHMADD 65336 # Size of new shared memory segments
(Kbytes)
EXTSHMADD 8192 # Size of new extension shared memory
segments (Kbytes)
SHMTOTAL 0 # Total shared memory (Kbytes).
0=>unlimited
SHMVIRT_ALLOCSEG 0 # Values between 0 and .99 are %, values> 1 are
# KB - when this much virtual memory is
used we
# try to get a new segment. 0 means
"off". 2nd
# parameter is alarm level
CKPTINTVL 300 # Check point interval (in sec)
TXTIMEOUT 300 # Transaction timeout (in sec)
STACKSIZE 128 # Stack size (Kbytes)
# Dynamic Logging
# DYNAMIC_LOGS:
# 2 : server automatically add a new logical log when necessary. (ON)
# 1 : notify DBA to add new logical logs when necessary. (ON)
# 0 : cannot add logical log on the fly. (OFF)
#
# When dynamic logging is on, we can have higher values for
LTXHWM/LTXEHWM,
# because the server can add new logical logs during long transaction
rollback.
# However, to limit the number of new logical logs being added,@@NL
On Thu, 2007-02-22 at 16:35 -0500, ART KAGEL, BLOOMBERG/ 731 LEXIN
wrote:
> Your assumption is partially correct. You don't NEED all 6 CPU's allocated to
> CPU VPs, but it's a good thing. The IDS scheduler will allocate sessions to
> CPU
> VPs as needed so it's possible that one or a few logical CPUS will be harder
> hit than the others. That said there are tunables that can affect that. For
> example if you are using shared memory connections to the instance you should
> have ipcshm poll threads running in all 6 CPU VPs or the load will not be
> balanced as well as it could be and responsiveness will suffer. I don't see
> any
> NETTYPE entries in the partial ONCONFIG you posted so you're probably running
> with the default of one poll thread.
NETTYPE is at default. Workload is 90% TCP/10$ SHM. What type of
threads should I add for soctcp?
>
> Also note that your instance is poorly tuned. BR is over 20 and values > 7
> indicate a slow server needing more LRUs and more CLEANERS (and possibly more
> BUFFERS). Your BTR (estimated since you didn't post any BUFFERS or BUFFERPOOL
> parameters) looks very high indicating that you may need more buffers.
I'm adding some more buffers tonight. All the data sits in 1 dbspace,
are more LRU's going to help?
>
> Can't tell much else based on your post alone.
What else do you need to see after I make this iteration?
DT
>
> Art S. Kagel
>
> ----- Original Message -----
> From: Dave Thacker <ids@iiug.org>
> At: 2/22 15:57:30
>
> We're currently running a read-only instance of IDS 10.0FC6 on AIX 5.3
> TL-05. The logical partition (LPAR) hosting IDS has 2.4 physical CPU's,
> divided into 6 logical CPU's. Running nmon's cpu monitor shows CPU 0
> at about 50% used, CPU1 used occasionally, and CPU 2-5 are idle. I'm
> assuming that my CPUVPS should equal the number of *logical* CPU's. Is
> that correct?
>
> IBM Informix Dynamic Server Version 10.00.FC6 -- On-Line -- Up 6
> days 00:13:54 -- 380512 Kbytes (stats were reset 105 minutes ago-DT)>
> Profile
> dskreads pagreads bufreads %cached dskwrits pagwrits bufwrits
> %cached
> 542354 567359 107069044 99.49 12757 18870 100973
> 87.37
>
> isamtot open start read write rewrite delete
> commit rollbk
> 91733072 689270 7162014 62601768 8944 33817 8862
> 21144 0
>
> gp_read gp_write gp_rewrt gp_del gp_alloc gp_free
> gp_curs
> 0 0 0 0 0 0 0
>
> ovlock ovuserthread ovbuff usercpu syscpu numckpts flushes
> 0 0 0 1028.98 933.25 23 46
>
> bufwaits lokwaits lockreqs deadlks dltouts ckpwaits
> compress seqscans
> 144605 46 19779528 0 0 10 945
> 64620
>
> ixda-RA idx-RA da-RA RA-pgsused lchwaits
> 178985 16216 3 195178 6932
>
> ------
>
> excerpts from cat onconfig.usw
> # Root Dbspace Configuration
>
> ROOTNAME uswdbs # Root dbspace name> ROOTPATH /usr/informix/links/uswdbs # Path for device
> containing root dbspace
> ROOTOFFSET 0 # Offset of root dbspace into device
> (Kbytes)
> ROOTSIZE 80000 # Size of root dbspace (Kbytes)>
> # Disk Mirroring Configuration Parameters
>
> MIRROR 0 # Mirroring flag (Yes = 1, No = 0)
> MIRRORPATH # Path for device containing mirrored> root
> MIRROROFFSET 0 # Offset into mirrored device (Kbytes)>
> # Physical Log Configuration
>
> PHYSDBS uswdbs # Location (dbspace) of physical log
> PHYSFILE 4000 # Physical log file size (Kbytes)>
> # Logical Log Configuration
>
> LOGFILES 8 # Number of logical log files
> LOGSIZE 2000 # Logical log size (Kbytes)>
> # Tablespace Tablespace Configuration in Root Dbspace
>
> TBLTBLFIRST 0 # First extent size (Kbytes) (0 =
> default)
> TBLTBLNEXT 0 # Next extent size (Kbytes) (0 =
> default)>
> # Security
> # DBCREATE_PERMISSION:
> # By default any user can create a database. Uncomment
> DBCREATE_PERMISSON to
> # limit database creation to a specific user. Add a new
> DBCREATE_PERMISSION
> # line for each permitted user.
>
> #DBCREATE_PERMISSION informix
>
> # DB_LIBRARY_PATH:
> # When loading a (C or C++) shared object (for a UDR or UDT), IDS checks
> that
> # the user-specified path starts with one of the directory prefixes
> listed in
> # the comma-separated list of prefixes in DB_LIBRARY_PATH. The string
> # "$INFORMIXDIR/extend" must be included in DB_LIBRARY_PATH in order for
> # extensibility and IBM supplied blades to work correctly.
>
> # DB_LIBRARY_PATH $INFORMIXDIR/extend
>
> # IFX_EXTEND_ROLE:
> # 0 (or off) => Disable use of EXTEND role to control who can register
> # external routines.
> # 1 (or on) => Enable use of EXTEND role to control who can register
> # external routines. This is the default behaviour.
> #
> IFX_EXTEND_ROLE 1 # To control the usage of EXTEND role.>
> # Diagnostics
>
> MSGPATH /logs/online.usw.log # System message log file path
> CONSOLE /logs/online.cons.log # System console message path
>
> # To automatically backup logical logs, edit alarmprogram.sh and set
> # BACKUPLOGS=Y
> ALARMPROGRAM /usr/informix/etc/alarmprogram.sh # Alarm program path
> ALRM_ALL_EVENTS 0 # Triggers ALARMPROGRAM for any event> occur
> TBLSPACE_STATS 1 # Maintain tblspace statistics>
> # System Archive Tape Device
>
> TAPEDEV /dev/null # Tape device path
> TAPEBLK 32 # Tape block size (Kbytes)
> TAPESIZE 10240 # Maximum amount of data to put on tape
> (Kbytes)>
> # Log Archive Tape Device
>
> LTAPEDEV /dev/null # Log tape device path
> LTAPEBLK 32 # Log tape block size (Kbytes)
> LTAPESIZE 10240 # Max amount of data to put on log tape
> (Kbytes)>
> # Optical
>
> STAGEBLOB # Informix Dynamic Server staging area
>
> # System Configuration
>
> SERVERNUM 23 # Unique id corresponding to a OnLine> instance
> DBSERVERNAME usw_tcp # Name of default database server
> DBSERVERALIASES usw # List of alternate dbservernames
> NETTYPE # Configure poll thread(s) for nettype
> DEADLOCK_TIMEOUT 60 # Max time to wait of lock in> distributed env.
> RESIDENT 0 # Forced residency flag (Yes = 1, No =
> 0)
>
> MULTIPROCESSOR 1 # 0 for single-processor, 1 for> multi-processor
> NUMCPUVPS 6 # Number of user (cpu) vps
> SINGLE_CPU_VP 0 # If non-zero, limit number of cpu vps> to one
>
> NOAGE 0 # Process aging
> AFF_SPROC 0 # Affinity start processor
> AFF_NPROCS 0 # Affinity number of processors>
> # Shared Memory Parameters
>
> LOCKS 4000 # Maximum number of locks
> NUMAIOVPS 1 # Number of IO vps
> PHYSBUFF 64 # Physical log buffer size (Kbytes)
> LOGBUFF 64 # Logical log buffer size (Kbytes)
> CLEANERS 2 # Number of buffer cleaner processes
> SHMBASE 0x700000000000000L # Shared memory base address
> SHMVIRTSIZE 327680 # initial virtual shared memory segment> size
> SHMADD 65336 # Size of new shared memory segments
> (Kbytes)
> EXTSHMADD 8192 # Size of new extension shared memory
> segments (Kbytes)
> SHMTOTAL 0 # Total shared memory (Kbytes).
> 0=>unlimited
> SHMVIRT_ALLOCSEG 0 # Values between 0 and .99 are %, values> > 1 are
>
> # KB - when this much virtual memory is@
For soctcp use 1 or 2 NET VPs (a net VP should handle over 200 connections
efficiently but I like to keep that below ~150 myself).
#LRUs controls contention between users. In order to read new data into a
buffer or to write/rewrite a buffer, the user much latch the LRU in which the
buffer is listed in order to move the buffer to the front of the LRU's queue or
to move the buffer from the LRU's clean queue to its dirty queue. More LRUS
mean less contention for LRU resources. Some buffer contention is cause by
insufficient buffers, but most is from LRU contention. If you have more users
than LRUs then more LRUs will help.
I also notice that you have only one AIO VP configured, even if you are using
only RAW devices you should have 2-3 configured. Add to that 1 to 1.5 per
COOKED chunk.
What else do we need to see to help? Post the following:
onstat -p (again - with the time since reset)
onstat -d
onstat -F
onstat -R
onstat -g glo
onstat -g iov
onstat -P (at least the summaries at the end, the partnum zero line, and anypartnum lines that have a significant % of the buffer cache allocated to them)
onstat -g iof
A full copy of the ONCONFIG file.
Art S. Kagel
----- Original Message -----
From: Dave Thacker <ids@iiug.org>
At: 2/22 17:12:14
On Thu, 2007-02-22 at 16:35 -0500, ART KAGEL, BLOOMBERG/ 731 LEXIN
wrote:
> Your assumption is partially correct. You don't NEED all 6 CPU's allocated
to
> CPU VPs, but it's a good thing. The IDS scheduler will allocate sessions to
> CPU
> VPs as needed so it's possible that one or a few logical CPUS will be harder
> hit than the others. That said there are tunables that can affect that. For
> example if you are using shared memory connections to the instance you
should
> have ipcshm poll threads running in all 6 CPU VPs or the load will not be
> balanced as well as it could be and responsiveness will suffer. I don't see
> any
> NETTYPE entries in the partial ONCONFIG you posted so you're probably
running
> with the default of one poll thread.
NETTYPE is at default. Workload is 90% TCP/10$ SHM. What type of
threads should I add for soctcp?
>
> Also note that your instance is poorly tuned. BR is over 20 and values > 7
> indicate a slow server needing more LRUs and more CLEANERS (and possibly
more
> BUFFERS). Your BTR (estimated since you didn't post any BUFFERS or
BUFFERPOOL> parameters) looks very high indicating that you may need more buffers.
I'm adding some more buffers tonight. All the data sits in 1 dbspace,
are more LRU's going to help?
>
> Can't tell much else based on your post alone.
What else do you need to see after I make this iteration?
DT
>
> Art S. Kagel
>
> ----- Original Message -----
> From: Dave Thacker <ids@iiug.org>
> At: 2/22 15:57:30
>
> We're currently running a read-only instance of IDS 10.0FC6 on AIX 5.3
> TL-05. The logical partition (LPAR) hosting IDS has 2.4 physical CPU's,
> divided into 6 logical CPU's. Running nmon's cpu monitor shows CPU 0
> at about 50% used, CPU1 used occasionally, and CPU 2-5 are idle. I'm
> assuming that my CPUVPS should equal the number of *logical* CPU's. Is
> that correct?
>
> IBM Informix Dynamic Server Version 10.00.FC6 -- On-Line -- Up 6
> days 00:13:54 -- 380512 Kbytes (stats were reset 105 minutes ago-DT)>
> Profile
> dskreads pagreads bufreads %cached dskwrits pagwrits bufwrits
> %cached
> 542354 567359 107069044 99.49 12757 18870 100973
> 87.37
>
> isamtot open start read write rewrite delete
> commit rollbk
> 91733072 689270 7162014 62601768 8944 33817 8862
> 21144 0
>
> gp_read gp_write gp_rewrt gp_del gp_alloc gp_free
> gp_curs
> 0 0 0 0 0 0 0
>
> ovlock ovuserthread ovbuff usercpu syscpu numckpts flushes
> 0 0 0 1028.98 933.25 23 46
>
> bufwaits lokwaits lockreqs deadlks dltouts ckpwaits
> compress seqscans
> 144605 46 19779528 0 0 10 945
> 64620
>
> ixda-RA idx-RA da-RA RA-pgsused lchwaits
> 178985 16216 3 195178 6932
>
> ------
>
> excerpts from cat onconfig.usw
> # Root Dbspace Configuration
>
> ROOTNAME uswdbs # Root dbspace name> ROOTPATH /usr/informix/links/uswdbs # Path for device
> containing root dbspace
> ROOTOFFSET 0 # Offset of root dbspace into device
> (Kbytes)
> ROOTSIZE 80000 # Size of root dbspace (Kbytes)>
> # Disk Mirroring Configuration Parameters
>
> MIRROR 0 # Mirroring flag (Yes = 1, No = 0)
> MIRRORPATH # Path for device containing mirrored> root
> MIRROROFFSET 0 # Offset into mirrored device (Kbytes)>
> # Physical Log Configuration
>
> PHYSDBS uswdbs # Location (dbspace) of physical log
> PHYSFILE 4000 # Physical log file size (Kbytes)>
> # Logical Log Configuration
>
> LOGFILES 8 # Number of logical log files
> LOGSIZE 2000 # Logical log size (Kbytes)>
> # Tablespace Tablespace Configuration in Root Dbspace
>
> TBLTBLFIRST 0 # First extent size (Kbytes) (0 =
> default)
> TBLTBLNEXT 0 # Next extent size (Kbytes) (0 =
> default)>
> # Security
> # DBCREATE_PERMISSION:
> # By default any user can create a database. Uncomment
> DBCREATE_PERMISSON to
> # limit database creation to a specific user. Add a new
> DBCREATE_PERMISSION
> # line for each permitted user.
>
> #DBCREATE_PERMISSION informix
>
> # DB_LIBRARY_PATH:
> # When loading a (C or C++) shared object (for a UDR or UDT), IDS checks
> that
> # the user-specified path starts with one of the directory prefixes
> listed in
> # the comma-separated list of prefixes in DB_LIBRARY_PATH. The string
> # "$INFORMIXDIR/extend" must be included in DB_LIBRARY_PATH in order for
> # extensibility and IBM supplied blades to work correctly.
>
> # DB_LIBRARY_PATH $INFORMIXDIR/extend
>
> # IFX_EXTEND_ROLE:
> # 0 (or off) => Disable use of EXTEND role to control who can register
> # external routines.
> # 1 (or on) => Enable use of EXTEND role to control who can register
> # external routines. This is the default behaviour.
> #
> IFX_EXTEND_ROLE 1 # To control the usage of EXTEND role.>
> # Diagnostics
>
> MSGPATH /logs/online.usw.log # System message log file path
> CONSOLE /logs/online.cons.log # System console message path
>
> # To automatically backup logical logs, edit alarmprogram.sh and set
> # BACKUPLOGS=Y
> ALARMPROGRAM /usr/informix/etc/alarmprogram.sh # Alarm program path
> ALRM_ALL_EVENTS 0 # Triggers ALARMPROGRAM for any event> occur
> TBLSPACE_STATS 1 # Maintain tblspace statistics>
> # System Archive Tape Device
>
> TAPEDEV /dev/null # Tape device path
> TAPEBLK 32 # Tape block size (Kbytes)
> TAPESIZE 10240 # Maximum amount of data to put on tape
> (Kbytes)>
> # Log Archive Tape Device
>
> LTAPEDEV /dev/null # Log tape device path
> LTAPEBLK 32 # Log tape block size (Kbytes)
> LTAPESIZE 10240 # Max amount of data to put on log tape
> (Kbytes)>
> # Optical
>
> STAGEBLOB # Informix Dynamic Server staging area
>
> # System Configuration
>
> SERVERNUM 23 # Unique id corresponding to a OnLine> instance
>