-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Content-Type: text/plain; charset=us-ascii
Hi all, I'm trying to determine the write performance of different file systems (ext2, ext3, jfs, xfs, reiser). Being a sysadmin by trade, I know how to configure systems and get them working, but really don't know a lot about characterizing performance at this level. So, what I'm trying to do is determine the amount of time it takes to write X number of files of Y size to each of these given file systems. Part of the problem is that I also need to determine the difference between synchronous writes and asynchronous writes. Here's where my real confusion comes in. Looking in the Stevens book Advanced Programming in the UNIX Environment, I found fsync(), which lead me to the man page of fdatasync(). In a SysAdmin article, I came across setvbuf(). My understanding of "the way things are" by default, is that the OS will buffer all writes until a certain point, then sync to disk. So, first I started playing around with fsync() and fdatasync(). These are supposed to be 2 different functions, with fdatasync() supposedly being the faster of the two (since it only needs to perform 1 write vs. fsync()'s 2). However, it seemed, at least on Linux, that these 2 calls performed exactly the same. I then looked at setvbuf and thought that if I used that to set the file I/O to unbuffered, that I could get away without fsync() or fdatasync(). Doing this, and not using either sync calls obviosly led to improved times. However, I believed that if I combined the 2, using setvbuf() and fsync(), the I should not see too much degradation, since, in theory, there wouldn't be any dirty buffers to flush. But when I called fsync(), the performance was essentially the same as only using fsync() and it seemed that using setvbuf() didn't matter at all. Someone mentioned to me that setvbuf() is "meant to be used on streams, which is character based data, and in Linux, all devices are block based" so I can't use setvbuf. This statement confused the heck out me. Yes, setvbuf() is meant to be used on streams. And yes, devices in Linux are block based. But does that matter? If so, can someone explain why? I'm a little over my head here :) If this isn't necessarilly clear, please let me know and I'll gladly provide more information. Thanks! - -- Seeya, Paul -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: Exmh version 2.2 06/23/2000 (debian 2.2-1) iD8DBQE8zp7guweSOVPxKO4RAkRrAJ9yI+95Iz3T8Il9BnylF8JoIK/2WgCgg1zE 814ArzRz5BdrOzI9VxeNQ1U= =DuTr -----END PGP SIGNATURE----- ***************************************************************** To unsubscribe from this list, send mail to [EMAIL PROTECTED] with the text 'unsubscribe gnhlug' in the message body. *****************************************************************
