checkpoint
Posted in 2003
Topics: Logging & Checkpoints
Dear all, what is the impact to increase the CKPTINTVL value. Any side-effect??? If my system crash, do I lose more data because the buffer doesnt get fushed by the checkpoint action??? I know the LRUs will fush when it reachs the LRU_MAX_DIRTY. Anyone can give me more clear explaination. Thanks in advance Franklin
"Franklin Tang" <franklin@macauslot.com> wrote :
> Dear all,
> what is the impact to increase the CKPTINTVL value. Any side-effect???
> If my system crash, do I lose more data because the buffer doesnt get fushed
> by the checkpoint action??? I know the LRUs will fush when it reachs the
> LRU_MAX_DIRTY. Anyone can give me more clear explaination.
It is one of the misconception that when LRU cleaners flush dirty pages,
it gurantees that the changed data will be there after a system crash. That
is wrong. For example, assume the following scenario
CKPTINTVL is set to 30 min
LRU_MAX/MIN is set to 2/1 Last checkpoint occured at 2.05 pm.
If the system crashes at 2.30 pm, then Informix will reload pages from the
physical log totally ignoring any LRU clean after 2.05 pm. So all those buffer
cleaning from LRU cleaners is useless.
Of course if the database is logged, then it would apply every transaction from the log files,
restoring it to the last commit point around 2.30 pm. So you are safe.
So my advice, if your database is logged , you can keep as high a value of CKPTINTVL as
you feel comfortable. I would not mind keeping an interval of even 1 hour. You would
benefit from LRU writes as opposed to chunk writes which blocks the system.
The only downside is that it will take longer to recover from a crash as it has to apply
all changes since last checkpoint. But I have seen that fast recovery is very fast.
I can live with that.
I am not sure whether this would work in environments where replication is used.
OTOH if your database is not logged, then keep checkpoint interval as low as possible,
since you want to lose data as less as possible.