PDA

View Full Version : What's the vacuum bottle-neck?


SamIAm
12-13-2005, 07:20 PM
Howdy. I'm vacuuming my SQL databases. (because I haven't since I installed SQL!) First I set to work on my main database, and noticed that the CPU never rose above it's normal 7 or 8% use. I thought this would hit 100%. I mean, that's what I'm waiting for, right? The processor? I worried there was a problem, but then the vacuum finished. (So, no problem, I guess. /images/graemlins/smile.gif )

Now I'm cleaning my observed database, and that should take a (whole lot) longer. Again, my CPU is chillin' out between 0 and 10%. It'll take a while, so I'd like to do what I can to help. Should I stay off my harddrive? Should I keep the CPU at 7%? (Heaven forbid it hits 20. /images/graemlins/smile.gif )

Mostly just curious. Thanks.
-Sam

waffle
12-13-2005, 08:34 PM
it's probably disk/temp files. you can tell postgres to use more memory when vacuuming in the postgres.sql config file. i let it use up to 48megs.

maintenance_work_mem = 49152 # min 1024, size in KB

if you want to check to see if the disk is the real culprit, download 'filemon' and watch the recent activity. /images/graemlins/smile.gif