From: | Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my> |
---|---|
To: | Scott Marlowe <smarlowe(at)g2switchworks(dot)com> |
Cc: | pgsql general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: VACUUM FULL versus CLUSTER ON |
Date: | 2006-07-10 16:33:43 |
Message-ID: | 5.2.1.1.1.20060710235655.01d696a0@localhost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
At 10:50 AM 7/10/2006 -0500, Scott Marlowe wrote:
>On Sat, 2006-07-08 at 10:20, Joshua D. Drake wrote:
> > >
> > > Unfortunately it would appear that I cannot vacuum full either as I
> get an
> > > out of memory error:
>
>Also, this kind of points out that you might not have enough swap
>space. On most database servers there's enough hard drive space laying
>about to have as large a swap space as you'd like, and I can't count the
>number of times a large swap has given me enough to time to catch
>runaway processes and keep an ailing server up and running, albeit
>hobbling along, rather than having to worry about running out of virtual
>memory.
In my opinion, there is not enough real memory, or postgresql (or something
else) is using more memory than it should.
Because I prefer the reverse - processes die rather than the entire server
hobble along while your ssh connection attempts (or other arguably
important stuff) keep timing out. Of course some O/Ses appear to randomly
kill processes when out of memory. BTW, I regard any O/S that kills
critical processes such as the disk syncing processes or swap, or "initd"
in _typical_ out-of-memory scenarios as a product of shoddy workmanship.
I'd prefer just enough swap[1] that when maxed out the server is just
slowed enough to be noticeable, rather than effectively dead and
continuously "running" like a "drum memory" computer.
If a normal userland program cannot handle being killed because there is
not enough memory, then I think something is wrong somewhere (e.g. the O/S
is doing stuff like SIGKILLing postgresql, or postgresql is not handling
SIGTERM properly).
Link.
[1] How much is enough? My guess is that the suitable size would be related
to the random read/write throughput from/to the swap, and the largest worst
case amount of memory that would have to be continuously read and written,
and how long you would be willing to wait. If you have programs that
allocate tons of memory but don't ever actually use the full amount, you
can adjust your swap accordingly.
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2006-07-10 16:36:26 | Re: VACUUM FULL versus CLUSTER ON |
Previous Message | Sven Willenberger | 2006-07-10 16:04:48 | Re: VACUUM FULL versus CLUSTER ON |