Re: [twsocket] TWSocket.Send timing

2008-05-15 Thread info2004
Wilfried,

Dan was correct. The time I noted was for Send to return, not for the data to 
actually be sent.

Given the 300ms for Send to return, is this to be expected?

If it is, then I will look to optimise elsewhere. But it just seems likely that 
something is a miss - wrong option setting maybe.

Regards,

Andy
Wilfried Mestdagh wrote:
 Hello Dan,
 
 As far as I know it shouldn't cause the TWSocket send call to take
 longer since that is asynchronous
 
 Correct, but I think he means the total time to send, not the time of
 the function call.
 
 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz
 

-- 
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] TWSocket.Send timing

2008-05-15 Thread Wilfried Mestdagh
Hello Andy,

 Dan was correct. The time I noted was for Send to return, not for the data to
 actually be sent.

Sorry then I have given you a wrong answer.

 Given the 300ms for Send to return, is this to be expected?

No it should return immediatly, the function is async. Are you
absolutely sure of this? Do you have a recent version of ICS?

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Thursday, May 15, 2008, 09:09, info2004 wrote:

 Wilfried,

 Dan was correct. The time I noted was for Send to return, not for the data to
 actually be sent.

 Given the 300ms for Send to return, is this to be expected?

 If it is, then I will look to optimise elsewhere. But it just seems likely 
 that
 something is a miss - wrong option setting maybe.

 Regards,

 Andy
 Wilfried Mestdagh wrote:
 Hello Dan,
 
 As far as I know it shouldn't cause the TWSocket send call to take
 longer since that is asynchronous
 
 Correct, but I think he means the total time to send, not the time of
 the function call.
 
 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz
 


-- 
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] TWSocket.Send timing

2008-05-15 Thread info2004
Wilfried,

ErmOops. etc.

My debug function to log the timestamps was the culprit. I should have just 
grabbed the time before, then the time after and done the math. What I actually 
did was review my log file with timestamps in it. This was the cause of the 
delay.

Using the time before and after the call, I am seeing anything between 15 and 
41 
ms for the call to return. Not the 300 previously reported.

The ICS version is 6.04 according to one of the source files.

Regards,

Andy
Wilfried Mestdagh wrote:
 Hello Andy,
 
 Dan was correct. The time I noted was for Send to return, not for the data to
 actually be sent.
 
 Sorry then I have given you a wrong answer.
 
 Given the 300ms for Send to return, is this to be expected?
 
 No it should return immediatly, the function is async. Are you
 absolutely sure of this? Do you have a recent version of ICS?
 
 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz
 
 Thursday, May 15, 2008, 09:09, info2004 wrote:
 
 Wilfried,
 
 Dan was correct. The time I noted was for Send to return, not for the data to
 actually be sent.
 
 Given the 300ms for Send to return, is this to be expected?
 
 If it is, then I will look to optimise elsewhere. But it just seems likely 
 that
 something is a miss - wrong option setting maybe.
 
 Regards,
 
 Andy
 Wilfried Mestdagh wrote:
 Hello Dan,

 As far as I know it shouldn't cause the TWSocket send call to take
 longer since that is asynchronous
 Correct, but I think he means the total time to send, not the time of
 the function call.

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 
 

-- 
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] TWSocket.Send timing

2008-05-15 Thread Angus Robertson - Magenta Systems Ltd
 My debug function to log the timestamps was the culprit. I should 
 have just grabbed the time before, then the time after and done the 
 math. 

Using real time to calculate duration is very inefficient, it's much
better to use GetTickCount which is milliseconds running time since
Windows booted (wraps after 49 days).  The latest ICS V6 beta
OverbyteIcsFtpSrvT.pas unit has a number of timer and trigger related
functions using ticks that handle the 49 day wrap, they are now used in
the FTP client for timing sessions and responses.  

Beware GetTickCount is only accurate to about 15ms depending on OS, so
QueryPerformanceCounter is far more accurate, but with a slightly higher
overhead since it uses 64-bits instead of 32-bits. 

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


Re: [twsocket] TWSocket.Send timing

2008-05-15 Thread Wilfried Mestdagh
 My debug function to log the timestamps was the culprit.

oke then all is fine :)

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] TWSocket.Send timing

2008-05-14 Thread Wilfried Mestdagh
Hello Dan,

 As far as I know it shouldn't cause the TWSocket send call to take
 longer since that is asynchronous

Correct, but I think he means the total time to send, not the time of
the function call.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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


[twsocket] TWSocket.Send timing

2008-05-13 Thread info2004
Hi,

I am logging the time before and after a call to Send. I am sending 60 bytes, 
and the Send call is taking 300ms to complete.

Does this sound right?

I am running a P4 2.4GHz 1G ram. I was expecting 10's of ms really.

If this is to be expected, then I won't ask the next question - which would be 
how to speed it up.

Regards,

Andy
-- 
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] TWSocket.Send timing

2008-05-13 Thread Wilfried Mestdagh
Hello Andy,

 I am logging the time before and after a call to Send. I am sending 60 bytes,
 and the Send call is taking 300ms to complete.

this is the nagle algoritm. nagle wait a little while to see if you want
to send more. this is to fill up a complete packet of 1514 (?) bytes.
You can speed it up by setting wsoTcpNoDelay in ComponentOptions in both
ends, but this can slow down network performance. See MSDN at Microsoft
are many articles discussing it.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz


-- 
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] TWSocket.Send timing

2008-05-13 Thread info2004
Wilfried,

I'll have a look on MSDN and see what they say.

I think that I will try and pad out my data to the min packet size an dsee if 
that speeds things up, or screws up the server.

Regards,

Andy
Wilfried Mestdagh wrote:
 Hello Andy,
 
 I am logging the time before and after a call to Send. I am sending 60 bytes,
 and the Send call is taking 300ms to complete.
 
 this is the nagle algoritm. nagle wait a little while to see if you want
 to send more. this is to fill up a complete packet of 1514 (?) bytes.
 You can speed it up by setting wsoTcpNoDelay in ComponentOptions in both
 ends, but this can slow down network performance. See MSDN at Microsoft
 are many articles discussing it.
 
 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz
 
 

-- 
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] TWSocket.Send timing

2008-05-13 Thread Dan F
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 On Behalf Of Wilfried Mestdagh
 Sent: 13 May 2008 19:34
 To: ICS support mailing
 Subject: Re: [twsocket] TWSocket.Send timing
 
 Hello Andy,
 
  I am logging the time before and after a call to Send. I am sending
 60 bytes,
  and the Send call is taking 300ms to complete.
 
 this is the nagle algoritm. nagle wait a little while to see if you
 want
 to send more. this is to fill up a complete packet of 1514 (?) bytes.
 You can speed it up by setting wsoTcpNoDelay in ComponentOptions in
 both
 ends, but this can slow down network performance. See MSDN at Microsoft
 are many articles discussing it.
 
 ---
 Rgds, Wilfried [TeamICS]

I thought the Nagle algorithm would only apply to the speed at which the
underlying Winsock socket sends the data.  As far as I know it shouldn't
cause the TWSocket send call to take longer since that is asynchronous isn't
it?  Please correct me if I'm wrong.

Dan

-- 
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