Re: True fsync() in Linux (on IDE)

From: Peter Zaitsev
Date: Thu Mar 18 2004 - 15:48:40 EST


On Thu, 2004-03-18 at 12:33, Chris Mason wrote:

> Some suse 8.2 kernels had write barriers for IDE, some did not. If
> you're running any kind of recent suse kernel, you're doing cache
> flushes on fsync with ext3.

I have this kernel:


Linux abyss 2.4.20-4GB #1 Sat Feb 7 02:07:16 UTC 2004 i686 unknown
unknown GNU/Linux

I believe it is reasonably recent one from Hubert's kernels.

The thing is the performance is different if file grows or it does not.
If it does - we have some 25 fsync/sec. IF we're writing to existing
one, we have some 1600 fsync/sec

In the former case cache is surely not flushed.

> > I use 2.6.3 kernel for tests now (It is not the latest I know)
> > EXT3 file system.
> >
> > 3WARE has writeback cache setting in both cases.
>
> Then it sounds like your 2.4 is doing flushes. I'd expect this test to
> run very quickly without them.

2.4 does flush in one case but not in other. 2.6 does not do it in ether
case.

I was also surprised to see this simple test case has so different
performance with default and "deadline" IO scheduler - 1.6 vs 0.5 sec
per 1000 fsync's.




--
Peter Zaitsev, Senior Support Engineer
MySQL AB, www.mysql.com

Meet the MySQL Team at User Conference 2004! (April 14-16, Orlando,FL)
http://www.mysql.com/uc2004/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/