Nicolas Alpi

Hi, Salut

Pragmatic web application developer, I enjoy my freelance way of life in my home office every day. I mainly use Ruby based frameworks (Rails / Sinatra / Rack) as my main development arsenal and jQuery is my day to day friend for every piece of client side. Aside from development freedom, I really enjoy the business side of behind freelance, and will soon to release my own personal application. In my free time, I enjoy cooking, runnning and sharing a coffee or a beer with people, so if you're around Bristol, let's be in touch.


Accelerate your tests in Rails with Ubuntu

I recently came across a blog post about accelerate Ubuntu disk access perfomrance.

You can read it on Smartlogic blog, it’s well explained so I’n not going to copy but I just would like to add some ideas:

You don’t need to boot on a live CD

Where Nick ask to boot on a live CD and mount your partitions, you don’t really need this part.

First open your /etc/fstab file and spot your active partitions.

For example on my development machine, I use /dev/sda1 for my / and /dev/sda6 for my /home

Close the file and run

sudo tune2fs -o journal_data_writeback /dev/sdXY

on each partitions you’ll need to tweak.

Apply noatime and data=writeback to all your working partitions

As you’ve done tune2fs on each partitions, you’ll need to change the mounting options (noatime and data=writeback) in each partitions line inside your fstab.

Do not do it on your server!

Because these modifications make the file system more fragile if crashing, please do not consider doing these tweaks on your production servers.

Enjoy the boost

Where Nick claim a 30% speed gain on his machine, I can claim a gain of more that 55% as I went down from 55 minutes to 25 minutes for the same test suites on one of the biggest application I work on!

Was it useful?

Thanks a lot to Nick Gauthier for his initial blog post, I hope it will be useful to some of you.
Let me know in the comments if you know other tweak that can make my little machine works faster.


Comments

blog comments powered by Disqus