Re: Re: VACUUM and 24/7 database operation - Mailing list pgsql-general

From Steve Wolfe
Subject Re: Re: VACUUM and 24/7 database operation
Date
Msg-id 004e01c0862b$82a76ca0$50824e40@iboats.com
Whole thread Raw
In response to Re: VACUUM and 24/7 database operation  (Tiger Technologies <lists@tigertech.com>)
List pgsql-general
> In addition, the suggestion that vacuum isn't a problem because it only
> takes two minutes is misleading.
>
> Sure, it's only 2 minutes out of 24 hours. However, any given visitor
> isn't at my site for 24 hours. If she arrives just as I'm starting the
> vacuum, and it takes her less than two minutes to give up and go
> somewhere else, the site was unavailable 100% of the time as far as she's
> concerned.

  Well, from what I've seen, vacuum's only block updates/inserts, not
selects.  So, the reality of it will be different depending on your traffic.
If you run the kind of site where people are routinely signing up for your
services at 4 in the morning, then it's a big deal for you.

> If your site is down two minutes a day, and you have 14,000 unique
> visitors a week, each of whom requires a database update, that's 20
> people a week for whom the site isn't working when they arrive.

    Only if by some fluke you have people arriving at evenly spaced
schedules every minute of the day and night.  In reality, you'll do 5 to 10
times that many (or more) during peak periods, and then in the off-hours,
you'll have far, far fewer than that.  Sometimes 1/100th or less (again,
depending on your customers).  That's when you schedule the vacuum.

   Vacuuming isn't perfect.  It would be nice if we could not have to vacuum
at all, without sacrificing update speed.  For the mean time, I don't think
it's going to happen.  So, we schedule the vacuums when they do the least
damage, and (for us, at least), that damage is negligible.

steve



pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Problems with foreign key having different type
Next
From: Alexander Klimov
Date:
Subject: LO to text conversion