Обсуждение: BUG #5284: Postgres CPU 100% and worker took too long to start; cancelled... Systemdown

Поиск
Список
Период
Сортировка

BUG #5284: Postgres CPU 100% and worker took too long to start; cancelled... Systemdown

От
"azuneko"
Дата:
The following bug has been logged online:

Bug reference:      5284
Logged by:          azuneko
Email address:      azuneko@hotmail.com
PostgreSQL version: 8.3.3
Operating system:   FreeBSD7.0.2
Description:        Postgres CPU 100% and worker took too long to start;
cancelled... Systemdown
Details:

Hello,

I have the following 2 problems.
It would be appreciated if you give me some information such as the way to
avoid them.(Or if those problems are already known and fixed, could you
please tell me what version I should apply.)

1,CPU utilization of postgres reaches 100%.

I excuted "top" command and sometimes found that CPU utilization of postgres
process reached 100% or almost 100%. (This is similar to the problem that
was posted at
http://archives.free.net.ph/message/20081104.074244.6e0dbcde.ja.html.)
What might be the cause?

2. The following warning can be seen in the postgres log.
    WARNING:  worker took too long to start; cancelled

After this warning firstly appears in the log, the same warining message
seems to be repeated. And if you leave this state as it is, the OS freezes
before long. I guess this event happens because the daemons related to
postgres (such as vacuum and autovacuum) won't release the shared memory and
exclusively keep using it. Am I correct?

Those 2 problems are confirmed to happen at least under the following
conditions;
    Software
     -OS : FreeBSD 7.0.2
      -Postgres version : 8.3.3
    Hardware
      -Disk configuration : RAID5 (MegaCLI)
     -CPU : Xeon2.4

Thank you.

Re: BUG #5284: Postgres CPU 100% and worker took too long to start; cancelled... Systemdown

От
Robert Haas
Дата:
On Mon, Jan 18, 2010 at 12:43 AM, azuneko <azuneko@hotmail.com> wrote:
> The following bug has been logged online:
>
> Bug reference: =A0 =A0 =A05284
> Logged by: =A0 =A0 =A0 =A0 =A0azuneko
> Email address: =A0 =A0 =A0azuneko@hotmail.com
> PostgreSQL version: 8.3.3
> Operating system: =A0 FreeBSD7.0.2
> Description: =A0 =A0 =A0 =A0Postgres CPU 100% and worker took too long to=
 start;
> cancelled... Systemdown
> Details:
>
> Hello,
>
> I have the following 2 problems.
> It would be appreciated if you give me some information such as the way to
> avoid them.(Or if those problems are already known and fixed, could you
> please tell me what version I should apply.)
>
> 1,CPU utilization of postgres reaches 100%.
>
> I excuted "top" command and sometimes found that CPU utilization of postg=
res
> process reached 100% or almost 100%. (This is similar to the problem that
> was posted at
> http://archives.free.net.ph/message/20081104.074244.6e0dbcde.ja.html.)
> What might be the cause?
>
> 2. The following warning can be seen in the postgres log.
> =A0 =A0 =A0 =A0WARNING: =A0worker took too long to start; cancelled
>
> After this warning firstly appears in the log, the same warining message
> seems to be repeated. And if you leave this state as it is, the OS freezes
> before long. I guess this event happens because the daemons related to
> postgres (such as vacuum and autovacuum) won't release the shared memory =
and
> exclusively keep using it. Am I correct?
>
> Those 2 problems are confirmed to happen at least under the following
> conditions;
> =A0 =A0 =A0 =A0Software
> =A0 =A0 =A0 =A0 -OS : FreeBSD 7.0.2
> =A0 =A0 =A0 =A0 -Postgres version : 8.3.3
> =A0 =A0 =A0 =A0Hardware
> =A0 =A0 =A0 =A0 -Disk configuration : RAID5 (MegaCLI)
> =A0 =A0 =A0 =A0 -CPU : Xeon2.4
>
> Thank you.

You haven't really provided us with much detail here, but it kind of
sounds like your system is overloaded.

...Robert

Re: BUG #5284: Postgres CPU 100% and worker took too long to start; cancelled... Systemdown

От
yua ゅぁ
Дата:
Hello.<br />  <br /> >You haven't really provided us with much detail here, but it kind of<br />>sounds like
yoursystem is overloaded.<br />>...Robert<br /> Thank you for your kindness.<br />Following modules are used <br
/> mod_auth_pgsql-2.0.3_1<br/> postgresql-client-8.3.9_1,1<br /> postgresql-server-8.3.9_1<br /> p5-DBD-Pg-2.16.0<br
/> php5-pdo_pgsql-5.2.12<br/> What kind of information shall, I geve you in addtion to the list<br />above?<br /> <br
/>>Date: Mon, 18 Jan 2010 15:33:02 -0500<br />> Subject: Re: [BUGS] BUG #5284: Postgres CPU 100% and worker took
toolong to start; cancelled... Systemdown<br />> From: robertmhaas@gmail.com<br />> To: azuneko@hotmail.com<br
/>>CC: pgsql-bugs@postgresql.org<br />> <br />> On Mon, Jan 18, 2010 at 12:43 AM, azuneko
<azuneko@hotmail.com>wrote:<br />> > The following bug has been logged online:<br />> ><br />>
>Bug reference:      5284<br />> > Logged by:          azuneko<br />> > Email address:    
 azuneko@hotmail.com<br/>> > PostgreSQL version: 8.3.3<br />> > Operating system:   FreeBSD7.0.2<br />>
>Description:        Postgres CPU 100% and worker took too long to start;<br />> > cancelled... Systemdown<br
/>>> Details:<br />> ><br />> > Hello, <br />> ><br />> > I have the following 2
problems.<br/>> > It would be appreciated if you give me some information such as the way to<br />> > avoid
them.(Orif those problems are already known and fixed, could you<br />> > please tell me what version I should
apply.)<br/>> ><br />> > 1,CPU utilization of postgres reaches 100%.<br />> ><br />> > I
excuted"top" command and sometimes found that CPU utilization of postgres<br />> > process reached 100% or almost
100%.(This is similar to the problem that<br />> > was posted at<br />> >
http://archives.free.net.ph/message/20081104.074244.6e0dbcde.ja.html.)<br/>> > What might be the cause?<br />>
><br/>> > 2. The following warning can be seen in the postgres log.<br />> >        WARNING:  worker
tooktoo long to start; cancelled<br />> ><br />> > After this warning firstly appears in the log, the same
wariningmessage<br />> &g t; seems to be repeated. And if you leave this state as it is, the OS freezes<br
/>>> before long. I guess this event happens because the daemons related to<br />> > postgres (such as
vacuumand autovacuum) won't release the shared memory and<br />> > exclusively keep using it. Am I correct?<br
/>>><br />> > Those 2 problems are confirmed to happen at least under the following<br />> >
conditions;<br/>> >        Software<br />> >         -OS : FreeBSD 7.0.2<br />> >         -Postgres
version: 8.3.3<br />> >        Hardware<br />> >         -Disk configuration : RAID5 (MegaCLI)<br />>
>        -CPU : Xeon2.4<br />> ><br />> > Thank you.<br />> <br />> You haven't really provided us
withmuch detail here, but it kind of<br />> sounds like your system is overloaded.<br />> <br />> ...Robert<br
/><br/><hr />【無料!】マイクロソフト公式メーラーで、メールを一括チェック <a href="http://clk.atdmt.com/GBL/go/193964313/direct/01/"
target="_new">Windows7 買う人は必ず見よう</a> 

Re: BUG #5284: Postgres CPU 100% and worker took too long to start; cancelled... Systemdown

От
"Kevin Grittner"
Дата:
yua **<azuneko@hotmail.com> wrote:

> What kind of information shall, I geve you

There are some good guidelines here:

http://wiki.postgresql.org/wiki/SlowQueryQuestions

-Kevin

Re: BUG #5284: Postgres CPU 100% and worker took too long to start; cancelled... Systemdown

От
"Kevin Grittner"
Дата:
yua **<azuneko@hotmail.com> wrote:

> PostgreSQL 8.3.3 on i386-portbld-freebsd7.0, compiled by GCC cc
(GCC)
> 4.2.1 20070719  [FreeBSD]

>    postgres[681]: [506-1] WARNING:  worker took too long to start;
cancelled
> Nov 12 11:15:12 kddi-nwmgr01 postgres[681]:
> [507-1] WARNING:  worker took too long to start; cancelled

> ps -auxeww
> ---------+---------+---------+---------+---------+---------+--------
> USER    PID %CPU %MEM   VSZ   RSS  TT  STAT STARTED      TIME
COMMAND
> pgsql   682 99.0  0.1  9336  2740  ??  Rs   27Nov08 343573:19.27
USER=pgsql

> Q6 PostgreSQL Programs
> A6 php5-pdo_pgsql-5.2.12
>      p5-DBD-Pg-2.16.0

> Q8 OS Version
> A8 FreeBSD 7.0-RELEASE-p2

> CPU : Intel, Xeon2.4
> RAM : 2GB
> Storage
>  RAID Card : LSI MegaRAID
>  Battery Cache : YES
>  write-back Cache : NO
>  Software RAID : NO ( Hardware RAID)
>  SAN : NO
>  Disk : 7,200rpm SATA 3lot
>  Disk : RAID5 3slot

This is starting to sound like some other reports from FreeBSD.

http://archives.postgresql.org/pgsql-general/2008-06/msg00934.php

http://archives.postgresql.org/pgsql-general/2010-01/msg01076.php

Unfortunately, the other posters didn't post back with information
on resolution of the issue.  Could you read Tom's advice and report
back?:

http://archives.postgresql.org/pgsql-general/2010-01/msg01079.php

-Kevin

Re: BUG #5284: Postgres CPU 100% and worker took too long to start; cancelled... Systemdown

От
yua ゅぁ
Дата:
Hello,<br />  <br /> Kevin.<br />  <br /> Thank you good guidelines.<br /> guidelines questions.<br />  <br /> Q1
postgres Version<br/><br />A1 PostgreSQL 8.3.3 on i386-portbld-freebsd7.0, compiled by GCC cc (GCC)<br />4.2.1
20070719 [FreeBSD]<br /><br /> ports Install.<br />  <br /> Q2 <br />A2 x<br />  <br /> Q3  Query<br />A3 x<br />  <br
/>Q4 Query<br />A4 x<br />  <br /> Q5 Error Message<br />A5<br />   postgres[681]: [506-1] WARNING:  worker took too
longto start; cancelled Nov 12 11:15:12 kddi-nwmgr01 postgres[681]:<br />[507-1] WARNING:  worker took too long to
start;cancelled<br /><br />ps -auxeww<br />---------+---------+---------+---------+---------+---------+--------<br
/>USER   PID %CPU %MEM   VSZ   RSS  TT  STAT STARTED      TIME COMMAND<br />pgsql   682 99.0  0.1  9336  2740  ??  Rs  
27Nov08343573:19.27 USER=pgsql<br /><br />Q6 PostgreSQL Programs<br />A6 php5-pdo_pgsql-5.2.12<br />    
p5-DBD-Pg-2.16.0<br/>  <br /> Q8 OS Version<br />A8 FreeBSD 7.0-RELEASE-p2<br />  <br /> Q9 Hardware Info<br />A9<br
/>CPU: Intel, Xeon2.4<br />RAM : 2GB<br />Storage<br /> RAID Card : LSI MegaRAID<br /> Battery Cache : YES<br
/> write-backCache : NO<br /> Software RAID : NO ( Hardware RAID)<br /> SAN : NO<br /> Disk : 7,200rpm SATA 3lot<br
/> Disk: RAID5 3slot<br /> <br />> Date: Tue, 19 Jan 2010 09:37:14 -0600<br />> From:
Kevin.Grittner@wicourts.gov<br/>> To: robertmhaas@gmail.com; azuneko@hotmail.com<br />> CC:
pgsql-bugs@postgresql.org<br/>> Subject: Re: [BUGS] BUG #5284: Postgres CPU 100% and worker took too long to start;
cancelled...Systemdown<br />> <br />> yua **<azuneko@hotmail.com> wrote:<br />> <br />> > What
kindof information shall, I geve you<br />> <br />> There are some good guidelines here:<br />> <br />>
http://wiki.postgresql.org/wiki/SlowQueryQuestions<br/>> <br />> -Kevin<br /><br /><hr />【節約!】インターネット代、見直しませんか?
<ahref="http://clk.atdmt.com/GBL/go/187204509/direct/01/" target="_new">月額1,480円で快適ブロードバンド</a> 

Re: BUG #5284: Postgres CPU 100% and worker took too long to start; cancelled... Systemdown

От
Craig Ringer
Дата:
On 26/01/2010 8:58 AM, yua $B$e$!(B wrote:

> RAID Card : LSI MegaRAID
> Battery Cache : YES
> write-back Cache : NO
> Software RAID : NO ( Hardware RAID)

The LSI MegaRAID series are, AFAIK, software raid implementations. The
hardware has some BIOS hooks to enable boot-loading, then the OS loads a
driver that does all the real work for the RAID implementation.

... though a quick Google search suggests they may be using that brand
for real RAID hardware too, so without specifying the model number it's
hard to know what your RAID hardware is. The fact that your card has a
BBU tends to confirm they're making real RAID hardware under that name.

It probably doesn't make much difference in this particular case,
though, as disk I/O is unlikely to be part of your issue.

> SAN : NO
> Disk : 7,200rpm SATA 3lot
> Disk : RAID5 3slot

Again it's not the cause of the problem you report, but: Most databases,
and certainly PostgreSQL, perform poorly on RAID 5. In particular,
PostgreSQL really doesn't like having the WAL stored on RAID 5, but
really you're much better off using RAID 10 for all your
database-related storage if you can.

--
Craig Ringer