http://www.sqlservercentral.com/blogs/robert_davis/2009/05/13/What-mechanism-allows-SQL-Server-2008-to-commit-transactions-on-the-mirror-faster-than-SQL-Server-2005/ Printed 2016/10/01 08:16AM
Database Mirroring FAQ: What mechanism allows SQL Server 2008 to commit transactions on the mirror faster than SQL Server 2005?
Question: What mechanism allows SQL Server 2008 to commit transactions on the mirror faster than SQL Server 2005?
This question was asked on a technical discussion group. My reply follows.
Hello. In SQL 2008 we have touted the “fast commit” that enables the mirror to more rapidly provide acknowledgement to the principal that it has received the transaction. Is this feature implemented through caching mechanisms that are persisted to disk? Or does the mirror allocate RAM for this and then provide the acknowledgement? The former is what the customer would like to hear for fear of data loss.
I haven’t heard the term “fast commit” used before, but I can make an educated guess at what you are asking. There are a few different things going on that allows the transactions to be committed on the mirror faster in SQL 2008.
- Log stream compression: The stream of tran log records are compressed before being sent to the mirror. This results in faster transfer of transactions.
- Write-ahead of the log stream: As transactions are streamed in, the transactions are written to disk without processing them while at the same time transactions written to disk are being processed by the mirror.
- Better use of the log send buffers: rather than create a new log send buffer in the log cache every time a log flush occurs, SQL reuses existing log send buffers if there is enough free space to hold the log records. The log cache is a section of memory reserved for storing data that is going to written to the log.