Re: overlapped vs. blocking throughput
- From: "PaulH" <paul.heil@xxxxxxxxx>
- Date: 4 Oct 2006 06:59:34 -0700
m wrote:
The time it takes for a call to WSASend is NOT analogous to the time
required to send that data over the network. The time for this call to
return will depend on the hardware & software environment in use but in
general is only the time required to copy / lock the buffer into kernel mode
and start doing something to send it.
Probably, the difference in times that you see is because the event is
signalled at some later stage after more work had been done. (all data sent
to the NIC driver maybe?)
In order to measure throughput, you will need to have establish a
steady-state system (to eliminate the effects of buffering) and either echo
the data back or do the analysis on the receiving side (to eliminate the
effects of clock skew)
"PaulH" <paul.heil@xxxxxxxxx> wrote in message
news:1159968335.505236.177790@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
m wrote:
BTW: GetTickCount is a bad way of measureing this - you should use
QueryPerformanceCounter
Notwithstanding this: why do you care?
"PaulH" <paul.heil@xxxxxxxxx> wrote in message
news:1159910959.733743.123050@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
For the same size data-block, why does this:
client()
{
/*...*/
WSASend(..., &SendOverlapped, 0);
DWORD dwTime = GetTickCount();
WSAWaitForMultipleEvents(1, &SendOverlapped.hEvent, FALSE,
WSA_INFINITE, FALSE);
TRACE(_T("Time: %d ms\n"), GetTickCount() - dwTime);
/*...*/
}
produce times around 800 ms, while this:
client()
{
/*...*/
DWORD dwTime = GetTickCount();
WSASend(...,NULL, 0);
TRACE(_T("Time: %d ms\n"), GetTickCount() - dwTime);
/*...*/
}
produces times around 140 ms? Does signaling an event really take that
much more time, or is something else going on?
Thanks,
-PaulH
I didn't know about the performance counter. Thanks! I care because I'm
measuring the time it takes to send a block of data to compute the
throughput.
-PaulH
Doing the analysis on the receiving side would actually be preferred, I
just didn't realize I could.
How do I establish a 'steady state system'?
Thanks,
PaulH
.
- References:
- overlapped vs. blocking throughput
- From: PaulH
- Re: overlapped vs. blocking throughput
- From: m
- Re: overlapped vs. blocking throughput
- From: PaulH
- Re: overlapped vs. blocking throughput
- From: m
- overlapped vs. blocking throughput
- Prev by Date: Re: overlapped vs. blocking throughput
- Next by Date: Re: overlapped vs. blocking throughput
- Previous by thread: Re: overlapped vs. blocking throughput
- Next by thread: Re: overlapped vs. blocking throughput
- Index(es):
Relevant Pages
|
|