Ran some performance tests as suggested.<br><br>Machine A connects to machine B on a gigabit lan.  Machine A sends <br>1024 1MB chucks of data; 1 GB in total. Machine B, the server, reads <br>in the MB and writes it to a file.<br><br>NOTE: server and client are little test programs written in C.  <br><br>Machine B (Server) hardware:<br>- Single (no raid) Seagate Cheetah 70G Ultra320 15K<br>- Quad Opteron 870<br>- 16G DDR400<br>- Backplane: LSI Logic / Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 8)<br><br>Sync methods include:<br>1. mount with sync option<br>  - tried sync,dirsync which added no additional overhead<br>2. use O_SYNC open() flag<br>3. use fdatasync() just before closing the file<br>  - fsync() and fdatasync() produced the same results<br><br><br>EXT2 tests<br>==========================================<br>No
 sync                     12.3 seconds  (83 MB/Sec)<br>mount=sync                  44.3 seconds  (23 MB/Sec)<br>O_SYNC                      31.7 seconds  (32 MB/Sec)<br>fdatasync()                 31.3 seconds  (32 MB/Sec)<br><br><br>EXT3 tests<br>===========================================<br>No sync data=writeback      14.5 seconds  (70 MB/Sec)<br>No sync data=ordered        17 seconds    (60 MB/Sec)<br>No sync data=journal        65 seconds    (15
 MB/Sec)<br>data=ordered O_SYNC         49 seconds    (20 MB/Sec)<br>data=ordered,sync           52 seconds    (19 MB/Sec)<br>data=ordered fdatasync()    45.5 seconds  (22 MB/Sec)<br>data=journal O_SYNC         72.5 seconds  (14 MB/Sec)<br>data=journal,sync           81 seconds    (12 MB/Sec)<br>data=journal fdatasync()    60.5 seconds  (17 MB/Sec)<br><br>thanks<br><br><b><i>Andreas Dilger <adilger@clusterfs.com></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> On Mar 21, 2007  16:51 -0700, brian stone wrote:<br>> My application always needs to sync file data after writing. I don't want anything handing around in the
 kernel buffers. I am wondering what is the best method to accomplish this.<br><br>>  4. Do I use EXT3 in full journaled mode, where the data and metadata are journaled? In this case, is the journaled data sync'd or async'd? When the journal commits the data to the file system, is that sync'd or dumped into kernel buffers?<br>>  <br>>  5. Since I will always be syncing the data, does it make any sense to use EXT3? It feels like the EXT3 journal would be unnecessary.<br><br>In theory, ext3 + data=journal will give you the best performance, because<br>sync IO will always be linear IO to the journal.  Unless your filesystem is<br>constantly busy, then the writes to the filesystem can happen asynchronously<br>after being committed to the journal without danger of being lost.<br><br>That said, nothing better than benchmarking your app with different<br>filesystem options to see which one is best.<br><br>Cheers, Andreas<br>--<br>Andreas Dilger<br>Principal Software
 Engineer<br>Cluster File Systems, Inc.<br><br></blockquote><br><p>

<hr size=1>No need to miss a message. <a href="http://us.rd.yahoo.com/evt=43910/*http://mobile.yahoo.com/mail
">Get email on-the-go </a><br>with Yahoo! Mail for Mobile. <a href="http://us.rd.yahoo.com/evt=43910/*http://mobile.yahoo.com/mail
">Get started.</a>