My test rig: Intel Core 2 Duo, 4gb memory, Java 6
Test data: The KJV bible, 4834379 bytes, so 4.6 MB
The test starts up a server that consumes data, a client app that
pushes the text over, and optionally, the proxy is put in the middle.
There are three tests: no proxy, proxy, proxy with active script. All
tests are ran 5 times with the average over time, with a second
between tests and a second after the connection is made to when the
data starts coming across. Also, each test brings up the server and
brings it back down.
No proxy: 100ms 74ms 78ms 74ms
Proxy: 70ms 70ms 84ms 106ms
Script: 170ms 180ms 151ms 159ms
Out of interest, I ran the a test 5 times that just brought the server
up and down without sending any data through it, and it averaged 38ms
a run, so a good third or so of the times above are just bringing the
server up and down.
If you want to run the tests yourself, remove the underscore in line
50 in the AppIntegrationTest class and run from the command line 'mvn
clean test', assuming you have Java and Maven installed. The test
code can be browsed here:
http://code.google.com/p/twxproxy-ep/source/browse/trunk/twxbbs/src/test/java/org/twdata/twxbbs/AppIntegrationTest.java
The bottom line is even with an active script that is triggered
multiple times (it looks for the word "God"), the proxy can still
process roughly 72,322 kb/sec on an average desktop computer.
Considering a maxed out T3 connection can handle 44,736 kb/sec, let
alone the fact that TWGS can't pump out but a very, very small
fraction of that, I think we are pretty safe in saying the bottleneck
for speed will be somewhere else.
Don