OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: adi (adiacme.com)
Date: Sat Feb 02 2002 - 21:02:22 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    On Sun, Feb 03, 2002 at 02:41:52AM +0100, Matthias Andree wrote:
    > Not really. BSD-softupdates aware code is safe with Linux 2.4's reiserfs
    > or ext3fs, but not ext2fs (which needs -o sync).

    I use ext3fs. But link(2) on ext3fs is still be done asynchronously.
    This is explain why I got less than 1000 mails on my maildir.

    Your suggestion to add fsync() call after link() do the trick.
    I did the test again. Following your suggestion, I use this patch:

    *** maildir.c Tue Nov 27 22:43:47 2001
    --- maildir.c- Sun Feb 3 09:49:34 2002
    ***************
    *** 80,85 ****
    --- 80,86 ----
          VSTRING *why;
          VSTRING *buf;
          VSTREAM *dst;
    + VSTREAM *new;
          int mail_copy_status;
          int deliver_status;
          int copy_flags;
    ***************
    *** 145,150 ****
    --- 146,156 ----
                          || (make_dirs(curdir, 0700), make_dirs(newdir, 0700)) < 0
                          || sane_link(tmpfile, newfile) < 0)) {
                      vstring_sprintf(why, "link to %s: %m", newfile);
    + mail_copy_status = MAIL_COPY_STAT_WRITE;
    + }
    + if ((new = vstream_fopen(newfile, O_RDONLY, 0)) &&
    + (fsync(vstream_fileno(new)))) {
    + vstring_sprintf(why, "sync %s: %m", newfile);
                      mail_copy_status = MAIL_COPY_STAT_WRITE;
                  }
              }
    > Mount with -o sync if that bothers you. -o sync has only minor impact
    > compared to the impact the ext2 -> ext3 switch has.

    I didn't noticed any difficulties while migrating our mailserver
    from ext2 -> ext3. Yes, I use ext3fs for postfix on our production
    machine, days before ext3fs being accepted as an officially supported
    fs on linux-2.4.x

    I did chattr -S on postfix's queue, and got throughput about 5-6 faster
    compared with while make directory operations synchronously (ext3fs).
    Indeed, I got the speed comparable with ext2fs + write cache enabled.
    My God!!! (note: I done the test *not* on any production machines).

    I noticed that qmgr using unlink() for removing already delivered
    queue file. It's mean that on asynchronous directory operation there is
    possibility that a message would be delivered more than once. It's okay
    (I think) as long as it won't lose any message :-)

    Regards,

    P.Y. Adi Prasaja

    -
    To unsubscribe, send mail to majordomopostfix.org with content
    (not subject): unsubscribe postfix-users