Re: Database server restarting
От | scott.marlowe |
---|---|
Тема | Re: Database server restarting |
Дата | |
Msg-id | Pine.LNX.4.33.0305061136280.5947-100000@css120.ihs.com обсуждение исходный текст |
Ответ на | Re: Database server restarting ("shoaib" <shoaibm@vmoksha.com>) |
Список | 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.
В списке pgsql-general по дате отправления: