Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 9F7F69FC175 for ; Fri, 13 Jul 2007 11:40:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 49636-07 for ; Fri, 13 Jul 2007 11:40:35 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 2C6FA9FC1C1 for ; Fri, 13 Jul 2007 11:40:40 -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 l6DEeU2S021496; Fri, 13 Jul 2007 10:40:31 -0400 (EDT) To: Michael Stone cc: Adriaan van Os , pgsql-performance@postgresql.org Subject: Re: TRUNCATE TABLE In-reply-to: <20070713124435.GL31358@mathom.us> References: <46953949.3030201@microbizz.nl> <87ps2ypox3.fsf@oxford.xeocode.com> <46972DFA.9000900@microbizz.nl> <20070713124435.GL31358@mathom.us> Comments: In-reply-to Michael Stone message dated "Fri, 13 Jul 2007 08:44:38 -0400" Date: Fri, 13 Jul 2007 10:40:30 -0400 Message-ID: <21495.1184337630@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/153 X-Sequence-Number: 25837 Michael Stone writes: > xfs' slowness is proportional to the *number* rather than the *size* of > the files. In postgres you'll tend to have fewer, larger, files than you > would in (e.g.) a source code repository, so it is generally more > important to have a filesystem that deletes large files quickly than a > filesystem that deletes lots of files quickly. The weird thing is that the files in question were hardly "large". IIRC his test case used a single int4 column, so the rows were probably 36 bytes apiece allowing for all overhead. So the test cases with about 5K rows were less than 200K in the file, and the ones with 200K rows were still only a few megabytes. I tried the test on my Linux machine (which I couldn't do when I responded earlier because it was tied up with another test), and saw truncate times of a few milliseconds for both table sizes. This is ext3 on Fedora 6. So I'm still of the opinion that there's something broken about Adriaan's infrastructure, but maybe we have to look to an even lower level than the filesystem. Perhaps he should try getting some bonnie++ benchmark numbers to see if his disk is behaving properly. regards, tom lane