Re: Winsock Calls Overhead



You haven't told us how you're doing it. We have no way of knowing if
you've done it wrong.

There's no such thing as overlapped I/O in Windows CE, so that eliminates
that. My guess would be that non-blocking sockets will increase the CPU
load, since you'll be polling the socket for data, rather than just sleeping
until the data arrives. What's the problem with what you see there? You're
not using the entire processor. You seem to be able to send/receive at the
rate you want. What's the big deal?

Sending to the local socket should take more CPU. You're both sending and
receiving on the same machine, so you have to do twice as much work per
packet: send and receive. It appears that you are only sending in the other
case.

Paul T.

"Ravish" <Ravish@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:61300BB5-14A7-4730-BD0D-EF42D8A68893@xxxxxxxxxxxxxxxx
I am using a simple application that creates a scoket and sends UDP data on
a
WinCE 6.0 BSP on 250 MHz ARM. What was observed that for different data
rates, the measured CPU load turned out to be pretty much high as
mentioned
in the table below:

Desired | CPU load | CPU load
Throughput | (Stack Loopback) | (Send to a particular IP Address)
(Kbps) | (127.0.0.1) |
---------------------------------------------------------
10 | 10 % | 7 %
100 | 11 % | 7 %
400 | 18 % | 14 %
800 | 27 % | 23 %
1000 | 31 % | 27 %

I doubted the NDIS miniport implementation for taking so much of a CPU
load
in a send call but the Stack level loopback using IP address 127.0.0.1
(when
my NDIS Miniport send functions are not called) take much more CPU load.
In
there something wrong in the way I am sending and receiving packets in my
application or the miniport NDIS. We are targetting an applciaiton that
sends
A/V streams at constant bitrate (varying from 100Kbps - 1Mbps) UDP
packets.
We are using blocking socket calls and our concern is the CPU loading. The
Winsock stress tests also showed a 100 % CPU load all the time.

Will Overlapped IO, non blocking sockets will aid in lowering the CPU
utilization?
Why should a sendto() call for 127.0.0.1 should take so much of a CPU
load.

Thanks.


.