At Fri, 11 Nov 2011 06:59:42 -0500, Christoph Hellwig wrote: > > On Fri, Nov 11, 2011 at 08:41:25PM +0900, MORITA Kazutaka wrote: > > == > > > > > > The result was as follows: > > > > $ time ./a.out temp pwrite > > > > real 0m0.244s > > user 0m0.000s > > sys 0m0.008s > > > > $ time ./a.out temp fallocate > > > > real 0m43.050s > > user 0m0.000s > > sys 0m0.060s > > Wow, I wonder what glibc is doing there given that you write the > whole block. > > > I guess posix_fallocate() causes a severe performance problem under > > the circumstances that write is slow, because it calls lots of > > pwrite() for each ext3 block when fallocate() is not available. > > Ok. Do you want a patch using fallocate and keeping the existing > fallback for now? Yes, please. :) Thanks. Kazutaka |