4

I was wondering how much faster is MariaDB vs Mysql in a Drupal 7 setup.

  • 1
    I'm really hoping you could expand this slightly somehow, as I'm really worried it might get closed but it's a really interesting question. – Chapabu Apr 25 '13 at 16:55
  • It's pretty difficult to answer this. The performance improvements will likely scale, so it depends wholly on your server hardware, number of visitors, how many and what type of queries are run in a single page load (which will depend on what modules are installed), how many authenticated users you have, how much content, your my.cnf settings, if the data resides on a network or otherwise attached drive, and so many other things – Clive Apr 25 '13 at 16:57
  • @Clive Ok - sub-question: Are there any speed benefits to MariaDB vs MySQL if you're already using something like Memcache or Redis, or a reverse proxy such as Varnish? – Chapabu Apr 25 '13 at 17:09
  • 2
    Sure, the database still has to be accessed when entries in those caches become invalid, or for un-cacheable content...every little helps in my experience. There's a list of speed improvements and links to comparisons/benchmarks against MySQL here – Clive Apr 25 '13 at 17:14
2

When you have applied full due diligence, the difference between MariaDB and MySQL should be virtually negligible. Why would I say this?

MariaDB has done some benchmarking with some settings that give all MySQL processes the same level playing field : See Sysbench OLTP: MySQL-5.6 vs. MariaDB-10.0. In fact, here were the setting used in the benckmark.

[mysqld]
sql-mode="NO_ENGINE_SUBSTITUTION"
back_log=500
user=root
port=3306
max_connections=4096
max_connect_errors=5000
max_prepared_stmt_count=50000
table_cache=2048
transaction_isolation=REPEATABLE-READ
loose-skip-external-locking
innodb_status_file=0
innodb_data_file_path=ibdata1:200M:autoextend
innodb_buffer_pool_size=1G
innodb_additional_mem_pool_size=20M
innodb_log_file_size=650M
innodb_log_buffer_size=100M
innodb_support_xa=0
innodb_doublewrite=0
innodb_flush_log_at_trx_commit=0
query-cache-size=0
query-cache-type=0
symbolic-links=0
skip-grant-tables

Please note

  • the settings do not accommodate use of more read and write I/O threads.
  • double write buffer disabled, good for speed, bad for data consistency in case of a crash

The key to really deciding which version of MySQL to choose is to effectively tune all the versions under test and then benchmarking with actual Drupal data. I would look into getting all MyISAM converted to InnoDB as much as possible (If you are using FULLTEXT indexes, you must go with MySQL 5.6).

Here are some of my past posts from the DBA StackExchange on what settings to look for when tuning InnoDB and why:

  • MariaDB received a query optimizer for subqueries a few releases before MySQL, so it's quite possible that it would be much faster for you in that regard. However, most applications ignore subqueries precisely because they were so slow before. – Bojan Zivanovic May 10 '13 at 7:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.