How often does GoldenGate checkpoint?

While running a 10046 trace against a replicat session, I saw UPDATE statements against the checkpoint table. While this isn’t unexpected, as I had configured the replicat to use a checkpoint table, I was curious to see how often it did. in other words, is it every 3 seconds, or every 100 rows, etc.

I wasn’t surprised, as it is never that simple, to find it somewhat random. To verify, I ran a test with several thousand INSERTs per minute against two tables, ORDERS and ORDER_DETAILS. I then extracted the CURSOR # in the 10046 trace for each statement, and ran the following awk against the trace file.

expressdb1:oracle:express1:/u01/app/oracle/diag/rdbms/express/express1/trace# cat a.awk
{
  if ($0 ~ "EXEC #47821729564056" || $0 ~ "EXEC #47821729706488") {
    j++
    found=1
  }
  else if($0 ~ "XCTEND rlbk=0, rd_only=0" && found=1) {
    split($0,t,",")
    split(t[3],s,"=")
    PROCESSED++
    if (last > 0 && (PROCESSED <= 10 || PROCESSED >= 100)) {
      printf("Inserted %i rows in %.1f seconds before checkpointing\n",j,(s[2]-last) / 1000000)
    }
    j=0
    last=s[2]
  }
}
expressdb1:oracle:express1:/u01/app/oracle/diag/rdbms/express/express1/trace# awk -f a.awk express1_ora_23158.trc
Inserted 701 rows in 1.3 seconds before checkpointing
Inserted 236 rows in 2.9 seconds before checkpointing
Inserted 399 rows in 10.1 seconds before checkpointing
Inserted 22 rows in 1.7 seconds before checkpointing
Inserted 75 rows in 3.3 seconds before checkpointing
Inserted 458 rows in 4.1 seconds before checkpointing
Inserted 107 rows in 1.2 seconds before checkpointing
Inserted 339 rows in 7.2 seconds before checkpointing
Inserted 164 rows in 5.0 seconds before checkpointing
Inserted 263 rows in 5.4 seconds before checkpointing
Inserted 89 rows in 3.1 seconds before checkpointing
Inserted 121 rows in 5.5 seconds before checkpointing
Inserted 160 rows in 2.0 seconds before checkpointing
Inserted 363 rows in 4.3 seconds before checkpointing
Inserted 107 rows in 13.6 seconds before checkpointing
Inserted 303 rows in 1.8 seconds before checkpointing
Inserted 120 rows in 2.4 seconds before checkpointing
Inserted 118 rows in 1.3 seconds before checkpointing
Inserted 204 rows in 2.3 seconds before checkpointing
Inserted 333 rows in 6.1 seconds before checkpointing
Inserted 64 rows in 4.3 seconds before checkpointing
Inserted 198 rows in 9.9 seconds before checkpointing
Inserted 6 rows in 7.0 seconds before checkpointing
expressdb1:oracle:express1:/u01/app/oracle/diag/rdbms/express/express1/trace#

When I did the math, I found the time between checkpoints was as low as about a second, and as high as 13 seconds. The median and average was about two seconds. The INSERT execution counts between checkpoints, as you can see above, are all over the map.

No real information, but I thought it was interesting.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.