- CPU vs DISK as 'the limitting' performance factor?
To benchmark this I did setup ONE Server with 2 DBs. One with the default tablespace and the other with a 'RAMDISK' tablespace. I used 12GB ram in total and a 6GB ramdrive.
And as you can see, there is NO difference in performance on the disk vs ramdrive database setup! (This was done on +- out of the box Postgres.conf)
- How to improve performance through config tuning?
I am not explaining this point any further, there are several good tutorials on the interweb. http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server
- How to improve performance through query tuning?
Remove data overhead. For example if you are doing an analysis around a big city, like Berlin - you probably don't need the data around Paris.
Example:
Simple Select on ALL vertices
SELECT pgr_drivingDistance('SELECT gid as id, source, target, reverse_cost as cost FROM (SELECT gid, source, target, reverse_cost, the_geom FROM ways WHERE ST_contains(ST_Transform(ST_Buffer(ST_Transform(ST_SetSRID(ST_MakePoint(6.61098253042881, 46.5210409863285),4326), 26986), 50 * 1000 ,16), 4326), the_geom)=''t'') as preSelection',
pgr_pointtoid(ST_setSRID(ST_MakePoint(6.61098253042881, 46.5210409863285),4326), 0.1, 'ways_vertices_pgr' ,4326)::Integer, 50 , false, false)
Here with a preselection... I improved that later, but the buffer 'precalculation' hurts performance a little, and makes results 'less impressiv'
SELECT pgr_drivingDistance('SELECT gid as id, source, target, reverse_cost as cost FROM ways',
pgr_pointtoid(ST_setSRID(ST_MakePoint(6.61098253042881, 46.5210409863285),4326), 0.1, 'ways_vertices_pgr' ,4326)::Integer, 50 , false, false)

2.2s vs 1.5s is a huge change, just by adjusting ONE query...
Feel free to drop any input! I hope I clarified a few 'first thoughts' on pgRouting performance tuning...