Checkpoint/LRU question
Posted in 2000
Question: do checkpoints and LRU (LRU_MAX/MIN_DIRTY) flushes block user sessions, are they the same thing, and are LRU flushes logged? Answer given: checkpoints block updating threads (and threads on CPU VP #1 while dirty buffers flush, with some exceptions), while SELECTs on other CPU VPs generally continue; LRU flushing is separate, blocks only a thread touching a page being flushed, and is not recorded in the message log. On the LRU-vs-chunk-write balance, the advice was that it depends on the workload, with a preference for steady response over long checkpoint stalls. A shell script to average recent checkpoint durations from the online.log was posted.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Triggers, Constraints & Referential Integrity, Logging & Checkpoints
Hi, Does a checkpoint block the users sessions ? As well when buffers are flushed via MAX LRU ? Does A LRU-flush trigger an ordinary checkpoint or is it different ? and is it written on the online.log ? It seems that not ... I'm not sure ... Thanks in advance, Manel Falcó
"Manel Falcó i Aige" wrote: > > Hi, > Does a checkpoint block the users sessions ? As well when buffers are > flushed via MAX LRU ? At checkpoint time any users performing updates will be blocked. In addition, at least through 7.30 Informix says they have rewritten this in 7.31, any threads currently active in CPU VP#1 will block during a checkpoint until all of the dirty buffers have been flushed unless there are fewer than 200 dirty buffers or there is not a free page cleaner thread available (in the latter case the checkpoint thread will block until one is and user threads will continue for a while). Otherwise, threads running in other CPU VPs that are only performing SELECTs will not block during a checkpoint. During LRU flushing via LRU_MAX/MIN_DIRTY no user thread blocking will occur except any thread accessing a page in the process of being flushed but briefly. > Does A LRU-flush trigger an ordinary checkpoint or is it different ? Different. > and is it written on the online.log ? It seems that not ... I'm not > sure ... LRU flushing is not noted in the message log. Art S. Kagel
"Art S. Kagel" wrote: > > "Manel Falcó i Aige" wrote: > > > > Hi, > > Does a checkpoint block the users sessions ? As well when buffers are > > flushed via MAX LRU ? ...snip... > > and is it written on the online.log ? It seems that not ... I'm not > > sure ... > > LRU flushing is not noted in the message log. I sure wish it was. It would be a great way to measure activity AND tune your engine. I have a script that parses online.log and gets an average checkpoint duration for the last X checkpoints. Doing the same type of thing for LRU flushing would be cool....... Allen
Hey Allen, Can we find your script or similar in any FAQ ? (or better, can you sent it to us, please ... am I cheeky ?) About LRU/Chunks writes, anyone know what is the best balance between these kind of writes ? %50 ? Regards, Manel Falcó On Fri, 14 Jul 2000 19:36:28 GMT, allenj <allenj@ndr.com> wrote: > > >"Art S. Kagel" wrote: >> >> "Manel Falcó i Aige" wrote: >> > >> > Hi, >> > Does a checkpoint block the users sessions ? As well when buffers are >> > flushed via MAX LRU ? > >...snip... > >> > and is it written on the online.log ? It seems that not ... I'm not >> > sure ... >> >> LRU flushing is not noted in the message log. > >I sure wish it was. It would be a great way to measure activity AND >tune your engine. I have a script that parses online.log and gets >an average checkpoint duration for the last X checkpoints. Doing the >same type of thing for LRU flushing would be cool....... > >Allen
"Manel Falc' i Aige" <manel@semic.es> wrote in message news:39731544.25322526@news.bcn.ttd.net... > Hey Allen, > Can we find your script or similar in any FAQ ? (or better, can you > sent it to us, please ... am I cheeky ?) > His script can be found at www.iiug.org. > About LRU/Chunks writes, anyone know what is the best balance between > these kind of writes ? %50 ? > It all depends on what your system does and needs. LRU and Chunk writes each have their advantages/costs and you have to weigh the amout of time you want to spend blocked in checkpoints while the more efficient Chunk writes are occuring, versus the additional I/O time that the LRU writes may require. IMHO, the efficiency of the chunk write is not sufficient to offset the user aggravation caused by checkpoints in the 5 to 10 second range. I'd rather have a consistent 'good' user response time than periods of 'great' response interrupted (either randomly or predictably) by a period of 'NO' response time. Users never remember how well a system performs, only when it goes sour. HTH, Doug > Regards, > Manel Falc' > > > On Fri, 14 Jul 2000 19:36:28 GMT, allenj <allenj@ndr.com> wrote: > > > > > > >"Art S. Kagel" wrote: > >> > >> "Manel Falc' i Aige" wrote: > >> > > >> > Hi, > >> > Does a checkpoint block the users sessions ? As well when buffers are > >> > flushed via MAX LRU ? > > > >...snip... > > > >> > and is it written on the online.log ? It seems that not ... I'm not > >> > sure ... > >> > >> LRU flushing is not noted in the message log. > > > >I sure wish it was. It would be a great way to measure activity AND > >tune your engine. I have a script that parses online.log and gets > >an average checkpoint duration for the last X checkpoints. Doing the > >same type of thing for LRU flushing would be cool....... > > > >Allen >
I *think* I originally got the script from an Informix book (Joe Lumbley?), and that it just showed you the last 5 checkpoint times. No average duration. I *think* I then modified it to show you average checkpoint duration for the last X checkpoints, where you indicate X on the cmd-line. I didn't see anything like this on IIUG, but the site is so slow right now that I didn't look for long......... Here it is: ---------------------------------------- #!/bin/csh # $INFORMIXDIR/bin/onstat - echo Current time is: `date` grep Checkpoint `grep MSGPATH ${INFORMIXDIR}/etc/${ONCONFIG} | awk '{print $2}' ` | tail -$1 | awk '{total += $6} END {print "Average checkpoint duration: ", total/NR}' --------------------------------------------- Allen Doug Agnew wrote: > > "Manel Falcó i Aige" <manel@semic.es> wrote in message > news:39731544.25322526@news.bcn.ttd.net... > > Hey Allen, > > Can we find your script or similar in any FAQ ? (or better, can you > > sent it to us, please ... am I cheeky ?) > > > His script can be found at www.iiug.org. > > > About LRU/Chunks writes, anyone know what is the best balance between > > these kind of writes ? %50 ? > > > It all depends on what your system does and needs. LRU and Chunk writes > each have their advantages/costs and you have to weigh the amout of time you > want to spend blocked in checkpoints while the more efficient Chunk writes > are occuring, versus the additional I/O time that the LRU writes may > require. > IMHO, the efficiency of the chunk write is not sufficient to offset the user > aggravation caused by checkpoints in the 5 to 10 second range. I'd rather > have a consistent 'good' user response time than periods of 'great' response > interrupted (either randomly or predictably) by a period of 'NO' response > time. Users never remember how well a system performs, only when it goes > sour. > > HTH, > Doug > > Regards, > > Manel Falcó > > > > > > On Fri, 14 Jul 2000 19:36:28 GMT, allenj <allenj@ndr.com> wrote: > > > > > > > > > > >"Art S. Kagel" wrote: > > >> > > >> "Manel Falcó i Aige" wrote: > > >> > > > >> > Hi, > > >> > Does a checkpoint block the users sessions ? As well when buffers > are > > >> > flushed via MAX LRU ? > > > > > >...snip... > > > > > >> > and is it written on the online.log ? It seems that not ... I'm not > > >> > sure ... > > >> > > >> LRU flushing is not noted in the message log. > > > > > >I sure wish it was. It would be a great way to measure activity AND > > >tune your engine. I have a script that parses online.log and gets > > >an average checkpoint duration for the last X checkpoints. Doing the > > >same type of thing for LRU flushing would be cool....... > > > > > >Allen > >