Received: with ECARTIS (v1.0.0; list xfs); Fri, 15 Feb 2008 21:40:42 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.0-r574664 (2007-09-11) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_44, J_CHICKENPOX_52,J_CHICKENPOX_74 autolearn=no version=3.3.0-r574664 Received: from cuda.sgi.com (cuda2.sgi.com [192.48.168.29]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m1G5eZJI001085 for ; Fri, 15 Feb 2008 21:40:36 -0800 X-ASG-Debug-ID: 1203140459-283c01f70000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bob.dscon.sk (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 56F6E5E24BC for ; Fri, 15 Feb 2008 21:41:00 -0800 (PST) Received: from bob.dscon.sk (bob.dscon.sk [88.86.113.10]) by cuda.sgi.com with ESMTP id Qf8KdOWpaBq1LUrY for ; Fri, 15 Feb 2008 21:41:00 -0800 (PST) Received: by bob.dscon.sk (Postfix, from userid 1007) id 802E7DC359; Sat, 16 Feb 2008 06:41:42 +0100 (CET) Date: Sat, 16 Feb 2008 06:41:42 +0100 To: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: rewrite very slow Subject: Re: rewrite very slow Message-ID: <20080216054142.GD4859@bob.dscon.sk> References: <20080215191636.GC4859@bob.dscon.sk> <47B62FF6.2000903@sandeen.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47B62FF6.2000903@sandeen.net> User-Agent: Mutt/1.5.13 (2006-08-11) From: xfs@bob.dscon.sk (DS) X-Barracuda-Connect: bob.dscon.sk[88.86.113.10] X-Barracuda-Start-Time: 1203140461 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=3.0 tests= X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.42326 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV 0.91.2/5833/Fri Feb 15 11:30:30 2008 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 14464 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: xfs@bob.dscon.sk Precedence: bulk X-list: xfs Test configuration: Linux kernel 2.6.23.1 #1 SMP 2x Intel(R) Xeon(TM) CPU 2.40GHz with HT iSCSI storage (1TB - 7 sata disks in RAID6, 2GB cache controler) Yes, your "test" works fine: file1:/mnt/hosting/test# time ./test real 0m0.334s user 0m0.000s sys 0m0.000s Is there any way to get it work for perl/php/other scripts/programs? DS On Fri, Feb 15, 2008 at 06:36:06PM -0600, Eric Sandeen wrote: > DS wrote: > > Hello, > > > > I need some help to tunning my storage. > > ... > > TIME 43 sekund > > > What kernel? when I test on my 2.6.23.9-85.fc8 and 2.6.22.5 boxes, I > see 2 and 7 seconds for rewrite, respectively. > > but granted, on ext3 I get 0 seconds for every run. > > Also the difference appears to be O_TRUNC (which the perl script does); > if I code it in c: > > #include > #include > #include > > void main(void) > { > int i; > int fd; > char file[4]; > > for (i = 0; i < 100; i++) { > sprintf(file, "%d.txt", i); > fd = open(file, O_CREAT|O_RDWR|O_TRUNC, 0644); > write(fd, "aaaaaaaaaaaaaaaaaaa\n"); > close(fd); > } > } > > rewrite is a bit slower w/ O_TRUNC in place, plenty fast w/o it. Not > sure about the xfs/ext3 difference... this is probably a side-effect of > flushes xfs put into place on truncate (IIRC?) > > -Eric > >