X-Spam-Checker-Version: SpamAssassin 3.4.0-r929098 (2010-03-30) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.4.0-r929098 Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id o4L6f3of252400 for ; Fri, 21 May 2010 01:41:04 -0500 X-ASG-Debug-ID: 1274424278-0659022d0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mx01.bfk.de (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 70756A0378B for ; Thu, 20 May 2010 23:44:39 -0700 (PDT) Received: from mx01.bfk.de (mx01.bfk.de [193.227.124.2]) by cuda.sgi.com with ESMTP id WD4uvHmOAWFXXQI2 for ; Thu, 20 May 2010 23:44:39 -0700 (PDT) Received: from mx00.int.bfk.de ([10.119.110.2]) by mx01.bfk.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) id 1OFLwu-0007vj-9E; Fri, 21 May 2010 06:43:12 +0000 Received: by bfk.de with local id 1OFLwx-0001q5-1O; Fri, 21 May 2010 06:43:15 +0000 To: Stewart Smith Cc: Christoph Hellwig , xfs@oss.sgi.com X-ASG-Orig-Subj: Re: XFS on 2.6.26: reading the first 4K of a large file takes ages Subject: Re: XFS on 2.6.26: reading the first 4K of a large file takes ages References: <8239xojfco.fsf@mid.bfk.de> <20100519114826.GA18224@infradead.org> <82sk5m7oyz.fsf@mid.bfk.de> <87zkztojwh.fsf@willster.local.flamingspork.com> From: Florian Weimer Date: Fri, 21 May 2010 06:43:15 +0000 In-Reply-To: <87zkztojwh.fsf@willster.local.flamingspork.com> (Stewart Smith's message of "Fri\, 21 May 2010 16\:20\:46 +1000") Message-ID: <828w7d69h8.fsf@mid.bfk.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Barracuda-Connect: mx01.bfk.de[193.227.124.2] X-Barracuda-Start-Time: 1274424279 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.30381 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean * Stewart Smith: > On Thu, 20 May 2010 12:11:00 +0000, Florian Weimer wrote: >> Thanks for confirming my hunch. I don't think it's worth fixing this >> in XFS. The database should call posix_fallocate() before flushing >> its internal cache to the file in essentially random order, but it's >> difficult to get upstream to implement this (the source code is a bit >> hard to follow, unfortunately). > > Which database? Oracle Berkeley DB. > You could always mount with allocsize This happens with "allocsize=3D4194304". > or use other tools to do the preallocation before things got too > bad. Is there a way to transparently preallocate a few GB after the current end of the file? That would be helpful because Berkeley DB wouldn't have to know about it. It's a legacy system, otherwise I would invest more effort into putting some sort of preallocation somewhere deep into Berkeley DB. --=20 Florian Weimer BFK edv-consulting GmbH http://www.bfk.de/ Kriegsstra=DFe 100 tel: +49-721-96201-1 D-76133 Karlsruhe fax: +49-721-96201-99