Re: Slowness
Posted in 2000
A DBA reported that after moving to a Sun E10K (IDS 7.31.UC5, Solaris 7) with ~4x more data on only 6 disks, performance seemed poor despite 82% CPU idle. He posted onstat -c/-p output and got tuning advice rather than a single fix: read cache was only ~78% and the bufwaits ratio near 100%, pointing to LRU latch contention — raise LRUS and CLEANERS (towards 128), lower LRU_MAX/MIN_DIRTY, adjust BUFFERS/SHMVIRTSIZE/PHYSFILE, and separate temp space. Others noted a 7.31.UC5 optimizer bug (upgrade to UC6) and the old index-page-type bug inflating Btree buffer usage. Art Kagel also explained the bufwaits ratio and the undocumented LRUPOLICY parameter. No confirmation from the poster that any change fixed it.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Storage & Space Management, Platform-Specific Issues
From: Boscia <rwboscia@worldnet.att.net>
>
>First, I am a newbie, so I'm not real familiar with all this "stuff" yet...
>
>We recently moved our databases to another server. The new one is an Sun
>E10K running Solaris 7. We have approximately 34 dbspaces and chunks. The
>largest db contains approximately 150,000,000 records. My developer is
>complaining about the slowness of the machine. He feels that it should be
>MUCH faster than the old machine and he does not feel that it is. (It was
>not an E10K). His db's are bigger on this machine. On the "old" machine,
>the largest was 40,000,000 (it's the same database but now they are
>retaining the data for a longer period of time.) The db's and chunks are
>using 6 disks.
>
>Our server is showing that it is 82% idle most of the time.
>
>I think I read somewhere that the tempspace should have it's own disk (?).
>We do not have it set up that way....
>What else can I look at to determine if this slowness issue is true and
>what
>can I do about it?
Post the output from the following commands:
onstat -c
onstat -p
onstat -P | tail -5
onstat -u | tail -2
onstat -d
onstat -D
onstat -g iov
onstat -g rea
For starters. :-)
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
OK - I will be the smartass...So you have a faster CPU...Your Developer
group decides to store almost 4x as much data but doesn't give you adequate
disk space to even have TEMP on a seperate drive. Then they complain about
speed (or lack of it)...
Take your nearest Scott Adam's Dilbert article and beat them around the head
and neck...
Then post the requested information to this group...realize the answer may
very well be as difficult as a complete reorganization of your disk
farm...or as simple as tweaking a few UNDOCUMENTED parameters.
Good luck.
Rob Vorbroker
Obnoxio The Clown <obnoxio@hotmail.com> wrote in message
news:8i7pii$h4p$1@news.xmission.com...
>
> From: Boscia <rwboscia@worldnet.att.net>
> >
> >First, I am a newbie, so I'm not real familiar with all this "stuff"
yet...
> >
> >We recently moved our databases to another server. The new one is an Sun
> >E10K running Solaris 7. We have approximately 34 dbspaces and chunks.
The
> >largest db contains approximately 150,000,000 records. My developer is
> >complaining about the slowness of the machine. He feels that it should
be
> >MUCH faster than the old machine and he does not feel that it is. (It
was
> >not an E10K). His db's are bigger on this machine. On the "old"
machine,
> >the largest was 40,000,000 (it's the same database but now they are
> >retaining the data for a longer period of time.) The db's and chunks are
> >using 6 disks.
> >
> >Our server is showing that it is 82% idle most of the time.
> >
> >I think I read somewhere that the tempspace should have it's own disk
(?).
> >We do not have it set up that way....
> >What else can I look at to determine if this slowness issue is true and
> >what
> >can I do about it?
>
> Post the output from the following commands:
>
> onstat -c
> onstat -p
> onstat -P | tail -5
> onstat -u | tail -2
> onstat -d
> onstat -D
> onstat -g iov
> onstat -g rea>
> For starters. :-)
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
Well I wasn't sure who to answer to I've answered all your questions below.
Hope this is not way too long and boring Thanks for all the help and
future help. So anyhow, here goes....
In answer to obnoxio@hotmail.com's questions....
******* OUTPUT from onstat -c ***************
Informix Dynamic Server Version 7.31.UC5 -- On-Line -- Up 8 days 14:54:51
-- 491520 Kbytes
Configuration File: /home/informix/etc/onconfig.pinkfloyd
#**************************************************************************
#
# INFORMIX SOFTWARE, INC.
#
# Title: onconfig.std
# Description: Informix Dynamic Server Configuration Parameters
#
#**************************************************************************
# Root Dbspace Configuration
ROOTNAME rootdbs # Root dbspace name
ROOTPATH /dev/vx/rdsk/informixdg/db01 # Path for device containing root dbspace
ROOTOFFSET 0 # Offset of root dbspace into device
(Kbytes)
ROOTSIZE 1500000 # 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 logs # Location (dbspace) of physical log
PHYSFILE 10000 # Physical log file size (Kbytes)
# Logical Log Configuration
LOGFILES 75 # Number of logical log files
LOGSIZE 10000 # Logical log size (Kbytes)
# Diagnostics
MSGPATH /home/informix/online.log # System message log file path
CONSOLE /dev/console # System console message path
ALARMPROGRAM /home/informix/etc/log_full.sh # Alarm program path
#SYSALARMPROGRAM /usr/informix/etc/evidence.sh # System Alarmprogram path
TBLSPACE_STATS 1
# System Archive Tape Device
TAPEDEV /home/informix/tape/tapelog # Tape device path
TAPEBLK 16 # Tape block size (Kbytes)
TAPESIZE 10240 # Maximum amount of data to put on tape
(Kbytes)
# Log Archive Tape Device
LTAPEDEV /home/informix/tape/ltapelog # Log tape device path
LTAPEBLK 16 # Log tape block size (Kbytes)
LTAPESIZE 10240 # Max amount of data to put on log tape
(Kbytes)
# Optical
STAGEBLOB # Informix Dynamic Server/Optical staging
area
# System Configuration
SERVERNUM 1 # Unique id corresponding to a DynamicServer instance
DBSERVERNAME pinkfloyd # Name of default database server
DBSERVERALIASES floyd_net # List of alternate dbservernames
NETTYPE tlitcp,1,100,NET # Configure poll thread(s) for nettype
NETTYPE ipcshm,4,30,CPU # Configure poll thread(s) for nettype
DEADLOCK_TIMEOUT 60 # Max time to wait of lock in distributed
env.
RESIDENT 1 # Forced residency flag (Yes = 1, No = 0)
MULTIPROCESSOR 1 # 0 for single-processor, 1 formulti-processor
NUMCPUVPS 4 # Number of user (cpu) vps
SINGLE_CPU_VP 0 # If non-zero, limit number of cpu vps toone
NOAGE 1 # Process aging
AFF_SPROC 0 # Affinity start processor
AFF_NPROCS 0 # Affinity number of processors
# Shared Memory Parameters
LOCKS 150000 # Maximum number of locks
BUFFERS 200000 # Maximum number of shared buffers
NUMAIOVPS 4 # Number of IO vps
PHYSBUFF 64 # Physical log buffer size (Kbytes)
LOGBUFF 64 # Logical log buffer size (Kbytes)LOGSMAX 100 # Maximum number of logical log files
CLEANERS 4 # Number of buffer cleaner processes
SHMBASE 0xa000000 # Shared memory base address
SHMVIRTSIZE 8192 # initial virtual shared memory segment size
SHMADD 8192 # Size of new shared memory segments
(Kbytes)
SHMTOTAL 0 # Total shared memory (Kbytes). 0=>unlimited
CKPTINTVL 300 # Check point interval (in sec)
LRUS 4 # Number of LRU queues
LRU_MAX_DIRTY 60 # LRU percent dirty begin cleaning limit
LRU_MIN_DIRTY 50 # LRU percent dirty end cleaning limit
LTXHWM 50 # Long transaction high water markpercentage
LTXEHWM 60 # Long transaction high water mark
(exclusive)
TXTIMEOUT 0x12c # Transaction timeout (in sec)
STACKSIZE 128 # Stack size (Kbytes)
# System Page Size
# BUFFSIZE - Dynamic Server no longer supports this configuration parameter.
# To determine the page size used by Dynamic Server on your
platform
# see the last line of output from the command, 'onstat -b'.
# Recovery Variables
# OFF_RECVRY_THREADS:
# Number of parallel worker threads during fast recovery or an offline
restore.
# ON_RECVRY_THREADS:
# Number of parallel worker threads during an online restore.
OFF_RECVRY_THREADS 10 # Default number of offline workerthreads
ON_RECVRY_THREADS 1 # Default number of online worker threads
# Data Replication Variables
# DRAUTO: 0 manual, 1 retain type, 2 reverse type
DRAUTO 0 # DR automatic switchover
DRINTERVAL 30 # DR max time between DR buffer flushes (in
sec)
DRTIMEOUT 30 # DR network timeout (in sec)DRLOSTFOUND /home/informix/etc/dr.lostfound # DR lost+found file path
# CDR Variables
CDR_LOGBUFFERS 2048 # size of log reading buffer pool (Kbytes)
CDR_EVALTHREADS 1,2 # evaluator threads (per-cpu-vp,additional)
CDR_DSLOCKWAIT 5 # DS lockwait timeout (seconds)
CDR_QUEUEMEM 4096 # Maximum amount of memory for any CDR queue
(Kbytes)
# Backup/Restore variables
BAR_ACT_LOG /home/informix/bar_act.log
BAR_MAX_BACKUP 3
BAR_RETRY 1
BAR_NB_XPORT_COUNT 10
BAR_XFER_BUF_SIZE 31
BAR_BSALIB_PATH /usr/lib/ibsad001.so
# Informix Storage Manager variables
ISM_DATA_POOL ISMData # If the data pool name is changed, be sure
to
# update $INFORMIXDIR/bin/onbar. Change to
# ism_catalog -create_bootstrap -pool <new
name>
ISM_LOG_POOL ISMLogs
# Read Ahead Variables
RA_PAGES 32 # Number of pages to attempt to read ahead
RA_THRESHOLD 24 # Number of pages left before next group
# DBSPACETEMP:
# Dynamic Server equivalent of DBTEMP for SE. This is the list of dbspaces
# that the Dynamic Server SQL Engine will use to create temp tables etc.
# If specified it must be a colon separated list of dbspaces that exist
# when the Dynamic Server system is brought online. If not specified, or if
# all dbspaces s
Boscia wrote:
> Informix Dynamic Server Version 7.31.UC5 -- On-Line -- Up 8 days 14:54:51
> -- 491520 Kbytes
How much memory You have? OS needs some memory too.
> ROOTSIZE 1500000 # Size of root dbspace (Kbytes)
You need such a big rootdbs really? Only 3 Mb in use (from "onstat -d").
> PHYSFILE 10000 # Physical log file size (Kbytes)
50000 should be better IMHO.
> TBLSPACE_STATS 1
This parameter is usable for tuning, so turn it off ( 0 ).
> DBSERVERNAME pinkfloyd # Name of default database server
I like this band too :-)
> BUFFERS 200000 # Maximum number of shared buffers
Buffers should occupy from 1/4 to 1/2 of available memory. Monitoring needed.
> LRUS 4 # Number of LRU queues
Very long queues, try 128.
> CLEANERS 4 # Number of buffer cleaner processes
One cleaner per queue (128)? Too much i think. My guess is about 80.
> SHMVIRTSIZE 8192 # initial virtual shared memory segment size
See "onstat -g seg", server should allocate one virtual memory segment, try 90000.
> LRU_MAX_DIRTY 60 # LRU percent dirty begin cleaning limit
> LRU_MIN_DIRTY 50 # LRU percent dirty end cleaning limit
MAX / MIN = 1 / 0 will be good enough.
> OFF_RECVRY_THREADS 10 # Default number of offline worker threads
Not needed. Set it to 1.
> DUMPSHMEM 1 # Dump a copy of shared memory
It is useless, set it to 0.
> OPTCOMPIND 2 # To hint the optimizer
I prefer 0.
> Robin
Leonid
I see you're using 7.31UC5 on Solaris. There is a bug in the optimizer for that version of the engine which causes queries to run much slower. (we got bitten by it). This bug has been discussed before in this forum. Try searching remarq.com for "7.31 UC5". You might want to upgrade to UC6. We did, and everything went back to normal. Lyzander Got questions? Get answers over the phone at Keen.com. Up to 100 minutes free! http://www.keen.com
* snip * > > ********** OUTPUT FROM onstat-p ********** > > > > Informix Dynamic Server Version 7.31.UC5 -- On-Line -- Up 8 days 14:55:04 > > -- 491520 Kbytes > > > > Profile > > dskreads pagreads bufreads %cached dskwrits pagwrits bufwrits %cached > > 682295405 18023000 3083027087 77.87 71759590 15652589 1036581591 93.08 > > REALLY POOR read cache %, Informix normally averages over 90%! Need more > buffers. > > > isamtot open start read write rewrite delete commit > > rollbk > > 1492423941 18991866 243150836 3111959883 1137426567 4844731 2152933 80738 > > 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 855488.77 72041.35 2699 5398 > > > > bufwaits lokwaits lockreqs deadlks dltouts ckpwaits compress seqscans > > 30666291 5573 3559009654 0 0 22997 4401153 1335818 > > BUFWAITS RATIO is nearly 100%! Anything over 10% is death and over 7% is > slow. Definitely need more LRUS and CLEANERS make both 128. Pardon my ignorance, I recently started reading the newsgroups about performance issues. What is the 'BUFWAITS RATIO' ? > > > ixda-RA idx-RA da-RA RA-pgsused lchwaits > > 250071741 406399 315028979 565468702 11963653 > > > > *********** OUTPUT from onstat-P| tail -5 *********** > > > > Percentages: > > Data 59.32 > > Btree 40.10 > > Other 0.59 > > > > Btree looks high, I thought 731UC5 does not have this bug! > What do these numbers mean, and what should they be at? (Also, which bug?) Thanks!
Ooo, this is a good one. Most of the advice you have gotten is right on,
let me just comment also, sometimes redundantly to help you diagnose next
time. Read on...
Art S. Kagel
Boscia wrote:
>
> Well I wasn't sure who to answer to I've answered all your questions below.
> Hope this is not way too long and boring Thanks for all the help and
> future help. So anyhow, here goes....
>
> In answer to obnoxio@hotmail.com's questions....
>
> ******* OUTPUT from onstat -c ***************
> Informix Dynamic Server Version 7.31.UC5 -- On-Line -- Up 8 days 14:54:51
> -- 491520 Kbytes
>
> Configuration File: /home/informix/etc/onconfig.pinkfloyd
> #**************************************************************************
> #
> # INFORMIX SOFTWARE, INC.
> #
> # Title: onconfig.std
> # Description: Informix Dynamic Server Configuration Parameters
> #
> #**************************************************************************
>
> # Root Dbspace Configuration
>
> ROOTNAME rootdbs # Root dbspace name
> ROOTPATH /dev/vx/rdsk/informixdg/db01> # Path for device containing root dbspace
> ROOTOFFSET 0 # Offset of root dbspace into device
> (Kbytes)
> ROOTSIZE 1500000 # 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 logs # Location (dbspace) of physical log
> PHYSFILE 10000 # Physical log file size (Kbytes)>
> # Logical Log Configuration
>
> LOGFILES 75 # Number of logical log files
> LOGSIZE 10000 # Logical log size (Kbytes)>
> # Diagnostics
>
> MSGPATH /home/informix/online.log # System message log file path
> CONSOLE /dev/console # System console message path
> ALARMPROGRAM /home/informix/etc/log_full.sh # Alarm program path
> #SYSALARMPROGRAM /usr/informix/etc/evidence.sh # System Alarm> program path
> TBLSPACE_STATS 1>
> # System Archive Tape Device
>
> TAPEDEV /home/informix/tape/tapelog # Tape device path
> TAPEBLK 16 # Tape block size (Kbytes)
> TAPESIZE 10240 # Maximum amount of data to put on tape
> (Kbytes)>
> # Log Archive Tape Device
>
> LTAPEDEV /home/informix/tape/ltapelog # Log tape device path
> LTAPEBLK 16 # Log tape block size (Kbytes)
> LTAPESIZE 10240 # Max amount of data to put on log tape
> (Kbytes)>
> # Optical
>
> STAGEBLOB # Informix Dynamic Server/Optical staging
> area
>
> # System Configuration
>
> SERVERNUM 1 # Unique id corresponding to a Dynamic> Server instance
> DBSERVERNAME pinkfloyd # Name of default database server
> DBSERVERALIASES floyd_net # List of alternate dbservernames
> NETTYPE tlitcp,1,100,NET # Configure poll thread(s) for nettype
Unless noone normally connects over the net add one or two more listeners.
> NETTYPE ipcshm,4,30,CPU # Configure poll thread(s) for nettype
> DEADLOCK_TIMEOUT 60 # Max time to wait of lock in distributed
> env.
> RESIDENT 1 # Forced residency flag (Yes = 1, No = 0)
>
> MULTIPROCESSOR 1 # 0 for single-processor, 1 for> multi-processor
> NUMCPUVPS 4 # Number of user (cpu) vps
> SINGLE_CPU_VP 0 # If non-zero, limit number of cpu vps to> one
>
> NOAGE 1 # Process aging
> AFF_SPROC 0 # Affinity start processor
> AFF_NPROCS 0 # Affinity number of processors>
> # Shared Memory Parameters
>
> LOCKS 150000 # Maximum number of locks
> BUFFERS 200000 # Maximum number of shared buffers
> NUMAIOVPS 4 # Number of IO vps
> PHYSBUFF 64 # Physical log buffer size (Kbytes)
> LOGBUFF 64 # Logical log buffer size (Kbytes)> LOGSMAX 100 # Maximum number of logical log files
> CLEANERS 4 # Number of buffer cleaner processes
> SHMBASE 0xa000000 # Shared memory base address
> SHMVIRTSIZE 8192 # initial virtual shared memory segment size
> SHMADD 8192 # Size of new shared memory segments
> (Kbytes)
> SHMTOTAL 0 # Total shared memory (Kbytes). 0=>unlimited
> CKPTINTVL 300 # Check point interval (in sec)
> LRUS 4 # Number of LRU queues
NOT ENOUGH LRUS for 200,000 buffers I suspect you have LRU contention, let's
see below...
> LRU_MAX_DIRTY 60 # LRU percent dirty begin cleaning limit
> LRU_MIN_DIRTY 50 # LRU percent dirty end cleaning limit
If this is OLTP try LRX_MAX/MIN_DIRTY at 5/1.
> LTXHWM 50 # Long transaction high water mark> percentage
> LTXEHWM 60 # Long transaction high water mark
> (exclusive)
> TXTIMEOUT 0x12c # Transaction timeout (in sec)
> STACKSIZE 128 # Stack size (Kbytes)>
> # System Page Size
> # BUFFSIZE - Dynamic Server no longer supports this configuration parameter.
> # To determine the page size used by Dynamic Server on your
> platform
> # see the last line of output from the command, 'onstat -b'.
>
> # Recovery Variables
> # OFF_RECVRY_THREADS:
> # Number of parallel worker threads during fast recovery or an offline
> restore.
> # ON_RECVRY_THREADS:
> # Number of parallel worker threads during an online restore.
>
> OFF_RECVRY_THREADS 10 # Default number of offline worker> threads
> ON_RECVRY_THREADS 1 # Default number of online worker threads>
> # Data Replication Variables
> # DRAUTO: 0 manual, 1 retain type, 2 reverse type
> DRAUTO 0 # DR automatic switchover
> DRINTERVAL 30 # DR max time between DR buffer flushes (in
> sec)
> DRTIMEOUT 30 # DR network timeout (in sec)> DRLOSTFOUND /home/informix/etc/dr.lostfound # DR lost+found file path
>
> # CDR Variables
> CDR_LOGBUFFERS 2048 # size of log reading buffer pool (Kbytes)
> CDR_EVALTHREADS 1,2 # evaluator threads (per-cpu-vp,additional)
> CDR_DSLOCKWAIT 5 # DS lockwait timeout (seconds)
> CDR_QUEUEMEM 4096 # Maximum amount of memory for any CDR queue
> (Kbytes)>
> # Backup/Restore variables
> BAR_ACT_LOG /home/informix/bar_act.log
> BAR_MAX_BACKUP 3
> BAR_RETRY 1
> BAR_NB_XPORT_COUNT 10
> BAR_XFER_BUF_SIZE 31
> BAR_BSALIB_PATH /usr/lib/ibsad001.so>
> # Informix Storage Manager variables
> ISM_DATA_POOL
Thanks for all your help so far. Have not tried anything yet 'cause I took a LONG weekend. Will be back and work on Tuesday and will post the other information asked for and try the suggestions. Thanks again Robin
Tavis Elliott wrote:
>
> * snip *
>
> > > ********** OUTPUT FROM onstat-p **********
> > >
> > > Informix Dynamic Server Version 7.31.UC5 -- On-Line -- Up 8 days 14:55:04
> > > -- 491520 Kbytes
> > >
> > > Profile
> > > dskreads pagreads bufreads %cached dskwrits pagwrits bufwrits %cached
> > > 682295405 18023000 3083027087 77.87 71759590 15652589 1036581591 93.08
> >
> > REALLY POOR read cache %, Informix normally averages over 90%! Need more
> > buffers.
> >
> > > isamtot open start read write rewrite delete commit
> > > rollbk
> > > 1492423941 18991866 243150836 3111959883 1137426567 4844731 2152933 80738
> > > 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 855488.77 72041.35 2699 5398
> > >
> > > bufwaits lokwaits lockreqs deadlks dltouts ckpwaits compress seqscans
> > > 30666291 5573 3559009654 0 0 22997 4401153 1335818
> >
> > BUFWAITS RATIO is nearly 100%! Anything over 10% is death and over 7% is
> > slow. Definitely need more LRUS and CLEANERS make both 128.
>
> Pardon my ignorance, I recently started reading the newsgroups about
> performance issues. What is the 'BUFWAITS RATIO' ?
The bufwaits ratio is a diagnostic I reasoned out and posted here and others
have found useful, towit:
BR = (bufwaits / (pagreads + bufwrits)) * 100%
Because pages read from disk need a fresh buffer to write into and writes
to existing buffers (all Informix writes are to existing buffers) each
require the modification of an LRU queue and so an LRU latch. It turns out
that if there are not enough LRUS to prevent contention for them from many
clients many of the bufwaits will actually be LRU latch waits. From my own
experience and gathering the observations of others using the ratio we have
determined that any OLTP server with a BR greater than 7% is running rather
more slowly than it needs to and values over 10% always correspond to users
complaining of poor response time. Increasing LRUS and CLEANERS will
always reduce the BR until you hit the max of 128 LRUS for IDS (256 for
XPS). If you still have BR problems you can try increasing BUFFERS also
and then you have to use the undocumented ONCONFIG parameter LRUPRIORITY
to alter how clients select LRU queues to reduce contention.
> > > ixda-RA idx-RA da-RA RA-pgsused lchwaits
> > > 250071741 406399 315028979 565468702 11963653
> > >
> > > *********** OUTPUT from onstat-P| tail -5 ***********
> > >
> > > Percentages:
> > > Data 59.32
Percentage of buffers containing data pages.
> > > Btree 40.10
Percentage of buffers containing index pages.
> > > Other 0.59
The rest.
> > >
> >
> > Btree looks high, I thought 731UC5 does not have this bug!
> >
>
> What do these numbers mean, and what should they be at? (Also, which bug?)
See above for the first part. Unless you are manually setting many indexes
RESIDENT it is normal for Btree to be around 10-20% of buffers. There was
a bug in 7.24 which caused all index pages to be marked as index nodes,
even leaf pages, which did not affect 7.24 at all. The buggy code was
fixed in 7.30, except for the index build code in oncheck (if you have
early versions of 7.30 DO NOT LET oncheck build indexes). This
misidentification of page types causes 7.3x to classify ALL index pages as
MED-HIGH priority (data pages are MEDIUM and index leaves are supposed to
be LOW) so that over time 40% or more of your buffers are taken up by index
pages starving out data pages and causing buffer thrashing. This is the
bug that was referred to. If you have this bug you must drop and recreate
ALL indexes created by 7.24 or oncheck.
Art S. Kagel
>
> Thanks!
"Art S. Kagel" wrote: > If you still have BR problems you can try increasing BUFFERS also > and then you have to use the undocumented ONCONFIG parameter LRUPRIORITY > to alter how clients select LRU queues to reduce contention. Oops! Can You give us more detailed description about LRUPRIORITY, Art? > Art S. Kagel Leonid Vorontsov
Leonids.Voroncovs@dati.lv wrote: > > "Art S. Kagel" wrote: > > > If you still have BR problems you can try increasing BUFFERS also > > and then you have to use the undocumented ONCONFIG parameter LRUPRIORITY > > to alter how clients select LRU queues to reduce contention. > > Oops! Can You give us more detailed description about LRUPRIORITY, Art? Sorry that should have been LRUPOLICY. The values and descriptions are: LRUPOLICY 0x0 - Default. Always hash to choose an LRU, rehash if waiting too long. LRUPOLICY 0x1 - Use session ID to generate a consistent LRU selection per session for any 'get'.( I think a 'get' is obtaining the LRU's LRUed buffer before writing a clean page to it. LRUPOLICY 0x2 - Wait on initial LRU for a 'get' operation. Do not rehash. LRUPOLICY 0x4 - Wait on initial LRU for a 'clean put', ie replacing a buffer at the head of the clean LRU after reading a page from disk into an empty or recycled buffer. Do not rehash. LRUPOLICY 0x8 - Wait on initial LRU for a 'dirty put', ie replacing a buffer at the head of the dirty LRU after updating its contents. Do not rehash. LRUPOLICY 0x10 - Use session ID to generate a consistent LRU selection per session for any 'put' operation (ie returning a buffer to the LRU queues). These values can be mathematically OR'd to create values in the range 0-31 which can control all or part of the LRU selection and wait policies. A value of 0x11 would cause each session to initially always select the same LRU queue which MAY eliminate LRU contention when the number of sessions is not significantly larger than LRUS. If sessions < LRUS it will in effect make each LRU private for a session or two. The even values (2,4,8) will case a session to remain in wait on the selected LRU and not rehash to try to find a less hotly contended one. David didn't you ask me for this for the FAQ a while back? Did I come through? Gawd I'm feather brained sometimes. Here 'tis anyway. Art S. Kagel
In article <39512DB0.4B6ABA8E@bloomberg.net>, Art S. Kagel <kagel@bloomberg.net> writes > > >Leonids.Voroncovs@dati.lv wrote: >> >> "Art S. Kagel" wrote: >> >> > If you still have BR problems you can try increasing BUFFERS also >> > and then you have to use the undocumented ONCONFIG parameter LRUPRIORITY >> > to alter how clients select LRU queues to reduce contention. >> >> Oops! Can You give us more detailed description about LRUPRIORITY, Art? > >Sorry that should have been LRUPOLICY. The values and descriptions are: > >LRUPOLICY 0x0 - Default. Always hash to choose an LRU, rehash if waiting > too long. >LRUPOLICY 0x1 - Use session ID to generate a consistent LRU selection > per session for any 'get'.( I think a 'get' is obtaining > the LRU's LRUed buffer before writing a clean page to it. So if the constant LRU queue is all dirty then replace a buffer on THAT LRU forcing a buffer write to disk? >LRUPOLICY 0x2 - Wait on initial LRU for a 'get' operation. Do not rehash. >LRUPOLICY 0x4 - Wait on initial LRU for a 'clean put', ie replacing a > buffer at the head of the clean LRU after reading a page > from disk into an empty or recycled buffer. Do not rehash. >LRUPOLICY 0x8 - Wait on initial LRU for a 'dirty put', ie replacing a > buffer at the head of the dirty LRU after updating its > contents. Do not rehash. >LRUPOLICY 0x10 - Use session ID to generate a consistent LRU selection > per session for any 'put' operation (ie returning a buffer > to the LRU queues). > So if the constant LRU queue is all dirty then replace a buffer on THAT LRU forcing a buffer write to disk? This means a session doing lots of writes will experience lots of fg writes?? ... OK, so say I have an application. An average server has 32 users. Largest server has 100 users. All currently have LRUS=127. Which LRUPOLICY should I use? Reads are index based except one query which users run frequently. This one query scans a single massive table (1,000,000 row table and we only have 10,000 buffers) and should reuse a small amount of buffers to avoid fill the buffer cache since we can't possible fit the table in memory and hence the next query will not read from the buffer cache since the initial pages of the scan will have been flushed from the buffer cache.. >These values can be mathematically OR'd to create values in the range 0-31 >which can control all or part of the LRU selection and wait policies. A >value of 0x11 would cause each session to initially always select the same >LRU queue which MAY eliminate LRU contention when the number of sessions is >not significantly larger than LRUS. If sessions < LRUS it will in effect >make each LRU private for a session or two. The even values (2,4,8) will >case a session to remain in wait on the selected LRU and not rehash to try >to find a less hotly contended one. > >David didn't you ask me for this for the FAQ a while back? Did I come >through? Gawd I'm feather brained sometimes. Here 'tis anyway. > Added to the list. Will be got to real soon now (put my back out and I've been in pain all week!). FAQ is first on my list of things todo just below work,eat,sleep to avoid pain!! >Art S. Kagel -- David Williams
David Williams wrote: > > In article <39512DB0.4B6ABA8E@bloomberg.net>, Art S. Kagel > <kagel@bloomberg.net> writes > > > > > >Leonids.Voroncovs@dati.lv wrote: > >> > >> "Art S. Kagel" wrote: > >> > >> > If you still have BR problems you can try increasing BUFFERS also > >> > and then you have to use the undocumented ONCONFIG parameter LRUPRIORITY > >> > to alter how clients select LRU queues to reduce contention. > >> > >> Oops! Can You give us more detailed description about LRUPRIORITY, Art? > > > >Sorry that should have been LRUPOLICY. The values and descriptions are: > > > >LRUPOLICY 0x0 - Default. Always hash to choose an LRU, rehash if waiting > > too long. > >LRUPOLICY 0x1 - Use session ID to generate a consistent LRU selection > > per session for any 'get'.( I think a 'get' is obtaining > > the LRU's LRUed buffer before writing a clean page to it. > > So if the constant LRU queue is all dirty then replace a buffer on > THAT LRU forcing a buffer write to disk? Yeah, sounds like that would force an FGWrite. But 0x1 only controls the selection of initial LRU and does not prevent rehashing so I'm not sure. Likely in combination with the 'EVEN' policies it would. > >LRUPOLICY 0x2 - Wait on initial LRU for a 'get' operation. Do not rehash. > >LRUPOLICY 0x4 - Wait on initial LRU for a 'clean put', ie replacing a > > buffer at the head of the clean LRU after reading a page > > from disk into an empty or recycled buffer. Do not rehash. > >LRUPOLICY 0x8 - Wait on initial LRU for a 'dirty put', ie replacing a > > buffer at the head of the dirty LRU after updating its > > contents. Do not rehash. > >LRUPOLICY 0x10 - Use session ID to generate a consistent LRU selection > > per session for any 'put' operation (ie returning a buffer > > to the LRU queues). > > > So if the constant LRU queue is all dirty then replace a buffer on > THAT LRU forcing a buffer write to disk? This means a session doing > lots of writes will experience lots of fg writes?? Only if the cleaners are not keeping up. > ... > OK, so say I have an application. An average server has 32 users. > Largest server has 100 users. All currently have LRUS=127. Which > LRUPOLICY should I use? Damned if I know! My only instructions from Informix on using these is that their use MAY help relieve LRU and buffer contention on very busy systems with a number of active sessions that approximate the number of LRUs and MAY also help with large numbers of users. I was told to "PLAY" with them and see what happens based on the descriptions. > Reads are index based except one query which users run frequently. > This one query scans a single massive table (1,000,000 row table > and we only have 10,000 buffers) and should reuse a small amount of > buffers to avoid fill the buffer cache since we can't possible fit > the table in memory and hence the next query will not read from the > buffer cache since the initial pages of the scan will have been > flushed from the buffer cache.. This query could take good advantage of lite-scans to avoid flushing the buffer cache and slowing other users. Since the query itself is not getting any advantage from the buffer cache a lite-scan with its slightly lower overhead may be faster and the whole system will seem more responsive. > >These values can be mathematically OR'd to create values in the range 0-31 > >which can control all or part of the LRU selection and wait policies. A > >value of 0x11 would cause each session to initially always select the same > >LRU queue which MAY eliminate LRU contention when the number of sessions is > >not significantly larger than LRUS. If sessions < LRUS it will in effect > >make each LRU private for a session or two. The even values (2,4,8) will > >case a session to remain in wait on the selected LRU and not rehash to try > >to find a less hotly contended one. > > > >David didn't you ask me for this for the FAQ a while back? Did I come > >through? Gawd I'm feather brained sometimes. Here 'tis anyway. > > > > Added to the list. Will be got to real soon now (put my back out and > I've been in pain all week!). FAQ is first on my list of things todo > just below work,eat,sleep to avoid pain!! Avoiding pain, I can empathize with that! Art S. Kagel