[prev in list] [next in list] [prev in thread] [next in thread]
List: postfix-users
Subject: Re: postfix milter body chunk length
From: Matthias Schneider <matthias.schneider () rmail ! de>
Date: 2019-08-20 14:06:02
Message-ID: abd5c8c8-51f0-9ee7-4169-ec22d8374393 () rmail ! de
[Download RAW message or body]
I have tested your patch, it's working fine. The speed is like unix socket!
Any chance it will go into next release?
Matthias Schneider
Am 20.08.19 um 15:47 schrieb Wietse Venema:
> Matthias Schneider:
>> Once i do "ip link set dev lo mtu 21845" i will get vstream_tweak_tcp:
>> TCP_MAXSEG 21793 and the performance is great (only 1 second for 100mb
>> body).
> In both cases, Postfix was sending 65535-byte body chunks?
>
> Then the problem was that getsockopt(TCP_MAXSEG) returned a too
> small MSS value. As implemented, vstream_tweak() will use 2x the
> the TCP_MAXSEG result for its I/O buffer size, to allow for dynamic
> changes in network routing. In your case, the 2x multiplier was not
> sufficient.
>
> If you have source, can you try the patch below:
>
> --- ./src/util/vstream_tweak.c- 2014-12-25 11:47:17.000000000 -0500
> +++ ./src/util/vstream_tweak.c 2019-08-20 09:45:52.000000000 -0400
> @@ -132,6 +132,8 @@
> if (mss > EFF_BUFFER_SIZE(fp) / 2) {
> if (mss < INT_MAX / 2)
> mss *= 2;
> + if (mss < INT_MAX / 2)
> + mss *= 2;
> vstream_control(fp,
> CA_VSTREAM_CTL_BUFSIZE(mss),
> CA_VSTREAM_CTL_END);
>
> Yes, this duplicates two lines of code.
>
> Wietse
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic