On 1/18/2012 3:26 PM, Stan Hoeppner wrote:
> On 1/18/2012 4:46 AM, Konrad Rzepecki wrote:

>> I don't know why it take some much time, but it cannot be disabled
>> (fsync) in postfix due to delivery guarantee. However, my mails (those
>> ones) are not very important, and lost some of them is not a problem, so
>> such option will be useful for me. Best in some
>> "recipient|sender_disable_fsync_maps" fashion.
> 
> fsync isn't your (only) problem if batch queuing 15K messages takes an
> hour+ with an 8 disk RAID10 w/4 spindles of IOPS throughput.  Even at
> 7.2K RPM each disk should be able to fsync at least 50 small (4KB-16KB)
> msgs/sec, unless they are something huge like 1MB newsletters with
> attachments or some such.
> 
> 50*4*3600 = 720,000 msgs/hour
> 
> Likewise, at 200 msgs/sec fsync'd:
> 
> 15,000/200 = 75 seconds

To demonstrate that fsync alone shouldn't be a factor here, I just used
smtp-source to send 15K msgs of 2KB size to a local test account, using
a single feeder thread.  Both the postfix queue and the target mbox mail
file reside on a 35GB EXT2 (yes, EXT2) filesystem on a single 7.2K
Western Digital 500GB single platter SATA drive.  Writes to the queue
were in competition with Dovecot deliver appending the msgs to the mbox
file during the entire run.

$ time smtp-source -s 1 -l 2048 -m 15000 -c -f * -t * localhost:10125
15000

real    6m29.462s
user    0m15.325s
sys     0m23.709s

Queuing 15K messages took 6 minutes 30 seconds on a single 7.2K drive,
again while competing with the delivery agent for spindle time.  And
this performance is from a 12 year old box.  Your quad core 8 drive
RAID10 box should be able to queue at least 60K msgs with your injection
method in the same amount of time.

Test system specifications:

Abit BP6, 2xCeleron 550, 384MB PC100, SiI3512 SATA PCI, 1xWD5000AAKS
Vanilla kernel 2.6.38.6, Debian 6.0.3, Postfix 2.8.3, Dovecot 1.2.15
elevator=deadline min_free_kbytes=8192 vfs_cache_pressure=100

If your kernel is using CFQ you may want to try deadline.  But that
alone isn't going to fix a 10x performance deficit.  You've probably got
multiple factors degrading performance.

-- 
Stan

Reply via email to