You are not logged in.
This new sample will be the new cross-platform and cross-compiler way to benchmark and validate our ORM with external data.
Some preliminary tests on Ubuntu, with our brand new SynDBPostgres unit:
Running tests using Synopse mORMot framework 1.18.5887, compiled with Free Pascal 3.1.1 64 bit, against SQLite 3.31.0, on Ubuntu 18.04.4 LTS - Linux 5.3.0-42-generic, at 2020-03-24 16:48:46.
Insertion speed
Direct Batch Trans Batch Trans
SynDBPostgres 1362 68393 5085 88671
Read speed
By one All Virtual All Direct
SynDBPostgres 5625 175463 349577
Nice numbers I guess!
Online
@ab -this is VM or host? What CPU? Can you run a pgbench just to have a relative numbers
// once for initialization
// pgbench postgresql://postgres:postgres@localhost:5432 -i
// and then test selection speed
// for prepared stmt
pgbench postgresql://postgres:postgres@localhost:5432 -c 4 -M prepared -T 4 -S
// and without prepare
pgbench postgresql://postgres:postgres@localhost:5432 -c 4 -M simple -T 4 -S
I fight 2-n day long with hosting where I rent a 12-Core-XeonE5 server for test. The shits they give me works 3 times slower when my laptop (I think they have problems with hypervosor)
Offline
@ab, the fossil and github synchronization problem still remains ... not in the commit then github
Offline
Thanks @ab
2.1. Postgresql:
- SynDBPostgres: 80,031 assertions passed 2.12s
5000 insert in 903.66ms i.e. 5,532/s, aver. 180us
5000 insert batch in 134.05ms i.e. 37,298/s, aver. 26us
5000 insert trans in 423.24ms i.e. 11,813/s, aver. 84us
5000 insert batch trans in 53.26ms i.e. 93,866/s, aver. 10us
5000 read one in 388.92ms i.e. 12,856/s, aver. 77us
5000 read virtual in 21.99ms i.e. 227,303/s, aver. 4us
5000 read direct in 10.02ms i.e. 498,902/s, aver. 2us
Total failed: 0 / 80,031 - Postgresql PASSED 2.13s
2.2. Zeos postgresql:
- ZeosPostgres: 80,031 assertions passed 2.67s
5000 insert in 836.90ms i.e. 5,974/s, aver. 167us
5000 insert batch in 35.29ms i.e. 141,667/s, aver. 7us
5000 insert trans in 388.70ms i.e. 12,863/s, aver. 77us
5000 insert batch trans in 34.84ms i.e. 143,513/s, aver. 6us
5000 read one in 462.50ms i.e. 10,810/s, aver. 92us
5000 read virtual in 22.67ms i.e. 220,526/s, aver. 4us
5000 read direct in 11.39ms i.e. 438,981/s, aver. 2us
Total failed: 0 / 80,031 - Zeos postgresql PASSED 2.69s
Generated with: Delphi XE5 32 bit compiler
last zeos with USE_SYNCOMMONS active
Offline
Small fix (@ab - it strange how you can compile w/o this changes on FPC/Linux, at last I got an error) https://github.com/synopse/mORMot/pull/294
Please, add a reference PerfTestConsole.ini file into git just to know what t wrote there
There is AV in case ini file if missing (actually when PG password is wrong
20200324 18560400 ! + PerfTestCases.TTestPostgresql(7ff84798d400).SynDBPostgres
20200324 18560400 ! + SynDBPostgres.TSQLDBPostgresConnection(7ff847a2aa40).Connect
20200324 18560400 ! EXC ESQLDBPostgres {"Message":"Connection to database postgres failed [FATAL: password authentication failed for user \"postgres\"\n]"} [] at $000000000074902D CONNECT, l
20200324 18560403 ! ERROR SynDBPostgres.TSQLDBPostgresConnection(7ff847a2aa40) Connect: {"ESQLDBPostgres(7ff84798cd00)":{"Message":"Connection to database postgres failed [FATAL: password authenti
20200324 18560403 ! - 00.043.138
20200324 18560403 ! EXCOS EAccessViolation (41c451) [] at $000000000057354A METHODCLEANUP, line 282 of PerfTestCases.pas $000000000064784D RUN, line 1035 of ../../../SynTests.pas $00000000006488E8
20200324 18560404 ! - 00.067.859
20200324 18560404 ! EXCOS EAccessViolation (41c451) [] at $00000000005757FF SAVESTATS, line 803 of PerfTestCases.pas $00000000005756EE DESTROY, line 717 of PerfTestCases.pas
Last edited by mpv (2020-03-24 19:08:15)
Offline
Running tests using Synopse mORMot framework 1.18.5894, compiled with Free Pascal 3.1.1 64 bit, against SQLite 3.31.0, on Ubuntu 18.04.4 LTS - Linux 5.3.0-42-generic, at 2020-03-24 20:26:53.
Insertion speed (rows/second)
Direct Batch Trans Batch Trans
SynDBPostgres 1372 80652 5155 92843
Zeos postgres 1484 91195 5460 94435
Read speed (rows/second)
By one All Virtual All Direct
SynDBPostgres 5602 174923 350951
Zeos postgres 4197 161885 292500
So I confirm reading is faster with SynDBPostgres and writing faster with SynDBZeos...
Online
All available tests: https://gist.github.com/synopse/53601e7 … a4e771d270
(please do not put numbers in the forum thread, but use gists as I did)
@mpv
I think I have corrected now what was missing.
Online
My previous benchmarks were with logs enabled.
A lot of logs in fact - around 100MB.
Here are the new numbers with logs disabled:
https://gist.github.com/synopse/d2be310 … ea34f5bf1e
In practice, numbers are almost the same.
Meaning that a log of log doesn't impact the business... good to know!
Worth noting that AES encryption has almost no impact about performance.
Thanks to our AES-NI hardware accelerated SynCrypto library, for sure!
Note that I have a very fast SSD (3GB/s burst).
Online