Domas Mituzas
dom.as · Personal blog · on HN since 2011
Domas Mituzas, a database engineer with MySQL and Facebook experience, writes about MySQL performance, InnoDB, and Linux server behavior.
What HN saysHN commenters link it in database performance and benchmarking debates, such as MySQL versus MemSQL, and for his views on why Facebook uses MySQL.
25HN people shared it
11linked it in comments
15stories submitted
503story points
2 years agolast shared
2011people per year2026
Most-shared posts
- 1MySQL is bazillion times faster than MemSQL3 people · 339 points · first shared 2012 · 138 comments on HN
- 2Stonebraker trapped in Stonebraker 'fate worse than death'3 people · 30 points · first shared 2011 · 7 comments on HN
- 3MySQL does not need SQL3 people · 4 points · first shared 2016 · discussion on HN
- 4On “order by” optimization2 people · 33 points · first shared 2015 · 14 comments on HN
- 5On removing files (2016)2 people · 4 points · first shared 2018 · 1 comments on HN
- 6How InnoDB lost its advantage1 people · 69 points · first shared 2015 · 15 comments on HN
- 7MySQL Sucks at Accepting Connections1 people · 12 points · first shared 2011 · discussion on HN
- 8Linux memory management for servers1 people · 5 points · first shared 2016 · discussion on HN
- 9Where is MySQL innovation nowadays?1 people · 2 points · first shared 2013 · discussion on HN
- 10Steve Jobs vs. Michael Jackson1 people · 2 points · first shared 2011 · discussion on HN
- 11MySQL is doomed?1 people · 1 points · first shared 2012 · discussion on HN
- 12Blowing up in memory (MySQL)1 people · 1 points · first shared 2011 · discussion on HN
- 13Metaverse runs on MySQL1 people · 1 points · first shared 2011 · discussion on HN
- 14Embarrassment1 people · first shared 2016
- 15Profile guided optimization with gcc1 people · first shared 2015
What HN people wrote when they linked it
morgo · 2013-08-12
Durability will typically be very expensive to implement unless you have a fast SSD or RAID controller with NVRAM, so it will skew the test considerably if you make MySQL offer it, but say MongoDB does not have to.
But I do recommend it for the majority of people. Shameless plug: http://www.tocker.ca/2013/06/19/deciding-whether-or-not-to-make-mysql-…
Also: http://dom.as/2013/08/09/on-durability/ (Domas works on MySQL@Facebook).
zamalek · 2015-10-30
> I would take 100x increase in compilation times for a release build over a 2x increase in development time due to manual optimization.
If you're referring to super-optimization, it can take far more than 100x and isn't something that is being "classically automated" as humans likely can't do it in the first place. In addition, super-optimization will yield better results if you give it a better starting point. It's nothing at all like the optimization discussed in the blog post. Either way, it can be done against LLVM IR[4] and I'm sure it will creep into clang at some point.
So far as using profiling data to optimize code in the way that humans would: MSVC supports it[1], clang supports it[2] and gcc supports it[3]. Supposedly Microsoft saw a 30% performance increase [with a very specific workload] when they tried POGO on an internal build of SQL Server. Under normal circumstances, PGO should net you around 7% free perf.
[1]: https://msdn.microsoft.com/en-us/library/e7k32f4k.aspx
[2]: http://clang.llvm.org/docs/UsersManual.html#profile-guided-optimizatio…
[3]: http://dom.as/2009/07/27/profile-guided-optimization-with-gcc/
[4]: https://github.com/google/souper
throwdbaaway · 2023-08-14
Nice benchmark script. With EXPLAIN (ANALYZE, BUFFERS), I see that
* normalized/join version needs to read 5600 pages
* normalized/join version with an additional UNIQUE INDEX .. INCLUDE (type) needs to read 4500 pages
* denormalized version only needs to read 66 pages, almost 100x fewer
Related to this pagination use case, when using mysql, even the denormalized version may take minutes: https://dom.as/2015/07/30/on-order-by-optimization/
snaky · 2016-08-04
MySQL does need so much improvements
https://dom.as/2016/08/03/mysql-does-not-need-sql/
hodgesrm · 2016-05-24
Facebook guys as I understand it did look carefully at PostgreSQL; at least some of the engineers are very familiar with its internals. They found MySQL satisfactory for a variety of reasons including ability to engineer better performance but also replication which was much better in MySQL for a long time. In fact, for an interesting perspective on the "Facebook stuck on MySQL" topic see [1].
Interestingly much Facebook database work has been outside the relational orbit on systems like Cassandra and HBase, as well as RocksDB. The choice for most web properties today is not MySQL vs. PostgreSQL but RDBMS vs. "other" systems.
[1] https://dom.as/2011/07/08/stonebraker-trapped/
atdt · 2016-04-24
Yeah, I am the engineer mentioned in the article, and I agree the explanation doesn't really work. The pieces of the explanation that ended up in the article itself don't add up to a coherent explanation. The fault for that is mostly mine. In hindsight, my original explanation was too long and too elaborate to be helpful. It's a good reminder that it is easy to go to far with an analogy and end up complicating the thing you were trying to simplify. Oh well, live and learn :)
There are more (coherent and to-the-point) details about PoolCounter in the prologue to PoolCounter.php in MediaWiki's source tree:
https://github.com/wikimedia/mediawiki/blob/1617e7822eaf74261687d2d2c3…
And in a short blog post by Domas Mituzas, who is the original author of PoolCounter:
https://dom.as/2009/06/26/embarrassment/
ignoramous · 2014-10-02
You're right that memSQL absoutely crawls when it is set to "fully-durable" mode where it has to sync write to the disk. But it was never built for the use-case, and I guess that's missing the point.
memSQL, AFAIK, was built for highly concurrent reads and writes. It uses lock-free in-memory data structures, couple that with an eventually-durable mode, in addition to optimizing queries by the way of re-compiling SQL to CPP (something similar to what HHVM does for PHP), I think it would result in performance gains in certain (and not all) use-cases.
memSQL, if we dare simplify, is really a high-throughput cache front-ending an eventually-durable datastore.
I wonder how would RocksDB + a disk-backed DB measure upto memSQL.
Ref: http://dom.as/2012/06/26/memsql-rage/
rimantas · 2014-04-03
Check this "web scale" out: http://smalldatum.blogspot.com
(via http://dom.as/2014/03/31/mongo-io/ )
Goosey · 2014-03-19
Does anyone know if MemSQL has improved in ACID compliance (especially full durability performance) in the nearly 2 years since Domas previously[0] dissected it?
MemSQL sounds too good to be true sometimes, but I want to believe. Just wish it was open source.
[0] http://dom.as/2012/06/26/memsql-rage/ (hn discussion: https://news.ycombinator.com/item?id=4162488 )
spudlyo · 2011-06-17
Some MySQL vs PG tests done by Domas (of Facebook & Wikipedia fame) show some interesting differences between MySQL and PG for an in-memory read only test. I don't think there are any 50x differences though.
http://dom.as/2010/11/08/random-poking/
nl · 2013-11-25
Note that Stonebraker makes some good points, but there are many ways to build scalability and Stonebraker is too fast to dismiss many.
In particular, his criticism of traditional databases seems based more on philosophy rather than evidence.
I'd advise reading both sides of the story:
http://lemire.me/blog/archives/2009/09/16/relational-databases-are-the…
http://lemire.me/blog/archives/2009/07/03/column-stores-and-row-stores…
http://architects.dzone.com/articles/stonebraker-talk-triggers
http://gigaom.com/2011/07/11/amazons-werner-vogels-on-the-stonebrakern…
http://dom.as/2011/07/08/stonebraker-trapped/
The date on some of those posts in interesting. 2009 is quite a while ago now, and I'd suggest that columnar datastores haven't exactly taken over. Some implementations have made some progress (eg Cassandra), but OTOH many non-traditional datastores have added traditional-database like features (eg, Facebook's SQL front end on their NoSQL system), and traditional databases have added NoSQL features too.