Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id D585D13364DE for ; Tue, 19 Oct 2010 13:28:42 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 34365-02 for ; Tue, 19 Oct 2010 16:28:35 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.8]) by mail.postgresql.org (Postfix) with ESMTP id 3DE781337B51 for ; Tue, 19 Oct 2010 13:28:35 -0300 (ADT) Received: from [192.168.1.7] (static-71-179-240-8.bltmmd.fios.verizon.net [71.179.240.8]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0MEKbo-1Osu2B2iVM-00GBId; Tue, 19 Oct 2010 18:28:32 +0200 Message-ID: <4CBDC72D.3080301@2ndquadrant.com> Date: Tue, 19 Oct 2010 12:28:29 -0400 From: Greg Smith User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: Jon Nelson CC: pgsql-performance@postgresql.org Subject: Re: odd postgresql performance (excessive lseek) References: <10133.1287498969@sss.pgh.pa.us> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:tI2u1nz+9uCbTFlF6rqwCZauPDb6ws2A0d0jOaFpAe3 hr/UK+qcGyYvj6Qjt85qKWOq0C3PVPZ2OrS+9NqTcSxmCr3U3m 75G8pahXpx3buBormdubx07HsC8yWtz+HLTtcuBkS5IC3B86RX WpFIDz/SwaTc+BPX8ydKnHtaygg2H4yebkpdG6okl4LRpoTHg2 x39CWzP9rG3sxpnPy59chjWvU8ZzXmIQLtpHRAw4WU= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201010/310 X-Sequence-Number: 40728 Jon Nelson wrote: > That's a little harsh (it's not untrue, though). > Welcome to pgsql-performance! You can get a right answer, or a nice answer, but given the personalities involved it's hard to get both at the same time. With this crowd, you need to be careful stating something you were speculating about as if you were certain of it, and to be certain here usually means "I read the source code". I recommend writing theories as a question ("would X have sped this up?") rather than a statement ("X will speed this up") if you want to see gentler answers. > Has any work been done on making use of shared memory for file stats > or using fallocate (or posix_fallocate) to allocate files in larger > chunks? > Just plain old pre-allocating in larger chunks turns out to work well. Am hoping to get that into an official patch eventually. -- Greg Smith, 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD PostgreSQL Training, Services and Support www.2ndQuadrant.us Author, "PostgreSQL 9.0 High Performance" Pre-ordering at: https://www.packtpub.com/postgresql-9-0-high-performance/book