Informix

Informix

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
  • 1.  Checkpoints rarely occurring

    Posted 23 hours ago

    We have clients still on Informix 11.70 on Windows.  All of them were installed with the default settings regarding checkpoints. In fact the only changes to onconfig were to set the TAPEDEV to NUL.

    These 2 checkpoint values remain as shown.  Installed by the install program as this:

    CKPTINTVL 300
    AUTO_CKPTS 1

    For most clients this works.  I see regular checkpoints at 5 minute intervals if something else doesn't trip the checkpoint first.

    Several months ago, I wrote about a client where we just lost all of the data for a day when the machine went down. As I suspected, and confirmed by others on this group, it was not doing checkpoints.  Our hardware guy said the machine had a faulty memory stick, so I chalked it up to that.  But we had a reboot mid-day again when the machine was accidentally powered down again.  Again we lost data.  I looked at onstat -g ckp and saw that it wasn't doing regular checkpoints.

    Also, the onstat -g ckp sometimes reports AUTO_CKPTS=Off, even though it is set to 1 (enabled) and I'm seeing it's been doing regular checkpoints every 5 minutes.

    Why might this not be working? Onconfig is set as shown above.  In the meantime, I set up a task scheduler job to force a checkpoint with onmode -c at regular intervals to force a manual checkpoint. But I shouldn't have to do that.  We do not use transaction logging. Anything to look at or check to see why this isn't working?

    Wondering if something got corrupted (possibly from the bad memory stick) and I should just uninstall/reinstall the entire database and reload it.  Maybe something in the sysmaster or other system databases/tables. Just wondering if a complete reinstall is the fix.



    ------------------------------
    Joel Schumacher
    ------------------------------


  • 2.  RE: Checkpoints rarely occurring

    Posted 17 hours ago

    Hi Joel,

    this problem was fixed in 12.10 (xC14) and 14.10 (xC4) more than five years ago: even with AUTO_CKPTS on, we'd now do a safety checkpoint every CKPTINTVL.

    With versions missing this fix AND running non-logging databases, it is not recommended to have AUTO_CKPTS on.  (In fact, without logging, so without much to recover with a server restart, there's no point in having it on as your fast recovery will be tiny anyway.)

    HTH,
     Andreas



    ------------------------------
    Andreas Legner
    Informix Dev
    HCL Software
    ------------------------------



  • 3.  RE: Checkpoints rarely occurring

    Posted 16 hours ago
    Hi,

    if you are really on such an old (buggy) version, but you are seeing no way to upgrade.
    and want to stay with non-logged dbs,
    I would recommend to at least set up a cron which executes onmode -c periodically.

    Best,

    MARCUS HAARMANN






  • 4.  RE: Checkpoints rarely occurring

    Posted 8 hours ago

    Thank you and that was my first thought for a workaround and did that. It's WIndows, so it's the Task Manager, not cron, but I have a .bat that it runs that does an onmode -c which forces the checkpoint.



    ------------------------------
    Joel Schumacher
    ------------------------------



  • 5.  RE: Checkpoints rarely occurring

    Posted 7 hours ago

    Thank you.  We're working on the 14.10 upgrade, but we're have FourJs issues that prevented upgrading.  We're progressing though.  But now we're stuck on 11.70.  I'd have to look at what 12.10 can be installed on.  And, whether it works with that version of FourJs.

    I did copy all of the onconfig files for our clients so I could do comparisons and grep certain paramaters.  As well as do an onstat -g ckp on each client and see which ones were doing checkpoints and which weren't.  

    Turns out, ALL of the clients with RTO_SERVER_RESTART set to a value other than 0 were the ones not doing regular checkpoints.  Apparently this overrides the checkpoint interval to do it's own thing. Only it wasn't doing it's own thing regularly enough.  We're talking several hours of usage.

    I don't know why this was set at one place vs another.  The only thing we ever do to the onconfig file after installation is change TAPEDEV to NUL.  Recovery Time Objective sounds like something related to applying log files during recovery. That's something I'm unfamiliar with. The code I've inherited does not use transaction logging. The databases are created without LOG.  It's possible in some of the installs, "Transaction logging supported by applications(s)" on the Database Server Usage screen was checked "Yes".  Maybe that caused the installation to set the RTO_SERVER_RESTART to 60 at these sites?

    Apparently 0 means disabled and a value (60 or probably even 1 or 2) means enabled.

    I was able to stop the service, set this value to 0, then restart the service and checkpoints started happening.

    I did notice that there was sometimes more than 5 minutes. This was like 2am and the database wasn't active. I'm assuming if nothing is "dirty" and has nothing to do, that the every 5 minute checkpoint won't register on the onstat -b ckp? That it's not going to show up if it did nothing, only when it needs to flush cache to disk.

    Last night, after changing the RTO_SERVER_RESTART to 0, it was showing checkpoints, not at every 5 minutes.  It was 10 minutes or more.  But now, during the day, with users on the system, it's every 5 minutes, just like the configuration says.



    ------------------------------
    Joel Schumacher
    ------------------------------



  • 6.  RE: Checkpoints rarely occurring

    Posted 6 hours ago
    Hi,

    RTO_SERVER_RESTART was build to configure the server for optimized recovery after a (non-graceful) shutdown event.
    At recovery time, the server will roll forward the stored transactions in the logs (starting from last full checkpoint), 
    so the number of unflushed buffers after last checkpoint are relevant for this.
    This functionality was of course designed for transactional load (I personally have always had logged databases with 
    transactional applications during the whole time I have been working with Informix (started with Informix 5.0 back in 1993).
    This parameter was a very good idea to get away from regular checkpoints at fix intervals to more load dependent behaviour.
    The parameter defines the goal for maximum recovery time after an unclean shutdown.
    (a clean shutdown would include a checkpoint (onmode -ukcy).
    There are a number of parameters influencing the behaviour, most of them related to transactional databases
    with logging (aiming to do a full restore up to the moment of shutdown, optimally losing only open transactions).

    So yes, this parameter could of course influence the behaviour of checkpoints in a non-logging system in a weird way.
    The comment in recent onconfig files for the CKPINTVL parameter is the following (cannot tell for 11.70, but this is from 14.10):
    # CKPINTVL           - Specifies how often, in seconds, Informix checks
    #                      if a checkpoint is needed. 0 indicates that
    #                      Informix does not check for checkpoints. Ignored 
    #                      if RTO_SERVER_RESTART is set.

    There you can see that setting RTO_SERVER_RESTART really makes CKPINTVL obsolete.
    Since you do not have any logs resulting from transactions, RTO_SERVER_RESTART does not make sense in your environment.
    So it is not really a defect that no checkpoints are occurring, but a simple (documented) feature.
    The RTO_SERVER_RESTART simply has not found enough transactions to trigger the checkpoint.

    Best,

    MARCUS HAARMANN






  • 7.  RE: Checkpoints rarely occurring

    Posted 17 hours ago

    Joel:

    This is a very old bug in v11.70 which has been out-of-support for a LONG time. Your clients should upgrade to v14.10 (v12.10 will be going out-of-support in the spring so skip that). For now, just set AUTO_CKPTS to 0.

    Art



    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------