Facebook gave a MySQL Tech Talk where they talked about many things MySQL, but one of the more subtle and interesting points was their focus on controlling the variance of request response times and not just worrying about maximizing queries per second.

But first the scalability. Facebook's OLTP performance numbers were as usual, quite dramatic:

- Query response times: 4ms reads, 5ms writes.

- Rows read per second: 450M peak

- Network bytes per second: 38GB peak

- Queries per second: 13M peak

- Rows changed per second: 3.5M peak

- InnoDB disk ops per second: 5.2M peak

Some thoughts on creating quality, not quantity:

- They don't care about average response times, instead, they want to minimize variance. Every click must be responded to quickly. The quality of service for each request matters.

- It's OK if a query is slow as long as it is always slow.

- They don't try to get the highest queries per second out of each machine. What is important is that the edge cases are not the bad.

- They figure out why the response time for the worst query is bad and then fix it.

- The performance community is often focussed on getting the highest queries per second. It's about making sure they have the best mix of IOPs available, cache size, and space.

Read more..