From: | "Peter Darley" <pdarley(at)kinesis-cem(dot)com> |
---|---|
To: | "David Blood" <david(at)matraex(dot)com>, "'Robert Treat'" <xzilla(at)users(dot)sourceforge(dot)net>, "'Francisco Reyes'" <lists(at)natserv(dot)com> |
Cc: | <neilc(at)samurai(dot)com>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Slow Lazy Vacuum (was Size for vacuum_mem) |
Date: | 2002-12-09 23:02:49 |
Message-ID: | NNEAICKPNOGDBHNCEDCPOEADDDAA.pdarley@kinesis-cem.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Friends,
I just want to throw my support behind what David said. We have
particularly slow drives, but a lot of memory (our data all fits into the
cache) because of the failure of our fast drive and our inability to replace
it (we're just using a single slow ide drive now), and the system fly's
except while doing a vacuum. Just showing an example of when the lazy
vacuum can significantly slow things.
Thanks,
Peter Darley
-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org]On Behalf Of David Blood
Sent: Thursday, December 05, 2002 3:12 PM
To: 'Robert Treat'; 'Francisco Reyes'
Cc: neilc(at)samurai(dot)com; pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Size for vacuum_mem
A "lazy vacuum" can hurt If you have lots of i/o. If we try to run it
during the day it kills us. This is because to vacuum all the tables
postgres has to read them from the disk. While it doesn't not lock rows
it does block other rows from reading/writing to/from the disk.
-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Robert Treat
Sent: Thursday, December 05, 2002 2:58 PM
To: Francisco Reyes
Cc: neilc(at)samurai(dot)com; pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Size for vacuum_mem
On Thu, 2002-12-05 at 12:57, Francisco Reyes wrote:
> > For these, you can try just using a plain VACUUM and seeing how
> > effective that is at reclaiming space.
>
> I am not too concerned with space reclamation. In theory if I don't do
> vacuum fulls I may have some dead space, but it would get re-used
daily.
> My concern is the performance hit I would suffer with the table scans.
>
you should see very little performance impact from lazy vacuuming. If
there is a performance hit, you can gain some offset by quicker queries
(if you do vacuum analyze). And remember, lazy vacuums are non-blocking
so users won't see an impact from that standpoint. The trick is to find
a good interval that will keep your tables from growing too big. I have
one table that updates every 10 minutes (the whole content of the table
gets updated within 15 minutes), which keeps the size very manageable
(it's not a huge table, or I would do it more). In this scenario, you
can still do vacuum fulls if you feel the need, but they should take
much less time.
Robert Treat
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
message can get through to the mailing list cleanly
From | Date | Subject | |
---|---|---|---|
Next Message | Williams, Travis L, NPONS | 2002-12-09 23:04:57 | Re: Field sizes and structure |
Previous Message | scott.marlowe | 2002-12-09 22:27:25 | Re: Field sizes and structure |