Friday, August 28, 2009

Optimized Workstations, Part 1

Today I optimized my local PostgreSQL install a bit. Specifically I edited postgresql.conf and adjusted parameters that I thought were relevant. I used the list of configuration items in the General Tuning section of this post and common sense as a guide. I turned off the fsync option, figuring that syncs are pretty useless in a begin/rollback transactional test architecture.

My test suite went from 45-50 seconds to a reliable 37-38 seconds for each run.

For someone who runs tests so often this ~10 second gain gets me a lot - 20% faster test suite execution. For a floor of 40 developers costing the shop ~$1/second this can add up.

Let's take a smallish project with a robust 2 minute test suite run. Shaving 20%, or 24 seconds, off the run and assuming we run the whole suite 5 times per day takes our (120*5 = $600/day) test runs to (96*5 = $480/day), a savings of $120/day or $600/week or $31,200/52-week year.

Not bad for 10 minutes of investigation and a service restart.