Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 18B369FB427 for ; Thu, 10 May 2007 01:30:20 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 58992-07 for ; Thu, 10 May 2007 01:30:12 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 5C1779FB3E1 for ; Thu, 10 May 2007 01:30:13 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l4A4U4h7006686; Thu, 10 May 2007 00:30:04 -0400 (EDT) To: Jeff Davis cc: "Joshua D. Drake" , CAJ CAJ , Ralph Mason , pgsql-performance@postgresql.org Subject: Re: Performance Woes In-reply-to: <1178757739.24902.78.camel@dogma.v10.wvs> References: <5132236932388612597@unknownmsgid> <467669b30705091726j31fce52fp2f49649be675d811@mail.gmail.com> <4642677F.80209@commandprompt.com> <1178757739.24902.78.camel@dogma.v10.wvs> Comments: In-reply-to Jeff Davis message dated "Wed, 09 May 2007 17:42:19 -0700" Date: Thu, 10 May 2007 00:30:04 -0400 Message-ID: <6685.1178771404@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/219 X-Sequence-Number: 24609 Jeff Davis writes: > On Wed, 2007-05-09 at 17:29 -0700, Joshua D. Drake wrote: >> Sounds to me like you just need to up the total amount of open files >> allowed by the operating system. > It looks more like the opposite, here's the docs for > max_files_per_process: I think Josh has got the right advice. The manual is just saying that you can reduce max_files_per_process to avoid the failure, but it's not making any promises about the performance penalty for doing that. Apparently Ralph's app needs a working set of between 800 and 1000 open files to have reasonable performance. > That is a lot of tables. Maybe a different OS will handle it better? > Maybe there's some way that you can use fewer connections and then the > OS could still handle it? Also, it might be worth rethinking the database structure to reduce the number of tables. But for a quick-fix, increasing the kernel limit seems like the easiest answer. regards, tom lane