
Daniel Lawson wrote:
Raymond Burgess wrote:
I am currently importing a lot of data into a Postgres Database. Initially things where quickish, but now it seems to be running very slowly. I put this down to index scans. The machine is a Dual P4 with 2 GB of ram and a Raid array (14 Fibre Channel Harddrives)
Top is reporting the disk cache is 1.7 GB and system idle around 70%. The postgres backend is using 10% to 20% of one CPU. I don't know if the bottleneck is the Disk IO or Ram.
What would people suggest I can look at to see what is holding up the process?
If it's IO bound, you should see a high system percentage (%system in top).
Tools like vmstat, procinfo and iostat can let you follow through what is happening, although IIRC they apply to the whole system not a particular process.
I wouldn't expect sys% to be up with a scsi disk sub system. The system is running software raid, but raid5d isn't using a lot of cputime either I have run vmstat. 'vmstat 5 50' => http://hostility.deeper.co.nz/~raymond/vmstat.out There is often 1 proc listed as blocked so I guess the harddrives just can't keep up.