Skip to content

MySql 5.5 5.6 Ubuntu 12 'Precise'

BrianMc21 edited this page Apr 28, 2012 · 2 revisions

By BrianMc21: I am running tests on my machine to see how the MySQL on the new ubuntu version performed. The C version wouldn't use my password I will look into that later and get some benchmarks for the same set up to compare to the node.js modules. I will also install PHP as well so we have another comparison but for now it is just node.js.


Thanks to all the developers who made these modules.


MySQL 5.5

Author and module name Init Escapes Reconnects Inserts Selects
CPP-MySQL 0.00 5555555 8333 52631 -
db-mysql 0.088 781250 - 8251 144928
mysql 0.097 636537 - 7241 41667
mysql-libmysqlclient 0.108 1517451 4098 9833 227273
mysql-native 0.08 - - 7582 31250
        • Benchmarking CPP-MySQL:
        • Benchmark initialization time is 0.00s
        • 1000000 escapes in 0.18s (5555555/s)
        • 1000 sync reconnects in 0.12s (8333/s)
        • 10000 sync insertions in 0.19s (52631/s)
        • Benchmarking Sannis-node-mysql-libmysqlclient:
        • Benchmark initialization time is 0.108s
        • 1000000 escapes in 0.659s (1517451/s)
        • 1000 sync reconnects in 0.244s (4098/s)
        • 10000 sync insertions in 0.639s (15649/s)
        • 10000 async insertions in 1.017s (9833/s)
        • 20000 rows sync (fetchObject in loop) selected in 0.088s (227273/s)
        • 20000 rows async (fetchAll) selected in 0.079s (253165/s)
        • Benchmarking felixge-node-mysql:
        • Benchmark initialization time is 0.097s
        • 1000000 escapes in 1.571s (636537/s)
        • 10000 async insertions in 1.381s (7241/s)
        • 10000 rows async selected in 0.24s (41667/s)
        • The "sys" module is now called "util". It should have a similar interface.
        • Benchmarking sidorares-nodejs-mysql-native:
        • Benchmark initialization time is 0.08s
        • 10000 async insertions in 1.319s (7582/s)
        • 10000 rows async selected in 0.32s (31250/s)
        • Benchmarking mariano-node-db-mysql:
        • Benchmark initialization time is 0.088s
        • 1000000 escapes in 1.28s (781250/s)
        • 10000 async insertions in 1.212s (8251/s)
        • 10000 rows async (fetchAll) selected in 0.069s (144928/s)

  • INFO
  • MySql 5.6.5
  • Node.Js 0.6.15
  • OS Ubuntu 12.04
  • Intel Core 2 Quad 2.4 GHz Processor
  • Memory 4GB DDR2
  • AMD Radeon™ HD 6770... Nothing super fast so server grade hardware could improve performance.

Just rebooted, MySql 5.1 with infinidb engine, default parameters:

Author and module name Init Escapes Reconnects Inserts Selects
db-mysql 0.068 144928 - 11669 144928
mysql 0.063 696864 - 10718 32362
mysql-libmysqlclient 0.133 1406470 7634 14684 224719
mysql-native 0.045 - - 11173 30864

  • Benchmarking Sannis-node-mysql-libmysqlclient:
  • Benchmark initialization time is 0.133s
  • 1000000 escapes in 0.711s (1406470/s)
  • 1000 sync reconnects in 0.131s (7634/s)
  • 10000 sync insertions in 0.44s (22727/s)
  • 10000 async insertions in 0.681s (14684/s)
  • 20000 rows sync (fetchObject in loop) selected in 0.085s (235294/s)
  • 20000 rows async (fetchAll) selected in 0.089s (224719/s)

  • Benchmarking felixge-node-mysql:
  • Benchmark initialization time is 0.063s
  • 1000000 escapes in 1.435s (696864/s)
  • 10000 async insertions in 0.933s (10718/s)
  • 10000 rows async selected in 0.309s (32362/s)
  • The "sys" module is now called "util". It should have a similar interface.

  • Benchmarking sidorares-nodejs-mysql-native:
  • Benchmark initialization time is 0.045s
  • 10000 async insertions in 0.895s (11173/s)
  • 10000 rows async selected in 0.324s (30864/s)

  • Benchmarking mariano-node-db-mysql:
  • Benchmark initialization time is 0.068s
  • 1000000 escapes in 1.35s (740741/s)
  • 10000 async insertions in 0.857s (11669/s)
  • 10000 rows async (fetchAll) selected in 0.069s (144928/s)
  • All benchmarks finished

