From: | "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com> |
---|---|
To: | shoaib <shoaibm(at)vmoksha(dot)com> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Database server restarting |
Date: | 2003-05-06 17:42:40 |
Message-ID: | Pine.LNX.4.33.0305061136280.5947-100000@css120.ihs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 6 May 2003, shoaib wrote:
> When I login a console, I can see the prompt but after typing in login
> name system just don't respond it does not come to password prompt.
FYI, for future reference, this is generally referred to as being
non-responsive, not hanging. Hanging means the server has truly crashed,
and is no longer answer pings, etc... Usually hanging servers mean bad
hardware. Non-responsive servers often mean that you've increased the
load too high for the server to handle, and it's busily swapping out
resources left and right to try and stay up and running.
And there is NO reason to reboot a RedHat Linux 7.x box every night. Mine
routinely get 100 days of uptime between reboots, sometimes 200 days.
Usually by then we're either upgrading to a new version or installing a
new kernel and have to reboot.
Leaving the OS up is actually a good thing, as it keeps the buffers from
getting cleared out. Note that if all you want is for OS cache buffers to
flush, just write a short c program that mallocs huge chunks of memory
until you start swapping a bit. But that's counter productive.
Postgresql flushes buffers when it's writing, so you don't have to worry
about dataloss, and the data in those buffers takes a while to load.
11:42am up 36 days, 1:20, 4 users, load average: 0.27, 0.28, 0.32
195 processes: 194 sleeping, 1 running, 0 zombie, 0 stopped
CPU0 states: 21.0% user, 0.0% system, 0.0% nice, 78.0% idle
CPU1 states: 1.0% user, 8.0% system, 0.0% nice, 89.0% idle
Mem: 1543980K av, 1535472K used, 8508K free, 265928K shrd, 48872K buff
Swap: 2048208K av, 164524K used, 1883684K free 871720K cached
Note the 870 Meg of cached data. It takes my server at least a day of
running before it can use the extra memory as cache, and rebooting it
would make it start over.
Unlike Windows machines, Unix machines tend to run faster the longer
they're left up.
From | Date | Subject | |
---|---|---|---|
Next Message | Nigel J. Andrews | 2003-05-06 18:00:34 | Re: Database server restarting |
Previous Message | Bruno Wolff III | 2003-05-06 17:27:36 | Re: advancing sequences |