X-Original-To: pgsql-admin@postgresql.org Received: from c001.snv.cp.net (h007.c001.snv.cp.net [209.228.32.121]) by postgresql.org (Postfix) with SMTP id EF53347592C for ; Mon, 10 Mar 2003 22:11:27 -0500 (EST) Received: (cpmta 2117 invoked from network); 10 Mar 2003 19:11:31 -0800 Received: from 209.228.32.124 (HELO mail.dilger.cc.criticalpath.net) by smtp.register-admin.com (209.228.32.121) with SMTP; 10 Mar 2003 19:11:31 -0800 X-Sent: 11 Mar 2003 03:11:31 GMT Received: from [216.68.146.219] by mail.dilger.cc with HTTP; Mon, 10 Mar 2003 19:11:30 -0800 (PST) Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 To: bjordan@esbex.com Cc: pgsql-admin@postgresql.org From: "Nikolaus Dilger" Subject: Re: Performance problems with Postgresql X-Sent-From: nikolaus@dilger.cc Date: Mon, 10 Mar 2003 19:11:30 -0800 (PST) X-Mailer: Web Mail 5.2.3-0_sol28 Message-Id: <20030310191131.20893.h010.c001.wm@mail.dilger.cc.criticalpath.net> X-Archive-Number: 200303/116 X-Sequence-Number: 7757 Ben, For a system with 2GB RAM your setting for shared_buffers actually seem kind of low. Try increasing to at least 40960. shared_buffers =3D 4096 =3D 32MB since each buffer has 8k sort_mem =3D 2048 =3D 2MB max in memory per sort operation; larger sorts go to disk. There must be something else going on. Do you have any error messages or system logs when the processes die? What exactly are the large customers doing that's taking 5 minutes? Can you share the SQL that is being executed? You may want to look at your memory usage with vmstat. Regards, Nikolaus Dilger "Ben Jordan" wrote: Message I'm very new to all=20 this so I apologize if I do things incorrectly.=A0 I got thrown into a mix=20 here where I'm in charge of software, hardware monitoring, lots of stuff, among=20 them is our postgres database, which I know very little about.=A0 I have been=20 studying the posts and a couple of postgresql books=A0for weeks and weeks=20 and=A0I am currently so stuck I don't know what else to do.=A0 By the way,=20 thanks to everyone for their contributions.=A0 I have learned a lot and had a=20 lot of help from reading your posts. =A0 We have a static=20 sitebuilder where our clients build and manage an ecommerce site.=A0 They=20 have to publish the site to get their changes to showup on their web site.=A0=20 (We will soon be=A0going to a dynamic site but still need to support this one=20 for=A0some time).=A0 For most people this process works fine, albeit a bit=20 slow, (between=A010 seconds and 5 minutes)=A0but for our larger users,=20 they publish process dies after a while and they are unable to update their=20 sites.=A0 I changed some memory and postgresql.conf settings a while ago and=20 it seemed to totally fix the problem.=A0 Then we lost some RAM in our=20 server.=A0 We were at 2.5 Gigs, now at 2.25 Gigs, if that's even a valid=20 amount.=A0 Anyways, ever since then I'm having the same publishing=20 problems.=A0 The main problem for my large users is that after 5 minutes and=20 5 seconds the process just quits and dissapears, and I can see it die out of the=20 top.=A0 Here are some of my current settings: =A0 IBM=20 Netfinity 7100 Dual P3 700=20 Mhz=20 2.25 Gigs of=20 RAM 3 18 Gig=20 SCSI Hard Drives RAID 5 Standard=20 stuff here I guess =A0 Here is the=20 latest for my sysctl, of which i don't even understand the=20 shmmni.=A0 I have changed these settings quite a few=20 times. =A0 kernel.shmmni=20 =3D 4096kernel.shmall =3D 1610612736kernel.shmmax =3D=20 1610612736 =A0 Here=20 is some postgresql.conf stuff: =A0 #=A0=A0=A0=A0=A0=A0 Connection=20 Parameters##tcpip_socket =3D false#ssl =3D=20 false =A0 max_connections =3D 128 # 1-1024port=20 =3D 5432#hostname_lookup =3D false#show_source_port =3D=20 false =A0 #unix_socket_directory =3D ''#unix_socket_group =3D=20 ''#unix_socket_permissions =3D 0777 =A0 #virtual_host=20 =3D '' =A0 #krb_server_keyfile =3D '' =A0 ##=A0=A0=A0=A0=A0=A0 Performance##sort_mem=20 =3D 512#shared_buffers =3D 2*max_connections # min 16#fsync =3D=20 true =A0 shared_buffers =3D 4096sort_mem =3D=20 2048#max_connections=3D128#fsync=3Dfalse I need at least 128=20 connections because of a Sorry, too many clients error that was occurring.=A0=20 I have tried so many different configurations of shared buffers and sort memory=20 that I don't know what to do now.=A0 Some seem to work, but none very=20 consistently.=A0 I've tried very high, with so so results.=A0 Now I'm back=20 to square one.=A0=20 =A0 I apologize for the=20 long post and for a major ignorance on my part.=A0 I have tried to learn and=20 read as much as I can but am at my wits end here.=A0 If any onf you know any=20 small tips I would greatly appreciate it.=A0 Thanks. =A0 Ben Jordan -=20 Complete Newbie bjordan@esbex.com