Re: [twsocket] SSL post extremely slow

2016-05-12 Thread RTT




Either way, if the problem is the async nature of ICS,
shouldn't an alternate method be provided?


Try with the TransmitFile function
https://msdn.microsoft.com/en-us/library/windows/desktop/ms740565(v=vs.85).aspx

You may create a descendant of the THttpCli, override the SocketDataSent 
method and use the TransmitFile from there.
Check the Indy IdStackWindows.pas for code (function ServeFile) that 
uses the TransmitFile.

If this work, maybe it can be integrated in the ICS code.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SSL post extremely slow

2016-05-12 Thread brian -
On Thu, May 12, 2016 at 4:24 PM, RTT  wrote:

>
> If that's the case, using SYN, that is sync, to compare against the async
> ICS is not of any help. You need to compare with another async component.



I think all other libraries are blocking, Indy, Synapse, Delphi's own
tcp/ip stuff. Either way, if the problem is the async nature of ICS,
shouldn't an alternate method be provided? We are not talking about a
little difference here, it's huge. Also I'm not sure it makes much sense to
stay async with current hardware/software, things have changed, and it's
very easy to use a blocking socket in a thread to achieve the same.
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SSL post extremely slow

2016-05-12 Thread brian -
Checked again just now, w7:

ICS with 64k buffer: Upload Duration: 33.2 secs / Speed: 137,151 chars/sec
SYN: Upload Duration: 2 secs / Speed: 2,275,855 chars/sec

On Thu, May 12, 2016 at 4:04 PM, brian -  wrote:

> Erm, I thought we all reached a clear conclusion that the issue happens
> from w98 to w7, and whatever causes the problem seems fixed from w8
> onwards. Since all the tests were compared with a different tcp/ip library
> at the exact same time of performing the ICS tests, I think we can rule out
> random temporal issues.
>
> On Thu, May 12, 2016 at 3:48 PM, Angus Robertson - Magenta Systems Ltd <
> an...@magsys.co.uk> wrote:
>
>> > GET seems fine though. You mentioned changing the buffer size,
>> > where would you do that?
>>
>> I've not yet looked closely at the code, once SSL is done.
>>
>> > I tried changing 8k to 64k in OverbyteIcsHttpProt.pas here,
>> > but it made no difference:
>>
>> But then you discovered the low speeds only happened on certain
>> platforms, not all platforms.  Which is exactly my point, modern
>> hardware and perhaps the OS, can effect performance dramatically, as
>> can the internet generally.
>>
>> I do daily speed tests at 5:30am downloading HTTP files from several of
>> my servers, and a few weeks ago the speed tripled without any changes
>> of client or server software or internet access, but some days the
>> speed is back to the original slower pace.  It could be windows updates,
>> my Sonicwall firewalls behaving strangely, or the broadband wholesaler
>> throttling my connection.  Sometimes this stuff can not be rationally
>> explained.
>>
>> Angus
>>
>>
>>
>>
>> --
>> To unsubscribe or change your settings for TWSocket mailing list
>> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
>> Visit our website at http://www.overbyte.be
>>
>
>
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SSL post extremely slow

2016-05-12 Thread brian -
GET seems fine though. You mentioned changing the buffer size, where would
you do that? I tried changing 8k to 64k in OverbyteIcsHttpProt.pas here,
but it made no difference:

~4617
procedure THttpCli.SocketDataSent(Sender : TObject; ErrCode : Word);
var
Len : Integer;
begin
if not FAllowedToSend then
Exit;

if Length(FSendBuffer) = 0 then
SetLength(FSendBuffer, 8192);
Len := FSendStream.Read(FSendBuffer[0], Length(FSendBuffer));



On Thu, May 12, 2016 at 2:05 PM, Angus Robertson - Magenta Systems Ltd <
an...@magsys.co.uk> wrote:

> > Note that the original subject is a bit misleading, the issue is
> > not about ssl POST, but POST in general, whether on http or https.
>
> And my comments were mostly related to GET/POST in general, not
> specifically SSL which one might expect to slow things down, but not
> necessarily.
>
> Angus
>
>
> --
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SSL post extremely slow

2016-05-12 Thread brian -
Note that the original subject is a bit misleading, the issue is not about
ssl POST, but POST in general, whether on http or https.

On Thu, May 12, 2016 at 12:13 PM, Angus Robertson - Magenta Systems Ltd <
an...@magsys.co.uk> wrote:

> > I still have some Windows 7 VMs, so will do more testing next
> > week, once the new OpenSSL stuff is finished.
>
> Not done any changes or real testing yet, except to confirm that HTTPS
> downloads are currently the same speed as HTTP, although one would
> expect the encryption overhead to slow things down.
>
> I have just discovered that all SSL traffic seems to use a fixed 4K
> buffer in wsocket, which I'll make variable sized.
>
> I suspect one reason we are currently seeing good speeds even with low
> buffer sizes is simply that the modern hardware we now use is so
> powerful and it can cope with programming deficiencies without
> performance penalty.
>
> All my clients and servers (bar one) are 64-bit OSs with 16G of memory
> and multi-core i5 or Xeon, my main development PC is SSD drives, less
> important for the servers since files are RAM cached.  And the latest
> CPUs have instructions to speed up SSL encryption.
>
> But this was all different even five years ago and if repeat testing on
> older hardware, I'm sure it will be much slower and the benefits of
> larger buffers and buffered file handling more obvious.  Not sure it's
> worth the effort...
>
> Angus
>
>
>
> --
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be