Re: [HACKERS] posmaster failed under high load

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] posmaster failed under high load
Date: 1999-05-04 06:10:55
Message-ID: Pine.GSO.3.96.SK.990504100350.23733E-100000@ra
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 4 May 1999, Tatsuo Ishii wrote:

> Date: Tue, 04 May 1999 14:05:33 +0900
> From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
> To: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
> Cc: hackers(at)postgreSQL(dot)org
> Subject: Re: [HACKERS] posmaster failed under high load
>
> > Today I run http_load to do some benchmark of my Web-DB application
> > and found that under high load (it was about 18 postgres running ) postsmaster failed.
> > Restarting postmaster produces error:
> >
> > IpcMemoryCreate: shmget failed (Identifier removed) key=5432010, size=24588, permission=700
> > IpcMemoryIdGet: shmget failed (Identifier removed) key=5432010, size=24588, permission=0
> > IpcMemoryAttach: shmat failed (Invalid argument) id=-2
> > FATAL 1: AttachSLockMemory: could not attach segment
> >
> > I checked shared memory:
> > 23:27[zeus]:~>ipcs -a
> >
> > ------ Shared Memory Segments --------
> > shmid owner perms bytes nattch status
> > 10496 postgres 700 24588 5 dest
> > 10497 postgres 600 8852184 5 dest
> > 10498 postgres 600 96804 5 dest
> >
> > ------ Semaphore Arrays --------
> > semid owner perms nsems status
> >
> > ------ Message Queues --------
> > msqid owner perms used-bytes messages
> >
> > Does this error means I need to increase shared memory ?
> > My setup: Linux 2.0.36, Dual PPRO, 256 Mb RAM
> > Postgres 6.4.2
>
> I don't think so unless you increased the shared buffer size using -B
> option. Stock 6.4.2 is very buggy with the shared memory
> usage. Probably it's the cause. Try Tom Lane's fix or 6.5b. I have
> tested 6.5b with 128 backends running and it seems very stable.

Yes, I used 6.4.2 + LIMIT patch, I'll try 6.5 from cvs
I run postmaster with -B 1024 option - is this too much ?

>
> Another possibility is you don't have enough file descriptors.
> What do you get by:
> $ cat /proc/sys/kernel/file-max
> 1024 or so is not enough. You could increase it by:
> echo 4096 > /proc/sys/kernel/file-max
> Decreasing the usage of file descriptors per backend is also a good idea.
> try:
> ulimit -n 20
> before starting postmaster.

Thanks a lot, I got several times a problem with file descriptors,
it looks like every backend opens abot 90 files. I'll try your
hints. Why not add your experience how to work with postgres under high
load to Linux specific FAQ ?

Regards,
Oleg
> ---
> Tatsuo Ishii
>

_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Mount 1999-05-04 07:25:04 RE: [HACKERS] Re: SIGBUS in AllocSetAlloc & jdbc
Previous Message Tatsuo Ishii 1999-05-04 05:05:33 Re: [HACKERS] posmaster failed under high load