I think and please correct me that Postgres loves RAM, the more the better.
Certainly for disk-cache.
Any way RAID5 is awful with writing, go with RAID1 ( mirroring )
Raid 10 seems to be the consensus if you have enough disks. See the archives of the performance list for plenty of discussion.
I use Debian Sarge and im very happy.
Not sure it makes much difference performance-wise. I'd use whatever flavour of Linux you have the most experience with.
Perl is very slow, maybe you can use PHP ?
If your Perl is slower than your PHP, you need to get a better Perl programmer ;-)
In any case, if your application is too slow for your database then all the previous tuning is largely irrelevant.
-- Richard Huxton Archonet Ltd
---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster