For performance, Falcon
uses a group commit
system that ensures that all pending updates to the serial log
are written to disk at the same time. Falcon
can have multiple active transactions, but only one transactions
writes all the pending changes into the serial log on disk,
reducing the number of disk writes and improving the overall
performance of the serial log.
For example:
Transaction 1 commits, creates all the necessary log entries, and starts to write the log to disk.
While Transaction 1 commits are being written, Transactions 2 and 3 write their log entries into the serial log.
Once Transaction 1 has finished the physical write, either transaction 2 or 3 (but not both) will write out the unwritten portion of the in-memory log to disk. Because both transactions have occurred since the last disk-write of the serial log, the information for both is written to the disk at the same time.
While transactions 2 and 3 are writing, transactions 4, 5 and 6 are being written to the in-memory log. When the write for 2 and 3 completes, the entries for 4, 5 and 6 are written.
The result of the above process is that there are only three physical writes to disk, even though there are six transactions in the sequence:
Transaction 1
Transactions 2 and 3
Transactions 4, 5 and 6
The process continues, with just one transaction writing all the in-memory serial log entries to disk since the last write. The entire system ensures that the in-memory and disk logs are kept in synchronization, with the fewest possible physical disk writes.