X-Original-To: pgsql-performance@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 3167A47621C for ; Tue, 1 Apr 2003 15:21:43 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 67417476178 for ; Tue, 1 Apr 2003 15:21:42 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h31KLh2L002852; Tue, 1 Apr 2003 15:21:43 -0500 (EST) To: "Scott Buchan" Cc: pgsql-performance@postgresql.org Subject: Re: Postgresql performance on Solaris In-reply-to: <71F044551C53974EB0735B3737EFE2FC088645@wwwserver> References: <71F044551C53974EB0735B3737EFE2FC088645@wwwserver> Comments: In-reply-to "Scott Buchan" message dated "Tue, 01 Apr 2003 14:31:13 -0500" Date: Tue, 01 Apr 2003 15:21:43 -0500 Message-ID: <2851.1049228503@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-32.5 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/9 X-Sequence-Number: 1515 "Scott Buchan" writes: > I am getting poor performance from my postgresql (version 7.3.2 compiled > with gcc 2.95.2) database when running load tests on my web application. > The database works great until I get above 200 concurrent users. Hmm ... that sounds kinda familiar; you might check the archives for similar reports from Solaris users. AFAIR we didn't figure out the problem yet, but there's some raw data available. > When running the load tests, the cpu of the box is always above 60% > idle. I have run iostat and I am not seeing any problems with io. [ scratches head ... ] If the bottleneck isn't CPU, and it isn't I/O, then what could it be? You sure about the above observations? (Does iostat include swap activity on that platform?) The only other idea I can think of is that there's some weird effect in the locking code (which only shows up with lots of concurrent backends) such that would-be lockers repeatedly fail and sleep when they should have gotten the lock. If you can figure out how to tell the difference between a backend waiting for disk I/O and one waiting for a semaphore or sleeping, it'd be interesting to see what the majority of the backends are doing. Another way to try to gather some data is to attach to one of the backend processes with a debugger, and just stop it to get a stack trace every so often. If the stack traces tend to point to the same place that would give some info about the bottleneck. regards, tom lane