pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Will shared_buffers crash a server
4+ messages / 4 participants
[nested] [flat]

* Will shared_buffers crash a server
@ 2011-04-29 07:13 Qiang Wang <forest_qiang@yahoo.com>
  2011-04-29 07:42 ` Re: Will shared_buffers crash a server Claudio Freire <klaussfreire@gmail.com>
  2011-04-29 07:48 ` Re: Will shared_buffers crash a server Achilleas Mantzios <achill@matrix.gatewaynet.com>
  2011-04-29 10:34 ` Re: Will shared_buffers crash a server Scott Marlowe <scott.marlowe@gmail.com>
  0 siblings, 3 replies; 4+ messages in thread

From: Qiang Wang @ 2011-04-29 07:13 UTC (permalink / raw)
  To: pgsql-performance

Hei: 


We have PostgreSQL 8.3 running on Debian Linux server. We built an applicantion using PHP programming language and Postgres database. There are appoximatly 150 users using the software constantly. We had some performance degration before and after some studies we figured out we will need to tune PostgreSQL configurations. 


We have 10GB memory and we tuned PostgreSQL as follow:
- max_connection = 100
- effective_cache_size = 5GB
- shared_buffer = 2GB
- wal_buffer = 30MB
- work_mem = 50MB

However we suffered 2 times server crashes after tunning the configuration. Does anyone have any idea how this can happen?

BR 

Kevin Wang

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Will shared_buffers crash a server
  2011-04-29 07:13 Will shared_buffers crash a server Qiang Wang <forest_qiang@yahoo.com>
@ 2011-04-29 07:42 ` Claudio Freire <klaussfreire@gmail.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Claudio Freire @ 2011-04-29 07:42 UTC (permalink / raw)
  To: Qiang Wang <forest_qiang@yahoo.com>; +Cc: pgsql-performance

As for the question in the title, no, if the server starts, shared
buffers should not be the reason for a subsequent crash.

In debian, it is common that the maximum allowed shared memory setting
on your kernel will prevent a server from even starting, but I guess
that's not your problem (because it did start).



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Will shared_buffers crash a server
  2011-04-29 07:13 Will shared_buffers crash a server Qiang Wang <forest_qiang@yahoo.com>
@ 2011-04-29 07:48 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Achilleas Mantzios @ 2011-04-29 07:48 UTC (permalink / raw)
  To: pgsql-performance

Normally under heavy load, a machine could potential stall, even seem to hang, but not crash.
And judging from your description of the situation your only change was in shared memory (IPC shm) usage, right?
I would advise to immediately run all sorts of (offline/online) hardware tests (especially memtest86) on your machine,
before blaming postgesql for anything.

Στις Friday 29 April 2011 10:13:08 ο/η Qiang Wang έγραψε:
> Hei: 
> 
> 
> We have PostgreSQL 8.3 running on Debian Linux server. We built an applicantion using PHP programming language and Postgres database. There are appoximatly 150 users using the software constantly. We had some performance degration before and after some studies we figured out we will need to tune PostgreSQL configurations. 
> 
> 
> We have 10GB memory and we tuned PostgreSQL as follow:
> - max_connection = 100
> - effective_cache_size = 5GB
> - shared_buffer = 2GB
> - wal_buffer = 30MB
> - work_mem = 50MB
> 
> However we suffered 2 times server crashes after tunning the configuration. Does anyone have any idea how this can happen?
> 
> BR 
> 
> Kevin Wang
> 



-- 
Achilleas Mantzios



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Will shared_buffers crash a server
  2011-04-29 07:13 Will shared_buffers crash a server Qiang Wang <forest_qiang@yahoo.com>
@ 2011-04-29 10:34 ` Scott Marlowe <scott.marlowe@gmail.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Scott Marlowe @ 2011-04-29 10:34 UTC (permalink / raw)
  To: Qiang Wang <forest_qiang@yahoo.com>; +Cc: pgsql-performance

On Fri, Apr 29, 2011 at 1:13 AM, Qiang Wang <forest_qiang@yahoo.com> wrote:
>
> We have 10GB memory and we tuned PostgreSQL as follow:

> - max_connection = 100
> - work_mem = 50MB

You do know that work_mem is PER SORT right?  Not per connection or
per user or per database.  If all 100 of those connections needs to do
a large sort at once (unlikely but possible, especially if under heavy
load) then you could have pgsql trying to allocate 50000MB.  If you
have the occasional odd jobs that really need 50MB work_mem then set
it for a single user or connection and leave the other users in the 1
to 4MB range until you can be sure you're not running your db server
out of memory.

> However we suffered 2 times server crashes after tunning the configuration.
> Does anyone have any idea how this can happen?

Look in your log files for clues.  postgresql logs as well as system
logs.  What exact symptoms, if any, can you tell us of the crash?



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2011-04-29 10:34 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-04-29 07:13 Will shared_buffers crash a server Qiang Wang <forest_qiang@yahoo.com>
2011-04-29 07:42 ` Claudio Freire <klaussfreire@gmail.com>
2011-04-29 07:48 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
2011-04-29 10:34 ` Scott Marlowe <scott.marlowe@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox