DataSnap XE3 concurrency problems and Update1

If you know DataSnap, probably you know the famous post by Roberto Schneiders about its stability problems (http://robertocschneiders.wordpress.com/2012/11/22/datasnap-analysis-based-on-speed-stability-tests/).

Now, after some (right) dust cloud, in the Update 1 Embarcadero fixed some bugs.

I still haven’t the time to do an heavy test but the first “fast-and-dirty” test give some results, and I’d like to share my little tests.

I created a simple “DataSnap REST Application” as a VCL Application.

Start a little test with ApacheBenchmark (you can find it in the Apache HTTPD installation directory).

Run the test… and, exception at the 32° connections, just as before the update. However this is not a “bug”, it is simply a problem related to the default wizard configuration.

So I changed the MaxConnection to 1024. This number is very high (for a simple PC) but I’m interested in the concurrency problems, so I’ve to push the concurrency far enough to che the Update 1 Fixes.

Max Connections
Max Connections

 

Also, I’ve disabled the session with a little change in the “EchoString” method (as suggested by Marco Cantù in his blog post about DataSnap problems).

Closing the session
Closing the session

 

Now the test results are good. As I said, my objective is not to check the performance or other problems arised from the Roberto tests. My test is just about the concurrency problems (IMHO the biggest one) and the related crash.

Here the Apache Benchmark tests with 100000 requests with 100 concurrent connections.

D:wampbinapacheapache2.2.22bin>ab -v 1 -n 100000 -c100 http://127.0.0.1:8080/datasnap/rest/TServerMethods1/EchoString/Daniele
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Completed 100000 requests
Finished 100000 requests

Server Software:
Server Hostname:        127.0.0.1
Server Port:            8080

Document Path:          /datasnap/rest/TServerMethods1/EchoString/Daniele
Document Length:        22 bytes

Concurrency Level:      100
Time taken for tests:   465.320 seconds
Complete requests:      100000
Failed requests:        0
Write errors:           0
Total transferred:      18966732 bytes
HTML transferred:       2200000 bytes
Requests per second:    214.91 [#/sec] (mean)
Time per request:       465.320 [ms] (mean)
Time per request:       4.653 [ms] (mean, across all concurrent requests)
Transfer rate:          39.81 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    1  11.8      0     529
Processing:     2  464 230.4    500    2041
Waiting:        1  457 216.6    499    1922
Total:          2  465 230.8    501    2041

Percentage of the requests served within a certain time (ms)
  50%    501
  66%    565
  75%    609
  80%    637
  90%    699
  95%    769
  98%   1008
  99%   1039
 100%   2041 (longest request)

I certainly will do other tests, however this fast-and-dirty test gave me a good impression.

More to come.

5 thoughts on “DataSnap XE3 concurrency problems and Update1

  1. Unless the string reversed was huge (which it doesn’t seem to be according to volumes) these timings are definitely not good, for a such a simple test you should be in the tens of thousandths of requests per second.

    Also do I interpret you figures wrong or did half the requests take more than 500 ms to be served from a server on the same machine (so zero network lag), with 2% taking more than 1 sec?

  2. Thanks for sharing the results of your tests.

    I noticed significant differences between the Apache Bench and JMeter. In my tests Apache Bench could not crash the server. I do not know why.

    If you do more tests, I suggest testing using JMeter. It would be interesting to know if you will obtain the same results I got.

    I’m currently working on tests using XE3 Update 1. I’ll post the results soon

  3. Hi Roberto. Apache Benchmark used to crash the server with only 2 concurrent connections before Upd1. I’ve already did the tests whitout the upd1 and were really bad. I didn’t tried with JMeter, but I could.

    Let me know if you need some others info for your tests.

  4. Hi Roberto. Apache Benchmark used to crash the server with only 2 concurrent connections before Upd1. I’ve already did the tests whitout the upd1 and were really bad. I didn’t tried with JMeter, but I could.

    Let me know if you need some others info for your tests.

Comments are closed.