#1 2010-08-18 14:36:02

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 5,551
Website

Question about speed of the framework

yogiyang wrote:

Does this support encryption of data at engine level?
Can you give some speed statistics of inserting data, updating data, retrieving and populating UI controls, etc. ?

About our SQlite3 framework, encryption is at the engine level (more exactly at file access level), and speed statistic should be a bit faster than a standard SQLite3 engine, which is already very fast. The JSON/Client/Server layer is not relevant about speed. You can achieve more than 15000 queries per second on direct access,  4300 queries per second on HTTP/1.1 remote access:

 2.5. Client server access: 
  - TSQLite3HttpServer: 3 assertions passed
  - TSQLite3HttpClient: 3 assertions passed
  - Http client keep alive: 3001 assertions passed
     first in 7.94ms, done in 237.02ms i.e. 4219/s, average 237us
  - Http client multi connect: 3001 assertions passed
     first in 290us, done in 418.14ms i.e. 2391/s, average 418us
  - Named pipe access: 3003 assertions passed
     first in 78.29ms, done in 204.57ms i.e. 4888/s, average 204us
  - Local window messages: 3002 assertions passed
     first in 148us, done in 122.20ms i.e. 8182/s, average 122us
  - Direct in process access: 3001 assertions passed
     first in 68us, done in 68.32ms i.e. 14636/s, average 68us
  Total failed: 0 / 15014  - Client server access PASSED

This was benchmarked on a Notebook using a Centrino2 CPU. You can benchmark this by compiling the test application from the sources.
With Antivirus program ON (it's worth saying when it deals about benchmarking).

Offline

#2 2010-08-18 14:44:19

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 5,551
Website

Re: Question about speed of the framework

Note that the above speed test uses data already cached into its internal memory cache. The SQLite3 engine itself is not involved here, only the communication, JSON parsing, ORM mapping stuff.

Every request is performed 100 times, and each result contains 113 rows, for a total JSON size of 4803 bytes.

Offline

#3 2010-08-23 13:56:54

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 5,551
Website

Re: Question about speed of the framework

I've rewritten the HTTP/1.1 server part of the framework.

A Thread Pool has been added to speed up HTTP multi-connections: in previous implementation, a Thread was created for every incoming request. This was quite slow, because most time was done in Windows API, waiting for this thread to be created.
Now I've added a I/O completion Thread Pool in the SynCrtSock unit, which will handle most of the requests. 32 threads are ready to handle incoming requests.
This thread pool will be used to get the header and data from the Client, then will create a dedicated thread (i.e. create a THttpServerResp response thread) only if the incoming request was identified to be a valid HTTP/1.1 kept alive request.

Now multi connections are faster, as you can see:

2.5. Client server access:
  - TSQLite3HttpServer: 3 assertions passed
  - TSQLite3HttpClient: 3 assertions passed
  - Http client keep alive: 3001 assertions passed
     first in 7.87ms, done in 153.37ms i.e. 6520/s, average 153us
  - Http client multi connect: 3001 assertions passed
     first in 151us, done in 305.98ms i.e. 3268/s, average 305us
  - Named pipe access: 3003 assertions passed
     first in 78.67ms, done in 187.15ms i.e. 5343/s, average 187us
  - Local window messages: 3002 assertions passed
     first in 148us, done in 112.90ms i.e. 8857/s, average 112us
  - Direct in process access: 3001 assertions passed
     first in 44us, done in 41.69ms i.e. 23981/s, average 41us
  Total failed: 0 / 15014  - Client server access PASSED

Offline

Board footer

Powered by FluxBB