Thursday, December 31, 2009

PBXT 1.0.10, New Year Release!

I have just released PBXT 1.0.10 RC4. The sources can be downloaded from primebase.org, or from Launchpad.

The major feature in this release is the implementation of the pbxt_flush_log_at_trx_commit system variable. Similar to the InnoDB equivalent, this variable allows you to determine the level of durability of transactions.

This is a trade-off: by decreasing durability, the speed of database update operations can be increased.

The default setting is 1, which means full durability: the transaction log is flushed on every transaction commit.

Setting the variable to 2 reduces durability, by just writing the log on transaction commit (no flush is done). In this case, transactions can only be lost if the entire server machine goes down (for example a power failure).

The lowest level of durability is 0. In this case the transaction log is not written on transaction commit. Transactions can be lost if the server crashes.

In the case of 2 and 0, the engine flushes the transaction log at least once per second. So only transactions executed within the last second can be lost.

Ironically, PBXT started life as a "partially durable" storage engine (level 2 according to the description above). Almost exactly 2 years ago I started the implementation of full durability. It has taken a while to build in the original "feature" :)

The main reason for doing this has been the Mac version, and our work with TeamDrive. On the Mac the fsync() operations is a fake. To do a true flush to disk you have to call fcntl(of->of_filedes, F_FULLFSYNC, 0). Problem is, the real flush is incredibly slow (about 20 times slower than fsync), but necessary to avoid any corruption.

The advantage of a lot of applications like TeamDrive is that they can tolerate a lower level of durability. So we can look forward to an even speedier TeamDrive in the future :)

I would love to hear from anyone testing the new version. Bugs can be reported on Launchpad, as usual.

Happy New Year to you all!

6 comments:

Unknown said...

Paul,

Congratulations with release!
I can't wait to benchmark it against XtraDB :)

Tim Soderstrom said...

Congratulations on the new release! It's great to see configurable durability and I can't wait to give this a spin!

Happy New Year as well!

Anonymous said...

Any idea why this post appeared on http://planet.mysql.com/ but now seems gone again?

--Peter Laursen

Paul McCullagh said...

Hi Peter,

No idea, but it seems to have appeared again.

Ivan said...

Paul,

Congratulations for the new release, I will definitely test it!

All the best for 2010, for you, family, friends, and for the success of Primebase!

-ivan

Ivan said...

Paul,

Congratulations for the new release, I will definitely test it!

All the best for 2010, for you, family, friends, and for the success of Primebase!

-ivan