Default testing parameters, MySQL 5.6:

Author and module name Init Escapes Reconnects Inserts Selects
db-mysql 0.072 776398 - 7570 136986
mysql 0.059 680272 - 6297 31546
mysql-libmysqlclient 0.096 1416431 2075 8333 235294
mysql-native 0.071 - - 6676 29326

  • Benchmarking Sannis-node-mysql-libmysqlclient:
  • Benchmark initialization time is 0.096s
  • 1000000 escapes in 0.706s (1416431/s)
  • 1000 sync reconnects in 0.482s (2075/s)
  • 10000 sync insertions in 0.787s (12706/s)
  • 10000 async insertions in 1.2s (8333/s)
  • 20000 rows sync (fetchObject in loop) selected in 0.079s (253165/s)
  • 20000 rows async (fetchAll) selected in 0.085s (235294/s)

  • Benchmarking felixge-node-mysql:
  • Benchmark initialization time is 0.059s
  • 1000000 escapes in 1.47s (680272/s)
  • 10000 async insertions in 1.588s (6297/s)
  • 10000 rows async selected in 0.317s (31546/s)
  • The "sys" module is now called "util". It should have a similar interface.

  • Benchmarking sidorares-nodejs-mysql-native:
  • Benchmark initialization time is 0.071s
  • 10000 async insertions in 1.498s (6676/s)
  • 10000 rows async selected in 0.341s (29326/s)

  • Benchmarking mariano-node-db-mysql:
  • Benchmark initialization time is 0.072s
  • 1000000 escapes in 1.288s (776398/s)
  • 10000 async insertions in 1.321s (7570/s)
  • 10000 rows async (fetchAll) selected in 0.073s (136986/s)

This is a test with increased insertions/selects, MySQL 5.6

Author and module name Init Escapes Reconnects Inserts Selects
db-mysql 0.068 800000 - 7121 130548
mysql 0.078 634518 - 6367 36443
mysql-libmysqlclient 0.067 1501502 2101 8406 256410
mysql-native 0.072 - - 6655 27824

  • Benchmarking Sannis-node-mysql-libmysqlclient:
  • Benchmark initialization time is 0.067s
  • 1000000 escapes in 0.666s (1501502/s)
  • 3000 sync reconnects in 1.428s (2101/s)
  • 50000 sync insertions in 4.074s (12273/s)
  • 50000 async insertions in 5.948s (8406/s)
  • 100000 rows sync (fetchObject in loop) selected in 0.437s (228833/s)
  • 100000 rows async (fetchAll) selected in 0.39s (256410/s)

  • Benchmarking felixge-node-mysql:
  • Benchmark initialization time is 0.078s
  • 1000000 escapes in 1.576s (634518/s)
  • 50000 async insertions in 7.853s (6367/s)
  • 50000 rows async selected in 1.372s (36443/s)
  • The "sys" module is now called "util". It should have a similar interface.

  • Benchmarking sidorares-nodejs-mysql-native:
  • Benchmark initialization time is 0.072s
  • 50000 async insertions in 7.513s (6655/s)
  • 50000 rows async selected in 1.797s (27824/s)

  • Benchmarking mariano-node-db-mysql:
  • Benchmark initialization time is 0.068s
  • 1000000 escapes in 1.25s (800000/s)
  • 50000 async insertions in 7.021s (7121/s)
  • 50000 rows async (fetchAll) selected in 0.383s (130548/s)

All benchmarks finished

Clone this wiki locally