Re: Checkpoint takes long
Posted in 1998
Kai Shen <shen@acer.de> wrote in article <36075023.82CCB1AD@acer.de>...
> Hi,
>
> on our SCO 5.0.4 machine we are running ODS 7.20 UC3. During the day
> when appr. 60-80 persons are using the machine, we permanently
> experience checkpoints that take 10 seconds or longer. I tried changing
> the time between checkpoints from 1 minute to 10 minutes and back to the
> default of 5 minutes, the checkpoints will always take very long.
> We have set the physical log size to 20000 and use 30 logical logs, each
> 2048. Our buffers are set to 100000, LOCKS 300000, LRU_MAX_DIRTY 2,
> LRU_MIN_DIRTY 0, LRUS 12.> Which parameters affect the checkpoint time mostly?
Jonathan Leffler's reply is excellent. Let me just add and elaborate a bit.
To support
60-80 users you probably should have more than 12 LRUs or there will be much
buffer contention, 64 is a good value. Also the fewer LRUs you have the more
dirty
buffers you will normally have at checkpoint time for a particular set of
LRU_MAX/MIN_DIRTY values. With few LRUs you will average close to the % of
buffers specified in LRU_MAX_DIRTY. With many LRUs you will average halfway
between the values of LRU_MAX_DIRTY and LRU_MIN_DIRTY. So if you run tbstat
-R
and the number of dirty buffers reported at the bottom is consistently closer
to 2% than
1% you need more LRUs.
Next, in ODS 5.xx it is imperitive that you have AT LEAST one CLEANER per LRU
to optimize checkpoint times. Check the onstat -F and compare the ratio of
LRU
writes to CHUNK writes. There should be few if any foreground writes
(foreground
writes are a clear sign that you need more LRUs and perhaps, but not
necessarily more buffers).
If you still cannot get the checkpoint duration down look to your
applications. Long
transactions and processes that remain in critical section for a long time
can
extend the duration of the checkpoint because the checkpoint has to wait for
all
active transactions to acknowledge that they have paused before it can
complete
and this cannot happen while a process is in a critical section.
Art S. Kagel
Any organism which has ceased to grow, has begun to die.