Datasnap Performance Test – En

To facilitate the following link version in English


Based on the work of Mr. Roberto Schneiders. Blog

decided to develop new performance test of datasnap along the same lines:

Use Delphi since version 7 and perhaps not the best person to test from scratch, I decided to ask permission to Mr Roberto Schneiders and use their sources as the basis for a new study, after talking with him I got permission and started the work.

As he opens his work, also my beginning: “It’s not difficult to hear the wonders of the embarcadero delphi presentations”, both in launching its products as the Delphi conference where I had the pleasure of participating in a 2013 wish I could go in 2014 but it was not possible, given that our Radstudio XE7 brings us to our beloved Delphi 7 and would be a great satisfaction to be able to meet Mr Marco Cantu.

History and motivation

Playing with DataSnap with the intention of starting a new project, I see that it is a great product, both for those who use the Rad so as to lovers of classes, poo, orm, tested in the laboratory and it worked fine, but on the client, from day to day how it would work ?, 300 customers in various locations using entering data, creating products, creating ??? reports, as over two layers paradigm for the three layers using the delphi does best, centering routines and interoperability, designed with the team came to the conclusion: + Delphi DataSnap (Http + Rest + Json) thus enabling full interoperability (everyone today uses rest + json) and centralization of the routines, I’m not here to test the functionality datasnap vs other solutions but its performance and stability to an extreme situation possible, before numerous clients available today and in the future.

Now comes the point that concerned us the raw, actually when we put a simulation using 200 machines datasnap (via Amazon Aws virtualization) this time we tested the datasnap the XE version, the project was stopped and when he left the XE5 resumed the project (Delphi DataSnap Server + + Aurelius (orm) + Rest + json) with clients in Delphi VCL Delphi FireMonkey + + Android (java) + Ios (xcode), and python with web client, we developed the initial framework and the documentation but in the middle of the project hit the doubt as this one today datasnap ?, took the sources of initial tests of Mr Roberto and started testing then follows our report, “we tested the DataSnap technology in order to know what level of performance and stability it provides, and to see if it really meets our requirements. our main requirement was the ability of the server to manage many simultaneous connections, once the application is large and used by many users. ”



Our goal was to test the DataSnap REST API and answer some questions:

How it behaves in an environment with many simultaneous connections?
What is the performance in critical condition?
It is stable in critical condition? ”
To paraphrase the blog of Roberto

Hardware Used:

NoteBook Delll 15R 4670 SE 3rd generation i7 with 8GB of memory and 1TB hard. (Server)

NoteBook Dell 15R 4670 SE 3rd generation i7 with 8GB of memory 1 1TB disk (Client)

Softwares used:

In order to compare used:

  • Datasnap (delphi xe4, Xe5, XE6, XE7) (vlc, console, iis), (with and without keepalive keepalive)
    Mormot (component free for delphi versions XE4, XE5, XE6, XE7)
    Sparkle (Http Server for Delphi TMS to XE4XE5XE6XE7 versions)
    Wcf VisualStudio 2012
    Node.js (only one core)
    Lazarus using


Used for testing:


In order to document the entire process took screenshots of all the screens during the process:


As the tests carried out:




Trying to simulate a network environment using two test situations:

Server on the same computer and Jmeter

Server on different computers on a gigabit network and Jmeter

tests created a HelloWorld function in each application and return json object HelloWorld.

Following opinion:


4 Variables tested:


Number of requests per second

CPU usage during

As a percentage of failures

Memory consumption during

Error rate


Operationalize the test:

  • Thread 1 and 100000 requests
  • 50 Threads and 100000 requests
  • 100 Threads and 100000  Requests


1 thread and 100000 requests

In this test both Delphi and other tools worked well, without mistakes or miss communication but on the other delphi ranked below only the 32-bit XE6 using iis and XE7 worked within an expected number:

Requests (qty per second)

Memory consumption (in MegaBytes):

Until version Xe5 the memory management was committed and the XE6 XE7 apparently been solved:

Usage of Cpu


apparently the same in all cases, except in the use of consoles by datasnap

Errors (% error)

Only the tool lazarus presented problems

now starts to get interesting

50 thread and 100000 requests

Requests (qty per second):

Even not giving time to put the iis with XE7 realize that is at the same level, but of course stable but much lower than the same tools delphi world:

Use of memory (in MegaBytes):

In XE7 Mr Marco Cantu and team did a good job in this same level of the others:

Usage of Cpu


apparently the same in all cases, except in the use of consoles by datasnap and the console versions

Errors (% error)

Until version XE6 still had always exceptions but in version XE7 with keepalive not appeared more


100 thread and 100000 requests

Requests (qty per second):

Almost the same thing (XE7 observation iis not in this list because I lost screen test and it takes about 4 hours to finish, but believe me this a little lower than the XE6)

Use of memory (in MegaBytes):

Errors (% error)

Until version xe5 had many mistakes but did a good job:



Follow spreadsheet data




It is clear that after the entry of Mr Marco Cantu as our product manager delphi, the datasnap improved, but the performance of this very world itself delphi tools below, I am impressed with the performance of mormot and Tms Sparkle made ​​in delphi, putting Wcf and node.js (using only one core, knowing that perhaps putting multiple cores it should improve a lot) in third and fourth placings respectively, we need to improve the performance, but I’m worried about taking care embarcadero now EMS, will leave us in hand with the datasnap ?, can put it in the cloud to serve 1,000 customers with android, ios, mac, windows ??


All examples were compiled and servers in virtual machines with just the version of Delphi used in release mode and tested the server


for those who want to test the servers follow the link sources and executables and screenshot!1Q1ghJRL!VhO919dfzKOdPYVT0b-N-GBE5PadgtStzuHUEWmi94U