#1 2012-07-25 11:40:54

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 12,637
Website

Synopse mORMot benchmark

The following table try to sum up all available possibilities, and give some benchmark (average rows/seconds for writing or read). In this table, 'internal' means use of the internal SQLite3 engine, 'external' stands for an external access via SynDB, and 'TObjectList' indicates a TSQLRestServerFullMemory instance, either static (with no SQL support) or virtual (i.e. SQL featured via SQLite3 virtual table mechanism) which may persist the data as JSON or compressed binary. ACID is an acronym for "Atomicity Consistency Isolation Durability" properties, which guarantee that database transactions are processed reliably: for instance, in case of a power loss or hardware failure, the data will be saved on disk in a consistent way, with no potential loss of data.

Forum thread for comments and feedback about http://blog.synopse.info/post/2012/07/2 … -benchmark

Offline

#2 2012-07-25 13:42:23

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,213
Website

Re: Synopse mORMot benchmark

I add my 5 cents to this benchmark.
1) For MS SQL result is: Write one - 340; Write trans - 318; Write batch - 337; Read one - 641; Read all - 91972;
2) But the main as for me begin if we test mORMot it true client-mORMot-dbatabase model (I mean remote client and mORMot server in HTTP mode. server thread count = CPU count*2):
3) We got linear scale. If 1 client send (in my example) 1000 "read all" requests and got 1000 response it take 3 sec. 2 client in one time - also 3 sec. 3 client in one time - also about 3 sec. And it's true until number of client <= number of thread. GREAT RESULT!
4) I asked my colleague to write .NET client to mORMot server and run it in DOS(denial of service) mode - 8 threads each with unlimited circle of "send request to mOROMot -> got result (100 record) -> write result into file "as is" - without parse". As result we have two same computer - one run mORMot server (database is oracle, no cache) - another - .NET DOS client. When .NET became 100% of processor time load, mORMot is 7% load and fill very good smile And it COOL!
5) I love mORMot. Arnaud the best!

Offline

#3 2012-07-25 15:45:31

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 12,637
Website

Re: Synopse mORMot benchmark

I like very much the CPU load remark: on the client side, without parsing the JSON, .Net uses 100% of processor load, whereas mORMot server is still at 7%. Not bad, indeed, but not surprising either!

BULK insert would speed up a lot MS SQL process.
But perhaps I'll add it at ODBC level, when ODBC will be finished. AFAIK there is no generic BULK mode in OleDB (it is specific to each provider), whereas ODBC allows array binding, just like the Oracle Client.

Just one question, where I need feedback.
About the SQLite3 engine, when the "synchronous" mode is set to the default FULL mode, it reaches only 10 inserts per second when inserted outside a transaction.
When set to OFF mode, it inserts at more than 400 objects per second (comparable to Oracle).
Official SQLite3 documentation states in http://www.sqlite.org/pragma.html#pragma_synchronous that OFF is less safe, but still ACID when the power does not fail.
According to you, should OFF be the default mode for mORMot and the SynDB classes? I'm very tempted to think so.

Offline

#4 2012-07-26 09:33:11

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,213
Website

Re: Synopse mORMot benchmark

I think it depend of system type we develop. In my systems even small chance of data lost or database corruption is ABSOLUTELY IMPOSSIBLE. So for me preferred mode is FULL, even if I lost in productivity. For other system type it is not true. So my opinion - let developer decide in which mode mOROMot work.

Offline

#5 2012-07-26 16:25:27

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 12,637
Website

Re: Synopse mORMot benchmark

Thanks for the feedback.

By default, the safe and slow truly ACID behavior will be used on mORMot, and could be optionally changed.
See http://blog.synopse.info/post/2012/07/26/ACID-and-speed about benchmark and the new Synchronous property.

Offline

Board footer

Powered by FluxBB