lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 25 Nov 2008 10:17:14 +0000
From:	Jamie Lokier <jamie@...reable.org>
To:	Sachin Gaikwad <sachin.kernel@...il.com>
Cc:	Ric Wheeler <ric@....com>, Jeff Garzik <jeff@...zik.org>,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	Chris Wedgwood <cw@...f.org>
Subject: Re: Proposal for "proper" durable fsync() and fdatasync()

Sachin Gaikwad wrote:
> > No, fsync() doesn't always flush the drive's write cache.  It often
> > does, any I think many people are under the impression it always does,
> > but it doesn't.
> >
> > Try this code on ext3:
> >
> >        fd = open ("test_file", O_RDWR | O_CREAT | O_TRUNC, 0666);
> >        while (1) {
> >                char byte;
> >                usleep (100000);
> >                pwrite (fd, &byte, 1, 0);
> >                fsync (fd);
> >        }
> >
> > It will do just over 10 write ops per second on an idle system (13 on
> > mine), and 1 flush op per second.
> 
> How did you measure write-ops and flush-ops ? Is there any tool which
> can be used ? I tried looking at what CONFIG_BSD_PROCESS_ACCT
> provides, but no luck.

I don't remember; it was such a long time ago!

It probably involved looking at /sys/block/*/stat or something like that.

You might find the "blktrace" tool does what you want.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