Matt Brock's SysAdmin+ Blog

The Writings of a Freelance Infrastructure Consultant

PostgreSQL tuning: ensuring that as many sorts as possible are done in memory and not on disk —

(This post assumes a PostgreSQL installation located at /var/lib/pgsql on a Red Hat-type Linux system such as Red Hat Enterprise Linux or CentOS. If your system differs from this, you may need to modify some of the paths accordingly.)

In PostgreSQL, sorts larger than a certain size will get performed on disk instead of in memory, and this makes them much slower as a result. Ideally all sorts should be done in memory (except for the ones that are genuinely too big to fit into your available RAM, because swapping to virtual memory should be avoided at all costs).

Read the rest of this entry »


iPhoneography: where photography, art and technology truly meet —

Photographers are increasingly embracing smartphones, and Apple’s iPhone in particular, as valid alternatives to their SLRs. Adopting the philosophy that ‘the best camera is the one that’s with you’, photographers find with iPhones that they can simply point and shoot in situations where photography would not be an option with a larger camera. For many, this embodies the true essence of photography, in which making a timely visual capture of a particular moment is more important than painstakingly changing lenses and altering aperture settings. More and more photographers are questioning the assumption that bulky, costly photographic equipment is necessary for taking worthwhile photographs. Instead, they are realising that you can never tell when inspiration is going to strike, and being able to take photographs instantly at any time is incredibly advantageous.

Read the rest of this entry »


2010: the year of iPhoneography —

2010 was, for me, very much about iPhoneography. During the year, iPhoneography seemed to go from a fun, interesting curiosity to a full-blown photography subgenre or even a ‘movement’, and I’ve become part of a vibrant community of iPhoneographers on the Internet who are pushing the boundaries of this medium and sharing their results with each other and the rest of the world. This feels like being part of something quite special, and I’ve met some cool new people through the community.

Read the rest of this entry »


Setting up and maintaining Linux software RAID on an Apple Xserve G5 with Yellow Dog Linux —

Despite certain frustrations with our Apple Xserve G5s, I’ve found that they make decent Linux servers, especially considering their age. Recently I wanted to repurpose one as a development server, and in that role I really wanted disk redundancy for added protection of the data. Unfortunately there’s no RAID controller in these servers, so software RAID is the only option. Originally RAID wasn’t crucial and I gave up on software RAID as it seemed too complicated to justify the time spent figuring out how to do it. This time, however, it was more important and I was determined to get software RAID functioning.

Read the rest of this entry »