Re: Something like "ping" for windows messages.
- From: "Peter Smithson" <Peter_Smithson@xxxxxxxxxxx>
- Date: 10 Dec 2006 01:35:05 -0800
Joseph M. Newcomer wrote:
As I understand it, the WM_TIMER messages are simulating a multithreaded system by acting
like scheduler events, or something similar.
That's right. Unfortunatley, re-coding this is way out of scope for
this project. It would be quite a bit of work - as you mention. I
have a feeling that the main function of the server is not very
efficient (that's being kind). I just don't want to make it noticably
worse.
My essay on "Optimization--Your Worst Enemy" says "Optimization doesn't matter until it
matters. Then it matters a lot". You seem to have hit the "it matters a lot" criterion.
The bottom line is that from reception to completion, you seem to be having a 10-second
delay. Now, that's clearly bad (Google responds in a few hundred milliseconds).
That was just an example of what I might find - I've not tried it yet.
I'm pretty sure it's no where near that delay. A 10 second delay was
just an example of what I could find - if I had that then I thought I'd
know that I was in trouble.
I did a real "finger in the air" test by just using the product while
the http server was being hammered and it didn't seem too bad. Instead
of taking much less than a second to get a value from my controller, it
took maybe half a second. So it's not disasterous.
I've tried out my "ping" programme on Visual Studio. Even when it's
doing a build, I get response times in small fractions of a second.
I've not had chance to try it out on the real app yet (not been to work
since Thursday).
Have you ever used "ping" to get an idea of how your network is doing?
I realise there are complications with message priorities etc. with my
hair brained scheme but I've found ping usefull and my idea was to try
and emulate it in some way. ping only works over short periods and is
undoubtedly not a proper "benchmark" but a rough guide to how things
are. That's what I'm aiming for.
I/O Completion ports are a cool queueing architecture, because you can use multiple
threads to service them. You can also have multiple producer threads generating requests.
I read up on them once when emulating some MPE system calls (used to
work on migration) but I never found an excuse to use them - shame.
I also read up on the various ways of implementing a server.
Interesting to read that a thread/connection type server is "a bad
thing". Apparently it doesn't scale past roughly 20 connections I
read. Presumably that assumes that each connection is sending a lot of
traffic and doesn't involve long (several seconds) periods where
nothing is happening. i.e. there's a lot of switching between threads.
Surprised they can generalise this figure.
Cheers.
Peter.
.
- Follow-Ups:
- Re: Something like "ping" for windows messages.
- From: Joseph M . Newcomer
- Re: Something like "ping" for windows messages.
- References:
- Something like "ping" for windows messages.
- From: Peter Smithson
- Re: Something like "ping" for windows messages.
- From: Joseph M . Newcomer
- Re: Something like "ping" for windows messages.
- From: Peter Smithson
- Re: Something like "ping" for windows messages.
- From: Joseph M . Newcomer
- Something like "ping" for windows messages.
- Prev by Date: Re: Something like "ping" for windows messages.
- Next by Date: Re: Something like "ping" for windows messages.
- Previous by thread: Re: Something like "ping" for windows messages.
- Next by thread: Re: Something like "ping" for windows messages.
- Index(es):
Relevant Pages
|