X-Original-To: pgsql-admin@postgresql.org Received: from mail.esbex.com (mail.esbex.com [216.222.58.228]) by postgresql.org (Postfix) with ESMTP id 654C9476022 for ; Wed, 5 Mar 2003 20:05:54 -0500 (EST) Received: from [166.70.206.97] (helo=BenJordan) by mail.esbex.com with esmtp (Exim 3.35 #1 (Debian)) id 18qjjT-0005vt-00 for ; Wed, 05 Mar 2003 17:59:35 -0700 Reply-To: From: "Ben Jordan" To: Subject: Re: Performance problems with Postgresql Date: Wed, 5 Mar 2003 18:05:22 -0700 Organization: esbex Message-ID: <000001c2e37c$898aa590$1000000a@BenJordan> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0001_01C2E341.DD2BCD90" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Archive-Number: 200303/101 X-Sequence-Number: 7747 This is a multi-part message in MIME format. ------=_NextPart_000_0001_01C2E341.DD2BCD90 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I'm very new to all this so I apologize if I do things incorrectly. I got thrown into a mix here where I'm in charge of software, hardware monitoring, lots of stuff, among them is our postgres database, which I know very little about. I have been studying the posts and a couple of postgresql books for weeks and weeks and I am currently so stuck I don't know what else to do. By the way, thanks to everyone for their contributions. I have learned a lot and had a lot of help from reading your posts. We have a static sitebuilder where our clients build and manage an ecommerce site. They have to publish the site to get their changes to showup on their web site. (We will soon be going to a dynamic site but still need to support this one for some time). For most people this process works fine, albeit a bit slow, (between 10 seconds and 5 minutes) but for our larger users, they publish process dies after a while and they are unable to update their sites. I changed some memory and postgresql.conf settings a while ago and it seemed to totally fix the problem. Then we lost some RAM in our server. We were at 2.5 Gigs, now at 2.25 Gigs, if that's even a valid amount. Anyways, ever since then I'm having the same publishing problems. The main problem for my large users is that after 5 minutes and 5 seconds the process just quits and dissapears, and I can see it die out of the top. Here are some of my current settings: IBM Netfinity 7100 Dual P3 700 Mhz 2.25 Gigs of RAM 3 18 Gig SCSI Hard Drives RAID 5 Standard stuff here I guess Here is the latest for my sysctl, of which i don't even understand the shmmni. I have changed these settings quite a few times. kernel.shmmni = 4096 kernel.shmall = 1610612736 kernel.shmmax = 1610612736 Here is some postgresql.conf stuff: # Connection Parameters # #tcpip_socket = false #ssl = false max_connections = 128 # 1-1024 port = 5432 #hostname_lookup = false #show_source_port = false #unix_socket_directory = '' #unix_socket_group = '' #unix_socket_permissions = 0777 #virtual_host = '' #krb_server_keyfile = '' # # Performance # #sort_mem = 512 #shared_buffers = 2*max_connections # min 16 #fsync = true shared_buffers = 4096 sort_mem = 2048 #max_connections=128 #fsync=false I need at least 128 connections because of a Sorry, too many clients error that was occurring. I have tried so many different configurations of shared buffers and sort memory that I don't know what to do now. Some seem to work, but none very consistently. I've tried very high, with so so results. Now I'm back to square one. I apologize for the long post and for a major ignorance on my part. I have tried to learn and read as much as I can but am at my wits end here. If any onf you know any small tips I would greatly appreciate it. Thanks. Ben Jordan - Complete Newbie bjordan@esbex.com ------=_NextPart_000_0001_01C2E341.DD2BCD90 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Message
I'm very = new to all=20 this so I apologize if I do things incorrectly.  I got thrown into a m= ix=20 here where I'm in charge of software, hardware monitoring, lots of stuff, a= mong=20 them is our postgres database, which I know very little about.  I have= been=20 studying the posts and a couple of postgresql books for weeks and week= s=20 and I am currently so stuck I don't know what else to do.  By the= way,=20 thanks to everyone for their contributions.  I have learned a lot and = had a=20 lot of help from reading your posts.
 
We have a= static=20 sitebuilder where our clients build and manage an ecommerce site.  The= y=20 have to publish the site to get their changes to showup on their web site.&= nbsp;=20 (We will soon be going to a dynamic site but still need to support thi= s one=20 for some time).  For most people this process works fine, albeit = a bit=20 slow, (between 10 seconds and 5 minutes) but for our larger users= ,=20 they publish process dies after a while and they are unable to update their= =20 sites.  I changed some memory and postgresql.conf settings a while ago= and=20 it seemed to totally fix the problem.  Then we lost some RAM in our=20 server.  We were at 2.5 Gigs, now at 2.25 Gigs, if that's even a valid= =20 amount.  Anyways, ever since then I'm having the same publishing=20 problems.  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 o= f the=20 top.  Here are some of my current settings:
 
I= BM=20 Netfinity 7100
D= ual P3 700=20 Mhz
2= .25 Gigs of=20 RAM
3= 18 Gig=20 SCSI Hard Drives RAID 5
S= tandard=20 stuff here I guess
 
Here is = the=20 latest for my sysctl, of which i don't even understand the=20 shmmni.  I have changed these settings quite a few=20 times.
 
ker= nel.shmmni=20 =3D 4096
kernel.shmall =3D 1610612736
kernel.shmmax =3D=20 1610612736
 
Here=20 is some postgresql.conf stuff:
 
#       Connection= =20 Parameters
#
#tcpip_socket =3D false
#ssl =3D=20 false
 
max_connections =3D 128 # 1-102= 4
port=20 =3D 5432
#hostname_lookup =3D false
#show_source_port =3D=20 false
 
#unix_socket_directory =3D ''
#unix_socket_gr= oup =3D=20 ''
#unix_socket_permissions =3D 0777
 
#vi= rtual_host=20 =3D ''
 
#krb_server_keyfile =3D ''<= /DIV>
 

#
#       Performance
#
#so= rt_mem=20 =3D 512
#shared_buffers =3D 2*max_connections # min 16
#fsync =3D=20 true
 
shared_buffers =3D 4096
sort_me= m =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.&= nbsp;=20 I have tried so many different configurations of shared buffers and sort me= mory=20 that I don't know what to do now.  Some seem to work, but none very=20 consistently.  I've tried very high, with so so results.  Now I'm= back=20 to square one. 
 
I apologi= ze for the=20 long post and for a major ignorance on my part.  I have tried to learn= and=20 read as much as I can but am at my wits end here.  If any onf you know= any=20 small tips I would greatly appreciate it.  Thanks.
 
Ben Jorda= n -=20 Complete Newbie
bjordan@esbex.com
=
------=_NextPart_000_0001_01C2E341.DD2BCD90--