Examples Expected Behavior

Apr 20, 2009 at 11:33 PM
What is the expected behavior of the sample applications? This is what I get:

Event Ping Pong
Push "Publishing events" -> Number of Roundtrips is empty, Roundtrips per Second is 0
Push "Subscribing to events" 

Total time was: 0.6718664 seconds
1488.3911444299 events per second

Overall time was: 0.9999872 seconds
1000.01280016384 events per second

0 events per second  --  Number of iterations = 0
Apr 20, 2009 at 11:43 PM
With PingPong, start two PingPong windows. Start listening on one instance and then start publishing on the other instance.

For the other two samples, start the WspEventListenTest. In another command window, execute however many events you want on however many threads you want. Like, "WspEventServiceTest 10 10000". It should show you how long it took to publish 10000 events for each of the 10 threads and then the total number. On the listening sample, you should see how many events it's processing per second.
Dec 15, 2009 at 9:30 PM

Is there anything special I need to do to have one publisher PingPong running on one computer and a subscriber on another (e.g. VM)?

Dec 15, 2009 at 10:31 PM

I think you will need to rebuild the sample. I think the line of code which does the subscription specifies "local only" as true. You would need to change it to false and rebuild. Then start one listener on one machine and as many publishers on one or more machines

BTW, this assumes you have started the wsp event router on the various machines and have them configured together. Meaning, make one the parent and specify on all other machines that one as their parent.

Dec 17, 2009 at 1:12 AM

Ok, I tweaked it a bit to get rid of the service requirement AND now have one Ping Pong running on my VM and one on my dev box (I initally had Out of Memory Errors on my VM for the initial Queue size).

The strange thing was that for the first minute or so, the performance was horrible, something like 1-3 roundtrips per second.  But after a minute or two, it speeds up dramatically  to about 500 round trips per second.  Is there any area I should look at to make sure the first  few minutes to be as fast as later on?

Dec 17, 2009 at 1:34 AM

It's just bad coding on my part. I am updating a UI property from a non-ui thread. But I really don't care to fix it.

If you want to see real perf, use the other two samples. You need to change the subscription on the listener sample so local only is false. You should get probably 6000 / second between machine

If you look at the perf counters, you will see two for wsp... This will show you the internal queues.

Dec 21, 2009 at 10:06 PM

FWIW - I got these results this (I will now do it on separate boxes) (just using the Debug / Run Instance command):

Total time was: 0.067 seconds
14925.3731343284 events per second

Overall time was: 1.001 seconds
999.000999000999 events per second

 Although I did make some changes to the codebase: 1) PerformanceCounter is a custom implementation that only records a sample piece of data (e.g. 1 out of 50 or 100), 2) Router was taken out as a windows service and moved to a class to call on a separate thread, and 3) The C code was changed to use Local\\ rather than Global\\.  These changes allowed me to not have to install the service, and also not run in Administrator mode on a Win2k8 or Vista box.