Board index » delphi » Different OS - Different Socket Speed?

Different OS - Different Socket Speed?

Hello!

I wrote two simple programs (client and server) to transfer some data with
the Delphi standard components TClientSocket and TServerSocket. They work as
expected and all data is always received, but:
With both programs running on the same machine, the transfer of 10 MB needs
approximately

8 seconds on Win 98
50 seconds on Win 95 (with and without Winsock 2 Update)
140 seconds on Win NT 4 Server
I'm currently developing an NT implementation using completion ports (no
results yet), but nevertheless NT should be able to work without them at
reasonable speed (or should it?).
Does anyone have an idea how to explain the differences?

Thanks

Oliver Kraheck

 

Re:Different OS - Different Socket Speed?


Quote
"Oliver Kraheck" <oli...@REMOVETHISkraheck.de> wrote in message

news:3a236d2a_2@dnews...

Quote
> 8 seconds on Win 98
> 50 seconds on Win 95 (with and without Winsock 2 Update)
> 140 seconds on Win NT 4 Server

Sounds weird.

NT Server per default allocates more CPU time to background processes, but
this won't account for the difference you're seeing.

Could you give us some more details please? What's the CPU usage during your
test? Any disk access? How much available (and total) memory have you got?
Any anti-virus software running?

--
Rune

Re:Different OS - Different Socket Speed?


Quote

> Could you give us some more details please? What's the CPU usage during
your
> test? Any disk access? How much available (and total) memory have you got?
> Any anti-virus software running?

Nothing else is running. No Delphi, no virus scanner. CPU usage is nearly
nothing, around 0 or 1 percent. The machine is a P3/650 with 128 MB RAM,
memory usage of each process does not exceed 12 MB.

It is the sending part that takes so much time. If I run the programs on
different machines, the transfer from Win NT to Win 98 takes some three
minutes, but from Win 98 to Win NT it takes 7 seconds.

What can one overlook to get such an effect!?

Oliver

Re:Different OS - Different Socket Speed?


Could you post the code?  I'd like to try it on Kylix.
Quote
Oliver Kraheck wrote:

> > Could you give us some more details please? What's the CPU usage during
> your
> > test? Any disk access? How much available (and total) memory have you got?
> > Any anti-virus software running?

> Nothing else is running. No Delphi, no virus scanner. CPU usage is nearly
> nothing, around 0 or 1 percent. The machine is a P3/650 with 128 MB RAM,
> memory usage of each process does not exceed 12 MB.

> It is the sending part that takes so much time. If I run the programs on
> different machines, the transfer from Win NT to Win 98 takes some three
> minutes, but from Win 98 to Win NT it takes 7 seconds.

> What can one overlook to get such an effect!?

> Oliver

Re:Different OS - Different Socket Speed?


Quote
"Oliver Kraheck" <oli...@REMOVETHISkraheck.de> wrote in message

news:3a237483_2@dnews...

Quote
> Nothing else is running. No Delphi, no virus scanner. CPU usage is nearly
> nothing, around 0 or 1 percent. The machine is a P3/650 with 128 MB RAM,
> memory usage of each process does not exceed 12 MB.

And no disk access?

Quote
> It is the sending part that takes so much time. If I run the programs on
> different machines, the transfer from Win NT to Win 98 takes some three
> minutes, but from Win 98 to Win NT it takes 7 seconds.

This reminds me of the old days when using 16 bit DOS communication (e.g.
the venerable Telix). Back then NT would receive data just fine, but when
the DOS program wanted to send something the cps dropped dramatically,
because NT wouldn't give it enough CPU time. When it received the interrupts
would force NT to allocate more time, but that was it.

Why this apparently similar situation affects you here and now is curious.

Do you use asynchronous (non-blocking -- i.e. windows messages) or
synchronous (blocking) sockets?

--
Rune

Re:Different OS - Different Socket Speed?


I have seen the same kind of results trying to test a VPN (virtual
private network) , an NT machine was an order of magnitude slower than
a win98 one. The guy from the service provider we were working with
said he thought it was something to do with default packet sizes or
something. Sorry I haven't had time to look into this any further, but
will need to know sooner or later.
Quote
"Oliver Kraheck" <oli...@REMOVETHISkraheck.de> wrote:
>Hello!

>I wrote two simple programs (client and server) to transfer some data with
>the Delphi standard components TClientSocket and TServerSocket. They work as
>expected and all data is always received, but:
>With both programs running on the same machine, the transfer of 10 MB needs
>approximately

>8 seconds on Win 98
>50 seconds on Win 95 (with and without Winsock 2 Update)
>140 seconds on Win NT 4 Server

>I'm currently developing an NT implementation using completion ports (no
>results yet), but nevertheless NT should be able to work without them at
>reasonable speed (or should it?).
>Does anyone have an idea how to explain the differences?

>Thanks

>Oliver Kraheck

Re:Different OS - Different Socket Speed?


Quote
"Patrick Shields" <pshie...@bbell.com> wrote in message

news:3a26612b.262304834@forums.borland.com...

Quote
> I have seen the same kind of results trying to test a VPN (virtual
> private network) , an NT machine was an order of magnitude slower than
> a win98 one. The guy from the service provider we were working with
> said he thought it was something to do with default packet sizes or
> something. Sorry I haven't had time to look into this any further, but
> will need to know sooner or later.

Well, he might've mentioned Maximum Transmission Unit (MTU size)?

But that shouldn't affect the situation when both server and client runs on
the same machine.

Neither should the Nagle algorithm? (where the tcp/ip stack waits around to
see if it can combine several smaller packets before sending it out on the
wire)

--
Rune

Other Threads