Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Client/Server

0 views
Skip to first unread message

Srecko

unread,
Nov 29, 2001, 2:45:37 AM11/29/01
to
Hi,
I made a client/server application for transfering data over TCP/IP.
What is max. speed for that communication. When I made my server on
localhost the speed was 1.3Mbit. Should it be bigger?

Srecko

Nera

unread,
Nov 29, 2001, 6:00:57 AM11/29/01
to
Hi,

The speed depends on many factors, like the underlying media of your
network, the network card etc.

Nera

"Srecko" <srecko.t...@esf.ericsson.se> wrote in message
news:3C05E7A1...@esf.ericsson.se...

Srecko

unread,
Nov 29, 2001, 6:27:35 AM11/29/01
to
Hi,
I tested it on mu computer without being connected to the network, server
and client are on the same computer, what speed should I expect in that
configuration?! But let say it is LAN with 10/100Mb cards connected with
Hubs. What is average speed on that kind of equipment?
Thank you.

Srecko

Jim Killian

unread,
Nov 29, 2001, 1:54:50 PM11/29/01
to
Srecko <srecko.t...@esf.ericsson.se> wrote in
news:3C061BA7...@esf.ericsson.se:

Testing your app for communications speed while NOT connected to the
network is meaningless! It's like asking how far can I travel while
running in-place.

What you WILL do is eliminate network latency issues from your app, and
thus can be useful in determining its efficiency from a local processing
perspective (cpu utilization, i/o, etc.).

When it comes to network communications, TCP/IP has no inherent
limitations, but there are 1001 external factors that can affect
communications performance. Consider the simple fact of hub vs. switch --
most SOHO setups use a hub (it's cheap), but a hub is only half-duplex
(even w/ 100mbps, you still can't send and receive at the same time), not
to mention that a hub uses a round-robin technique to locate the target
(i.e., other machines are hit in the process - this is why large networks
are often broken-up into subnets). For these reasons, businesses turn to
switches ($$$), which are typically full-duplex (send and receive
simultaneously), AND connect directly to the target.

Of course, the amount of traffic (i.e., likelihood of collisions), distance
between client and hub/switch (might need repeaters), physical limits of
cabling, RF interference, etc., all play a factor.

-- Jim

Jarmo Muukka

unread,
Nov 29, 2001, 4:27:25 PM11/29/01
to
I did some testing with my discard server (port 9). I managed to
get from 4975 to 6506 KB/s (one K being 1000 bytes). So this is
about 13 MB/s total (send from client + receive in server). I
transferred 1, 2, 5, 20 and 50 MB buffers. Server had 10000 byte
buffer. I sent the data to localhost. Does it go through the
network card? I don't think so. Numbers say so.

Whan I changed the internal sizes of socket's receive and send
buffers to zero in the client and in the server, the performance
was a bit better. 7082 KB/s being the best result.

Next I tested how it performs when I sent from one network card to
another. I have 10/100 PCI card and 10 ISA card in my computer. To
my surprise the speed was about 6000 KB/s. It looks like that it
does not use cards. I have to test this at work tomorrow where we
have more than one computer on 100 Mbit/s network.

I have implemented this discard server with I/O Completion Port
technique. It's work in progress. This proves that IOCP is quite
good. It has capacity to perform well. Network card seems to be
the bottleneck and obvioulsy the hard disk.

I have Pentium Pro 200 MHz and Windows 2000 Pro.

--
JMu

"Srecko" <srecko.t...@esf.ericsson.se> wrote in message
news:3C05E7A1...@esf.ericsson.se...

Jarmo Muukka

unread,
Dec 2, 2001, 3:00:04 PM12/2/01
to
I tested my discard server and client at work using two computers
(client being Windows NT 4 and server being Windows 2000) and I
got about 7000 KB/s. Then I ran 10 clients at the same time and
worst transfer rate was about 1000 KB/s. Then I ran 10 clients in
one computer and 5 on another and server's worst transfer rate was
about 850 KB/s IIRC. 15*850 KB/s = 12750 KB/s. If capasity of one
network card is 100 Mbit/s it's 12500 KB/s, so I managed to use
about the whole capasity of network card. We have 100 Mbit/s
switch (no hubs on the net).

BTW, is 100 Mbit/s 100 * 1024 * 1024 / 8 bytes or 100 * 1000 *
1000 / 8 bytes?

Then to IOCP. I made a stupid comment that "This proves that IOCP
is quite good." My test case didn't prove that. The same can be
achieved with blocking calls if there are small number of threads
(one thread per client). But, IOCP is very good technology,
because it does not require a lots of threads. A lots of threads
uses a lots of resources and CPU. My IOCP used just one thread.
When there are thousands of clients, IOCP shows its fingers.

--
JMu

"Jarmo Muukka" <jarmo.muukka@helsoftreplacewithdotfi> wrote in
message news:1LxN7.541$Yd6....@read2.inet.fi...

Alex Fraser

unread,
Dec 2, 2001, 5:32:34 PM12/2/01
to
"Jarmo Muukka" <jarmo.muukka@helsoftreplacewithdotfi> wrote in message
news:8LvO7.200$lu3....@read2.inet.fi...

> BTW, is 100 Mbit/s 100 * 1024 * 1024 / 8 bytes or 100 * 1000 *
> 1000 / 8 bytes?

The latter, AFAIK (and it makes sense based on the performance figures you
gave).

Bits and bitrates tend to be 10^3, 10^6 etc, and bytes and byte-rates tend
to be 2^10, 2^20 etc. Except (in the latter case) with hard drives, where
they are just trying to con you :). 137GB ATA limit... puhleeease.

As for why... I'd guess it's a comms thing.

Alex


Srecko

unread,
Dec 3, 2001, 3:11:28 AM12/3/01
to

Thank you Jarmo. I have tested it with one client and one server. Put
buffer 5k and speed over local host was 30MBytes (not Mbits) in average,
on 10k buffer it was 45MB, I was very surprised. Now I want to make a
server which can handle a lot of clients.
I will use select. What is the max. number of clients tha can be
connected to the server i.e. what is max. number for FD_SETSIZE (or
something like that) constant which is used for the size of the set. I
heard that the max. number of open handles is 1024?!

Srecko

Jarmo Muukka

unread,
Dec 3, 2001, 3:29:12 PM12/3/01
to
The maximum number of open handles is as much as there are memory,
at least on Windows NT based OS's, but Windows 95 series might be
more limited, I don't remember. There is a good wep page somewhere
which describes this.

I have never used select.

It looks like that you have more modern computer than I have.
Anyway, I'm satisfied with mine.

--
JMu

"Srecko" <srecko.t...@esf.ericsson.se> wrote in message

news:3C0B33B0...@esf.ericsson.se...

0 new messages