October 22, 2014

Impact of the sort buffer size in MySQL

The parameter sort_buffer_size is one the MySQL parameters that is far from obvious to adjust. It is a per session buffer that is allocated every time it is needed. The problem with the sort buffer comes from the way Linux allocates memory. Monty Taylor (here) have described the underlying issue in detail, but basically above […]

Another scalability fix in XtraDB

Recent scalability fixes in InnoDB and also Google’s and your SMP fixes almost made InnoDB results acceptable in primary key lookups queries, but secondary indexes were forgotten for some time. Now having Dell PowerEdge R900 on board (16CPU cores, 16GB RAM) I have some time for experiments, and I played with queries

How Percona does a MySQL Performance Audit

Our customers or prospective customers often ask us how we do a performance audit (it’s our most popular service). I thought I should write a blog post that will both answer their question, so I can just reply “read all about it at this URL” and share our methodology with readers a little bit. This […]

Improved InnoDB rw_lock patch

There is patch from Google to improve SMP performance , but for some workloads it showed for us reverse scalability. E.g. update_key benchmark from sysbench. There are also results with Yasufumi’s rw_locks (http://bugs.mysql.com/bug.php?id=26442)

Development plans

We gathered together our ideas of MySQL improvements on this page http://www.percona.com/percona-lab/dev-plan.html and we are going to implement some of them. My favorite one is – make InnoDB files .ibd (one created with –innodb-file-per-table=1) movable from one server to another, however it is sort of challenging. Probably next one patch we want to integrate is […]

Internals of InnoDB mutexes

InnoDB uses its own mutexes and read-write locks instead of POSIX-mutexes pthread_mutex*, the main reason for that is performance, but InnoDB’s implementation isn’t ideal and on modern SMP boxes can cause serious performance problems. Let’s look on InnoDB mutex (schematic for simplification):

FreeBSD tests

I’m continuing my experiments with different OS and today I tested FreeBSD 6.0 on my box. (more details about box and benchmark see here http://www.percona.com/blog/2006/06/13/quick-look-at-ubuntu-606/). Initially I was very pessimistic about FreeBSD, as results were (in transactions/sec, more is better. for comparison the results from Suse 10.0): InnoDB threads FreeBSD 6 Suse 10.0 Suse/ FreeBSD […]

MyISAM concurrent insert

Arjen posted a good note about MyISAM concurrent-insert features, though I should mention concurrent-insert can be cause of scalablity and peformance problems on SMP boxes, especially on queries processing range-queries. The reason of problems is POSIX read-write locks, which are used to protect key_buffer from concurrent changes and called for each processed row. More info […]

MyISAM mmap feature (5.1)

As you know MyISAM does not cache data, only indexes. MyISAM assumes OS cache is good enough and uses pread/pwrite system calls for reading/writing datafiles. However OS is not always good in this task, my benchmarks show Linux/Solaris aren’t scalable on intensive pread calls (I believe the same for Windows, but I did not test […]