Re: PG 8.3 and server load

От: Karl Denninger
Тема: Re: PG 8.3 and server load
Дата: ,
Msg-id: 4A8C179F.2010708@denninger.net
(см: обсуждение, исходный текст)
Ответ на: Re: PG 8.3 and server load  (Andy Colson)
Список: pgsql-performance

Скрыть дерево обсуждения

PG 8.3 and server load  (Phoenix Kiula, )
 Re: PG 8.3 and server load  (Ivan Voras, )
  Re: PG 8.3 and server load  (Guillaume Cottenceau, )
 Re: PG 8.3 and server load  (Andy Colson, )
  Re: PG 8.3 and server load  (Karl Denninger, )
 Re: PG 8.3 and server load  (Andy Colson, )
  Re: PG 8.3 and server load  (Phoenix Kiula, )
   Re: PG 8.3 and server load  (Matthew Wakeling, )
  Re: PG 8.3 and server load  ("Kevin Grittner", )
   Re: PG 8.3 and server load  (Andy Colson, )
    Re: PG 8.3 and server load  (Phoenix Kiula, )
     Re: PG 8.3 and server load  (Andy Colson, )
     Re: PG 8.3 and server load  (Tom Lane, )
     Re: PG 8.3 and server load  (Guillaume Cottenceau, )
     Re: PG 8.3 and server load  (Scott Marlowe, )
      Re: PG 8.3 and server load  (Ivan Voras, )

Andy Colson wrote:
> Phoenix Kiula wrote:
>> I'm on a CentOS 5 OS 64 bit, latest kernel and all of that.
>> PG version is 8.3.7, compiled as 64bit.
>> The memory is 8GB.
>> It's a 2 x Dual Core Intel 5310.
>> Hard disks are Raid 1, SCSI 15 rpm.
>>
>> The server is running just one website. So there's Apache 2.2.11,
>> MySQL (for some small tasks, almost negligible).
>>
>> And then there's PG, which in the "top" command shows up as the main
>> beast.
>>
>> My server load is going to 64, 63, 65, and so on.
>>
>> Where should I start debugging? What should I see? TOP command does
>> not yield anything meaningful. I mean, even if it shows that postgres
>> user for "postmaster" and nobody user for "httpd" (apache) are the
>> main resource hogs, what should I start with in terms of debugging?
>>
>
> 1) check if you are using swap space.  Use free and make sure
> swap/used is a small number.  Check vmstat and see if swpd is moving
> up and down.  (Posting a handful of lines from vmstat might help us).
>
> 2) check 'ps ax|grep postgres' and make sure nothing says "idle in
> transaction"
>
> 3) I had a web box where the number of apache clients was set very
> high, and the box was brought to its knees by the sheer number of
> connections.  check "ps ax|grep http|wc --lines" and make sure its not
> too big. (perhaps less than 100)
>
> -Andy
>
I will observe that in some benchmark tests I've done on my application
(a VERY heavy Postgres user) CentOS was RADICALLY inferior in terms of
carrying capacity and performance to FreeBSD on the same hardware.

I have no idea why - you wouldn't expect this sort of result, but it is
what it is.  The test platform in my case was a Core i7 box (8 cores
SMP) with 6GB of memory running 64-bit code across the board.  Disks
were on a 3Ware coprocessor board.

I was quite surprised by this given that in general CentOS seems to be
comparable for base Apache (web service) use to FreeBSD, but due to this
recommend strongly in favor of FreeBSD for applications where web
service + PostgreSQL are the intended application mix.

-- Karl

Вложения

В списке pgsql-performance по дате сообщения:

От: Kevin Kempter
Дата:
Сообщение: Re: Query tuning
От: Jaime Casanova
Дата:
Сообщение: [PERFORMANCE] how to set wal_buffers