In my previous post I wrote about how I achived a >40% speedup on sysbench read-only using profile-guided optimisation (PGO). While this is a preliminary result, I though it was so interesting that it deserved early mention. The fact that any benchmark can be improved that much shows clearly that PGO is something worth looking… Continue reading More on 40% better single-threaded performance in MariaDB
Category: Uncategorized
40% better single-threaded performance in MariaDB
Continuing my investigation of single-threaded performance in the MariaDB server, I managed to increase throughput of single-threaded read-only sysbench by more than 40% so far: I use read-only sysbench 0.4.12 run like this: sysbench –num-threads=1 –test=oltp –oltp-test-mode=simple –oltp-read-only –oltp-skip-trx run And mysqld is run with minimal options: sql/mysqld –no-defaults –basedir=X –datadir=Y –innodb-buffer-pool-size=128M With modern high-performance… Continue reading 40% better single-threaded performance in MariaDB
MySQL/MariaDB single-threaded performance regressions, and a lesson in thread synchronisation primitives
I took a quick look at MariaDB 10.0 single-threaded performance (simple read-only sysbench). One thing immediately leaps to the eye, and I thought it worthy of mention. It contains an important lesson about the use of synchronisation primitives and in particular “atomic operations” in MariaDB (and MySQL). I am using the Linux perf tool on… Continue reading MySQL/MariaDB single-threaded performance regressions, and a lesson in thread synchronisation primitives
First steps with MariaDB Global Transaction ID
My previous writings were mostly theoretical, so I wanted to give a more practical example, showing the actual state of the current code. I also wanted to show how I have tried to make the feature fit well into the existing replication features, without requiring the user to enable lots of options or understand lots… Continue reading First steps with MariaDB Global Transaction ID
More on global transaction ID in MariaDB
I got some very good comments/questions on my previous post on MariaDB global transaction ID, from Giuseppe and Robert (of Tungsten fame). I thought a follow-up post would be appropriate to answer and further elaborate on the comments, as the points they raise are very important and interesting. (It also gives me the opportunity to… Continue reading More on global transaction ID in MariaDB
Global transaction ID in MariaDB
The main goal of global transaction ID is to make it easy to promote a new master and switch all slaves over to continue replication from the new master. This is currently harder than it could be, since the current replication position for a slave is specified in coordinates that are specific to the current… Continue reading Global transaction ID in MariaDB
Integer overflow
What do you think of this piece of C code? void foo(long v) { unsigned long u; unsigned sign; if (v < 0) { u = -v; sign = 1; } else { u = v; sign = 0; } … Seems pretty simple, right? Then what do you think of this output from MySQL:… Continue reading Integer overflow
Even faster group commit!
I found time to continue my previous work on group commit for the binary log in MariaDB. In current code, a (group) commit to InnoDB does not less than three fsync() calls: Once during InnoDB prepare, to make sure we can recover the transaction in InnoDB if we crash after writing it to the binlog.… Continue reading Even faster group commit!
Tale of a bug
This is a tale of the bug lp:798213. The bug report has the initial report, and a summary of the real problem obtained after detailed analysis, but it does not describe the processes of getting from the former to the latter. I thought it would be interesting to document this, as the analysis of this… Continue reading Tale of a bug
Benchmarking thread scheduling in group commit, part 2
I got access to our 12-core Intel server, so I was able to do some better benchmarks to test the different group commit thread scheduling methods: This graph shows queries-per-second as a function of number of parallel connections, for three test runs: Baseline MariaDB, without group commit. MariaDB with group commit, using the simple thread… Continue reading Benchmarking thread scheduling in group commit, part 2