Monday, July 17, 2006

Obscure settings

I remember when MySQL was spreading rapidly, mostly due to its ease of use. That was long time ago, apparently. Now we are entering the dark ages of obscure settings, or so it seems, reading some MySQL Cluster setting definitions.
Quoting from the the manual:

TimeBetweenLocalCheckpoints

This parameter is an exception in that it does not specify a time to wait before starting a new local checkpoint; rather, it is used to ensure that local checkpoints are not performed in a cluster where relatively few updates are taking place. In most clusters with high update rates, it is likely that a new local checkpoint is started immediately after the previous one has been completed.

The size of all write operations executed since the start of the previous local checkpoints is added. This parameter is also exceptional in that it is specified as the base-2 logarithm of the number of 4-byte words, so that the default value 20 means 4MB (4 × 220) of write operations, 21 would mean 8MB, and so on up to a maximum value of 31, which equates to 8GB of write operations.


Any suggestions for taking this definition down to planet Earth?

1 comment:

Sheeri said...

One of the problems with having geeks write software is that they'll do it any way they can. I'm sure for optimization purposes this is the best way to do it, however, it would be much much easier if they simply made a call that transforms the number.

For instance, why not have the "show" command (or whatever allows humans to see the paramter) show:

select CONCAT(power(2,x)/1024/1024*4,'MB');

Where x is the actual parameter (the base-2 log of # of 4-byte words). So for 20, it would show 4MB.

Of course, the question is how to document that, particularly if the paramater only takes integers (ie, 20, not 20.584962500721, which would be the approximate value for 6MB of write ops). In that case, values could be specified in a chart, I guess.

Vote on Planet MySQL