Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id CDF4D2E003C for ; Thu, 29 May 2008 00:02:43 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 53158-02 for ; Thu, 29 May 2008 00:02:15 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from brmea-mail-4.sun.com (brmea-mail-4.Sun.COM [192.18.98.36]) by developer.postgresql.org (Postfix) with ESMTP id 563442E0033 for ; Thu, 29 May 2008 00:01:39 -0300 (ADT) Received: from fe-amer-10.sun.com ([192.18.109.80]) by brmea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id m4T31cCU004864 for ; Thu, 29 May 2008 03:01:38 GMT Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0K1M00F010CEMA00@mail-amer.sun.com> (original mail from J.K.Shah@Sun.COM) for pgsql-performance@postgresql.org; Wed, 28 May 2008 21:01:38 -0600 (MDT) Received: from [192.168.1.5] ([76.19.46.33]) by mail-amer.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0K1M00M4S0EL2BF0@mail-amer.sun.com>; Wed, 28 May 2008 21:01:34 -0600 (MDT) Date: Wed, 28 May 2008 23:01:37 -0400 From: "Jignesh K. Shah" Subject: Re: 2GB or not 2GB In-reply-to: To: Greg Smith Cc: Josh Berkus , pgsql-performance@postgresql.org Message-id: <483E1C91.8030905@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: <200805281659.26945.josh@agliodbs.com> User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/365 X-Sequence-Number: 30333 Greg Smith wrote: > On Wed, 28 May 2008, Josh Berkus wrote: > >> shared_buffers: according to witnesses, Greg Smith presented at East >> that >> based on PostgreSQL's buffer algorithms, buffers above 2GB would not >> really receive significant use. However, Jignesh Shah has tested >> that on >> workloads with large numbers of connections, allocating up to 10GB >> improves performance. > > Lies! The only upper-limit for non-Windows platforms I mentioned was > suggesting those recent tests at Sun showed a practical limit in the > low multi-GB range. > > I've run with 4GB usefully for one of the multi-TB systems I manage, > the main index on the most frequently used table is 420GB and anything > I can do to keep the most popular parts of that pegged in memory seems > to help. I haven't tried to isolate the exact improvement going from > 2GB to 4GB with benchmarks though. > Yep its always the index that seems to benefit with high cache hits.. In one of the recent tests what I end up doing is writing a select count(*) from trade where t_id >= $1 and t_id < SOMEMAX just to kick in index scan and get it in memory first. So higher the bufferpool better the hit for index in it better the performance. -Jignesh