Disable ext4 barriers for dramatic I/O performance improvement on local machine

I was experiencing an issues that made PHPUnit unit tests run increasingly slowly on one of my development machines. The tests that ran the slowest were those that touched the database in some way, which in BuddyPress and WordPress unit tests are most of them. After a bit of poking around, I came across this thread: http://stackoverflow.com/questions/14914467/slow-phpunit-tests. I took the advice of the accepted answer and set barriers=0 in /etc/fstab and it has made a very dramatic difference in PHPUnit execution time: the BuddyPress test suite, for instance, now takes about 30 seconds to run instead of 5-6 minutes.

Making a note of it here for my own future reference. Follow this advice at your own peril – understand the ramifications of disabling barriers before turning them off.

One thought on “Disable ext4 barriers for dramatic I/O performance improvement on local machine

  1. Ray

    Wowsers, that made things fast. Since I’m not on Linux, the recommendations listed in the second answer – innodb_flush_log_at_trx_commit=2 – worked for me 🙂

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *