Skip to content

Instantly share code, notes, and snippets.

@headius
Last active June 18, 2022 12:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save headius/8bbe2baf04503cce31e356c4a7138816 to your computer and use it in GitHub Desktop.
Save headius/8bbe2baf04503cce31e356c4a7138816 to your computer and use it in GitHub Desktop.

jruby indy java 17 20 threads, heap settles around 2.2GB

[] ~/projects/activerecord-jdbc-adapter $ siege --time=1M http://0.0.0.0:3000/posts/1 > /dev/null
** SIEGE 4.1.1
** Preparing 25 concurrent users for battle.
The server is now under siege...

Lifting the server siege...
Transactions:		       74996 hits
Availability:		      100.00 %
Elapsed time:		       59.13 secs
Data transferred:	      149.72 MB
Response time:		        0.02 secs
Transaction rate:	     1268.32 trans/sec
Throughput:		        2.53 MB/sec
Concurrency:		       24.89
Successful transactions:       24980
Failed transactions:	           0
Longest transaction:	        0.17
Shortest transaction:	        0.00
 

[] ~/projects/activerecord-jdbc-adapter $ siege --time=1M http://0.0.0.0:3000/posts/1 > /dev/null
** SIEGE 4.1.1
** Preparing 25 concurrent users for battle.
The server is now under siege...

Lifting the server siege...
Transactions:		      181418 hits
Availability:		      100.00 %
Elapsed time:		       59.26 secs
Data transferred:	      362.19 MB
Response time:		        0.01 secs
Transaction rate:	     3061.39 trans/sec
Throughput:		        6.11 MB/sec
Concurrency:		       24.78
Successful transactions:       60428
Failed transactions:	           0
Longest transaction:	        0.07
Shortest transaction:	        0.00
 

[] ~/projects/activerecord-jdbc-adapter $ siege --time=1M http://0.0.0.0:3000/posts/1 > /dev/null
** SIEGE 4.1.1
** Preparing 25 concurrent users for battle.
The server is now under siege...

Lifting the server siege...
Transactions:		      189178 hits
Availability:		      100.00 %
Elapsed time:		       59.09 secs
Data transferred:	      377.67 MB
Response time:		        0.01 secs
Transaction rate:	     3201.52 trans/sec
Throughput:		        6.39 MB/sec
Concurrency:		       24.76
Successful transactions:       63003
Failed transactions:	           0
Longest transaction:	        0.05
Shortest transaction:	        0.00
 

[] ~/projects/activerecord-jdbc-adapter $ siege --time=1M http://0.0.0.0:3000/posts/1 > /dev/null
** SIEGE 4.1.1
** Preparing 25 concurrent users for battle.
The server is now under siege...

Lifting the server siege...
Transactions:		      181860 hits
Availability:		      100.00 %
Elapsed time:		       59.97 secs
Data transferred:	      363.06 MB
Response time:		        0.01 secs
Transaction rate:	     3032.52 trans/sec
Throughput:		        6.05 MB/sec
Concurrency:		       24.76
Successful transactions:       60567
Failed transactions:	           0
Longest transaction:	        0.05
Shortest transaction:	        0.00
 

[] ~/projects/activerecord-jdbc-adapter $ siege --time=1M http://0.0.0.0:3000/posts/1 > /dev/null
** SIEGE 4.1.1
** Preparing 25 concurrent users for battle.
The server is now under siege...

Lifting the server siege...
Transactions:		      190898 hits
Availability:		      100.00 %
Elapsed time:		       59.40 secs
Data transferred:	      381.12 MB
Response time:		        0.01 secs
Transaction rate:	     3213.77 trans/sec
Throughput:		        6.42 MB/sec
Concurrency:		       24.76
Successful transactions:       63592
Failed transactions:	           0
Longest transaction:	        0.05
Shortest transaction:	        0.00

[] ~/projects/activerecord-jdbc-adapter $ siege --time=1M http://0.0.0.0:3000/posts/1 > /dev/null
** SIEGE 4.1.1
** Preparing 25 concurrent users for battle.
The server is now under siege...

Lifting the server siege...
Transactions:		      210264 hits
Availability:		      100.00 %
Elapsed time:		       59.42 secs
Data transferred:	      419.78 MB
Response time:		        0.01 secs
Transaction rate:	     3538.61 trans/sec
Throughput:		        7.06 MB/sec
Concurrency:		       24.76
Successful transactions:       70042
Failed transactions:	           0
Longest transaction:	        0.04
Shortest transaction:	        0.00

jruby 250MB heap, still G1 heap around 1.1GB

[] ~/projects/activerecord-jdbc-adapter $ siege --time=1M http://0.0.0.0:3000/posts/1 > /dev/null
** SIEGE 4.1.1
** Preparing 25 concurrent users for battle.
The server is now under siege...

Lifting the server siege...
Transactions:		       43974 hits
Availability:		      100.00 %
Elapsed time:		       59.27 secs
Data transferred:	       87.79 MB
Response time:		        0.03 secs
Transaction rate:	      741.93 trans/sec
Throughput:		        1.48 MB/sec
Concurrency:		       24.92
Successful transactions:       14650
Failed transactions:	           0
Longest transaction:	        1.05
Shortest transaction:	        0.00
 

[] ~/projects/activerecord-jdbc-adapter $ siege --time=1M http://0.0.0.0:3000/posts/1 > /dev/null
** SIEGE 4.1.1
** Preparing 25 concurrent users for battle.
The server is now under siege...

Lifting the server siege...
Transactions:		      121258 hits
Availability:		      100.00 %
Elapsed time:		       59.09 secs
Data transferred:	      242.09 MB
Response time:		        0.01 secs
Transaction rate:	     2052.09 trans/sec
Throughput:		        4.10 MB/sec
Concurrency:		       24.84
Successful transactions:       40392
Failed transactions:	           0
Longest transaction:	        0.09
Shortest transaction:	        0.00
 

[] ~/projects/activerecord-jdbc-adapter $ siege --time=1M http://0.0.0.0:3000/posts/1 > /dev/null
** SIEGE 4.1.1
** Preparing 25 concurrent users for battle.
The server is now under siege...

Lifting the server siege...
Transactions:		      135830 hits
Availability:		      100.00 %
Elapsed time:		       59.57 secs
Data transferred:	      271.18 MB
Response time:		        0.01 secs
Transaction rate:	     2280.17 trans/sec
Throughput:		        4.55 MB/sec
Concurrency:		       24.81
Successful transactions:       45246
Failed transactions:	           0
Longest transaction:	        0.07
Shortest transaction:	        0.00

jruby 250MB heap, parallel GC, heap around 900MB

[] ~/projects/activerecord-jdbc-adapter $ siege --time=1M http://0.0.0.0:3000/posts/1 > /dev/null
** SIEGE 4.1.1
** Preparing 25 concurrent users for battle.
The server is now under siege...

Lifting the server siege...
Transactions:		       52613 hits
Availability:		      100.00 %
Elapsed time:		       59.89 secs
Data transferred:	      105.04 MB
Response time:		        0.03 secs
Transaction rate:	      878.49 trans/sec
Throughput:		        1.75 MB/sec
Concurrency:		       24.91
Successful transactions:       17527
Failed transactions:	           0
Longest transaction:	        0.88
Shortest transaction:	        0.00
 

[] ~/projects/activerecord-jdbc-adapter $ siege --time=1M http://0.0.0.0:3000/posts/1 > /dev/null
** SIEGE 4.1.1
** Preparing 25 concurrent users for battle.
The server is now under siege...

Lifting the server siege...
Transactions:		      187751 hits
Availability:		      100.00 %
Elapsed time:		       59.27 secs
Data transferred:	      374.83 MB
Response time:		        0.01 secs
Transaction rate:	     3167.72 trans/sec
Throughput:		        6.32 MB/sec
Concurrency:		       24.76
Successful transactions:       62537
Failed transactions:	           0
Longest transaction:	        0.19
Shortest transaction:	        0.00
 

[] ~/projects/activerecord-jdbc-adapter $ siege --time=1M http://0.0.0.0:3000/posts/1 > /dev/null
** SIEGE 4.1.1
** Preparing 25 concurrent users for battle.
The server is now under siege...

Lifting the server siege...
Transactions:		      202011 hits
Availability:		      100.00 %
Elapsed time:		       59.68 secs
Data transferred:	      403.30 MB
Response time:		        0.01 secs
Transaction rate:	     3384.90 trans/sec
Throughput:		        6.76 MB/sec
Concurrency:		       24.73
Successful transactions:       67287
Failed transactions:	           0
Longest transaction:	        0.06
Shortest transaction:	        0.00
 

[] ~/projects/activerecord-jdbc-adapter $ siege --time=1M http://0.0.0.0:3000/posts/1 > /dev/null
** SIEGE 4.1.1
** Preparing 25 concurrent users for battle.
The server is now under siege...

Lifting the server siege...
Transactions:		      210758 hits
Availability:		      100.00 %
Elapsed time:		       59.11 secs
Data transferred:	      420.75 MB
Response time:		        0.01 secs
Transaction rate:	     3565.52 trans/sec
Throughput:		        7.12 MB/sec
Concurrency:		       24.72
Successful transactions:       70189
Failed transactions:	           0
Longest transaction:	        0.04
Shortest transaction:	        0.00

cruby 3.1 10 workers 2 threads each, avg memory per worker 98MB

[] ~/projects/activerecord-jdbc-adapter $ siege --time=1M http://0.0.0.0:3000/posts/1 > /dev/null
** SIEGE 4.1.1
** Preparing 25 concurrent users for battle.
The server is now under siege...

Lifting the server siege...
Transactions:		      172817 hits
Availability:		      100.00 %
Elapsed time:		       59.04 secs
Data transferred:	      345.01 MB
Response time:		        0.01 secs
Transaction rate:	     2927.12 trans/sec
Throughput:		        5.84 MB/sec
Concurrency:		       24.81
Successful transactions:       57560
Failed transactions:	           0
Longest transaction:	        0.07
Shortest transaction:	        0.00

cruby 3.1 20 workers 5 threads each, avg memory per worker 102MB

[] ~/projects/activerecord-jdbc-adapter $ siege --time=1M -c 100 http://0.0.0.0:3000/posts/1 > /dev/null
** SIEGE 4.1.1
** Preparing 100 concurrent users for battle.
The server is now under siege...

Lifting the server siege...
Transactions:		      167446 hits
Availability:		      100.00 %
Elapsed time:		       59.89 secs
Data transferred:	      334.31 MB
Response time:		        0.04 secs
Transaction rate:	     2795.89 trans/sec
Throughput:		        5.58 MB/sec
Concurrency:		       99.67
Successful transactions:       55789
Failed transactions:	           0
Longest transaction:	        0.51
Shortest transaction:	        0.00
 

[] ~/projects/activerecord-jdbc-adapter $ siege --time=1M -c 100 http://0.0.0.0:3000/posts/1 > /dev/null
** SIEGE 4.1.1
** Preparing 100 concurrent users for battle.
The server is now under siege...

Lifting the server siege...
Transactions:		      155150 hits
Availability:		      100.00 %
Elapsed time:		       59.62 secs
Data transferred:	      309.76 MB
Response time:		        0.04 secs
Transaction rate:	     2602.31 trans/sec
Throughput:		        5.20 MB/sec
Concurrency:		       99.66
Successful transactions:       51694
Failed transactions:	           0
Longest transaction:	        0.57
Shortest transaction:	        0.00

jruby no heap limit, parallel gc, 100 threads, 3.4GB

[] ~/projects/activerecord-jdbc-adapter $ siege --time=1M -c 100 http://0.0.0.0:3000/posts/1 > /dev/null
** SIEGE 4.1.1
** Preparing 100 concurrent users for battle.
The server is now under siege...

Lifting the server siege...
Transactions:		       55757 hits
Availability:		      100.00 %
Elapsed time:		       59.18 secs
Data transferred:	      111.32 MB
Response time:		        0.11 secs
Transaction rate:	      942.16 trans/sec
Throughput:		        1.88 MB/sec
Concurrency:		       99.73
Successful transactions:       18575
Failed transactions:	           0
Longest transaction:	        2.75
Shortest transaction:	        0.00
 

[] ~/projects/activerecord-jdbc-adapter $ siege --time=1M -c 100 http://0.0.0.0:3000/posts/1 > /dev/null
** SIEGE 4.1.1
** Preparing 100 concurrent users for battle.
The server is now under siege...

Lifting the server siege...
Transactions:		      180792 hits
Availability:		      100.00 %
Elapsed time:		       59.02 secs
Data transferred:	      360.94 MB
Response time:		        0.03 secs
Transaction rate:	     3063.23 trans/sec
Throughput:		        6.12 MB/sec
Concurrency:		       99.70
Successful transactions:       60219
Failed transactions:	           0
Longest transaction:	        1.27
Shortest transaction:	        0.00
 

[] ~/projects/activerecord-jdbc-adapter $ siege --time=1M -c 100 http://0.0.0.0:3000/posts/1 > /dev/null
** SIEGE 4.1.1
** Preparing 100 concurrent users for battle.
The server is now under siege...

Lifting the server siege...
Transactions:		      217809 hits
Availability:		      100.00 %
Elapsed time:		       59.72 secs
Data transferred:	      434.83 MB
Response time:		        0.03 secs
Transaction rate:	     3647.17 trans/sec
Throughput:		        7.28 MB/sec
Concurrency:		       99.58
Successful transactions:       72546
Failed transactions:	           0
Longest transaction:	        1.14
Shortest transaction:	        0.00

jruby no heap limit, g1, 100 threads

[] ~/projects/activerecord-jdbc-adapter $ siege --time=1M -c 100 http://0.0.0.0:3000/posts/1 > /dev/null
** SIEGE 4.1.1
** Preparing 100 concurrent users for battle.
The server is now under siege...

Lifting the server siege...
Transactions:		      162083 hits
Availability:		      100.00 %
Elapsed time:		       59.25 secs
Data transferred:	      323.58 MB
Response time:		        0.04 secs
Transaction rate:	     2735.58 trans/sec
Throughput:		        5.46 MB/sec
Concurrency:		       99.71
Successful transactions:       53980
Failed transactions:	           0
Longest transaction:	        1.27
Shortest transaction:	        0.00
 

[] ~/projects/activerecord-jdbc-adapter $ siege --time=1M -c 100 http://0.0.0.0:3000/posts/1 > /dev/null
** SIEGE 4.1.1
** Preparing 100 concurrent users for battle.
The server is now under siege...

Lifting the server siege...
Transactions:		      181695 hits
Availability:		      100.00 %
Elapsed time:		       59.35 secs
Data transferred:	      362.73 MB
Response time:		        0.03 secs
Transaction rate:	     3061.42 trans/sec
Throughput:		        6.11 MB/sec
Concurrency:		       99.60
Successful transactions:       60514
Failed transactions:	           0
Longest transaction:	        1.14
Shortest transaction:	        0.00
 

[] ~/projects/activerecord-jdbc-adapter $ siege --time=1M -c 100 http://0.0.0.0:3000/posts/1 > /dev/null
** SIEGE 4.1.1
** Preparing 100 concurrent users for battle.
The server is now under siege...

Lifting the server siege...
Transactions:		      184858 hits
Availability:		      100.00 %
Elapsed time:		       59.73 secs
Data transferred:	      369.05 MB
Response time:		        0.03 secs
Transaction rate:	     3094.89 trans/sec
Throughput:		        6.18 MB/sec
Concurrency:		       99.65
Successful transactions:       61568
Failed transactions:	           0
Longest transaction:	        0.15
Shortest transaction:	        0.00
 

[] ~/projects/activerecord-jdbc-adapter $ siege --time=1M -c 100 http://0.0.0.0:3000/posts/1 > /dev/null
** SIEGE 4.1.1
** Preparing 100 concurrent users for battle.
The server is now under siege...

Lifting the server siege...
Transactions:		      201452 hits
Availability:		      100.00 %
Elapsed time:		       59.80 secs
Data transferred:	      402.18 MB
Response time:		        0.03 secs
Transaction rate:	     3368.76 trans/sec
Throughput:		        6.73 MB/sec
Concurrency:		       99.64
Successful transactions:       67101
Failed transactions:	           0
Longest transaction:	        0.15
Shortest transaction:	        0.00

select 5x ips no indy

BenchRecord.select('a_binary').where(id: i).first [5x]
                        613.073  (± 7.3%) i/s -      3.047k in   5.003256s
BenchRecord.select('a_boolean').where(id: i).first [5x]
                        586.529  (± 9.5%) i/s -      2.898k in   4.995258s
BenchRecord.select('a_date').where(id: i).first [5x]
                        640.383  (±12.3%) i/s -      3.145k in   5.016105s
BenchRecord.select('a_datetime').where(id: i).first [5x]
                        678.482  (± 3.4%) i/s -      3.406k in   5.026376s
BenchRecord.select('a_decimal').where(id: i).first [5x]
                        657.932  (± 1.5%) i/s -      3.306k in   5.026094s
BenchRecord.select('a_float').where(id: i).first [5x]
                        665.550  (± 5.7%) i/s -      3.315k in   4.999510s
BenchRecord.select('a_integer').where(id: i).first [5x]
                        638.047  (± 8.1%) i/s -      3.200k in   5.055132s
BenchRecord.select('a_string').where(id: i).first [5x]
                        675.457  (± 7.3%) i/s -      3.358k in   5.004339s
BenchRecord.select('a_text').where(id: i).first [5x]
                        697.459  (± 2.2%) i/s -      3.551k in   5.093689s
BenchRecord.select('a_time').where(id: i).first [5x]
                        662.724  (± 2.6%) i/s -      3.355k in   5.066258s
BenchRecord.select('a_timestamp').where(id: i).first [5x]
                        635.409  (± 6.5%) i/s -      3.185k in   5.035859s
BenchRecord.select('*').where(id: i).first [5x]
                        530.465  (± 2.8%) i/s -      2.680k in   5.056660s
BenchRecord.select('a_binary').where(['id = ?', an_id]).first [5x]
                        721.947  (± 7.8%) i/s -      3.584k in   5.003863s
BenchRecord.select('a_boolean').where(['id = ?', an_id]).first [5x]
                        710.075  (± 7.2%) i/s -      3.588k in   5.081704s
BenchRecord.select('a_date').where(['id = ?', an_id]).first [5x]
                        772.764  (± 5.2%) i/s -      3.888k in   5.046241s
BenchRecord.select('a_datetime').where(['id = ?', an_id]).first [5x]
                        793.419  (± 2.1%) i/s -      3.975k in   5.012288s
BenchRecord.select('a_decimal').where(['id = ?', an_id]).first [5x]
                        773.173  (± 5.4%) i/s -      3.922k in   5.089437s
BenchRecord.select('a_float').where(['id = ?', an_id]).first [5x]
                        745.477  (± 7.9%) i/s -      3.773k in   5.095817s
BenchRecord.select('a_integer').where(['id = ?', an_id]).first [5x]
                        789.285  (± 3.7%) i/s -      3.950k in   5.012106s
BenchRecord.select('a_string').where(['id = ?', an_id]).first [5x]
                        790.669  (± 2.3%) i/s -      3.952k in   5.000905s
BenchRecord.select('a_text').where(['id = ?', an_id]).first [5x]
                        752.640  (± 6.8%) i/s -      3.825k in   5.108902s
BenchRecord.select('a_time').where(['id = ?', an_id]).first [5x]
                        746.996  (± 5.8%) i/s -      3.724k in   5.001941s
BenchRecord.select('a_timestamp').where(['id = ?', an_id]).first [5x]
                        688.936  (± 6.7%) i/s -      3.432k in   5.005569s
BenchRecord.select('*').where(['id = ?', an_id]).first [5x]
                        582.980  (± 6.2%) i/s -      2.914k in   5.017587s

select 5x ips indy

BenchRecord.select('a_binary').where(id: i).first [5x]
                          1.237k (±14.1%) i/s -      5.962k in   4.966174s
BenchRecord.select('a_boolean').where(id: i).first [5x]
                          1.369k (± 8.4%) i/s -      6.768k in   4.986538s
BenchRecord.select('a_date').where(id: i).first [5x]
                          1.401k (± 3.1%) i/s -      6.993k in   4.995588s
BenchRecord.select('a_datetime').where(id: i).first [5x]
                          1.413k (± 3.4%) i/s -      7.062k in   5.003192s
BenchRecord.select('a_decimal').where(id: i).first [5x]
                          1.417k (± 1.9%) i/s -      7.105k in   5.015374s
BenchRecord.select('a_float').where(id: i).first [5x]
                          1.432k (± 1.9%) i/s -      7.181k in   5.017904s
BenchRecord.select('a_integer').where(id: i).first [5x]
                          1.429k (± 2.0%) i/s -      7.250k in   5.075011s
BenchRecord.select('a_string').where(id: i).first [5x]
                          1.372k (± 2.9%) i/s -      6.912k in   5.040811s
BenchRecord.select('a_text').where(id: i).first [5x]
                          1.386k (± 3.6%) i/s -      6.956k in   5.024998s
BenchRecord.select('a_time').where(id: i).first [5x]
                          1.389k (± 3.2%) i/s -      7.008k in   5.050197s
BenchRecord.select('a_timestamp').where(id: i).first [5x]
                          1.412k (± 2.8%) i/s -      7.056k in   5.002200s
BenchRecord.select('*').where(id: i).first [5x]
                        952.840  (± 2.4%) i/s -      4.814k in   5.055233s
BenchRecord.select('a_binary').where(['id = ?', an_id]).first [5x]
                          1.503k (± 6.2%) i/s -      7.476k in   4.996809s
BenchRecord.select('a_boolean').where(['id = ?', an_id]).first [5x]
                          1.559k (± 2.6%) i/s -      7.812k in   5.013764s
BenchRecord.select('a_date').where(['id = ?', an_id]).first [5x]
                          1.510k (± 3.6%) i/s -      7.600k in   5.038411s
BenchRecord.select('a_datetime').where(['id = ?', an_id]).first [5x]
                          1.535k (± 2.7%) i/s -      7.700k in   5.021573s
BenchRecord.select('a_decimal').where(['id = ?', an_id]).first [5x]
                          1.555k (± 2.1%) i/s -      7.854k in   5.052791s
BenchRecord.select('a_float').where(['id = ?', an_id]).first [5x]
                          1.536k (± 2.8%) i/s -      7.693k in   5.013961s
BenchRecord.select('a_integer').where(['id = ?', an_id]).first [5x]
                          1.535k (± 2.3%) i/s -      7.776k in   5.067705s
BenchRecord.select('a_string').where(['id = ?', an_id]).first [5x]
                          1.556k (± 2.0%) i/s -      7.791k in   5.008526s
BenchRecord.select('a_text').where(['id = ?', an_id]).first [5x]
                          1.542k (± 4.6%) i/s -      7.755k in   5.042509s
BenchRecord.select('a_time').where(['id = ?', an_id]).first [5x]
                          1.570k (± 1.5%) i/s -      7.897k in   5.031813s
BenchRecord.select('a_timestamp').where(['id = ?', an_id]).first [5x]
                          1.564k (± 2.5%) i/s -      7.956k in   5.091809s
BenchRecord.select('*').where(['id = ?', an_id]).first [5x]
                          1.165k (± 1.9%) i/s -      5.883k in   5.053425s

select 5x cruby

BenchRecord.select('a_binary').where(id: i).first [5x]
                        867.687  (± 1.8%) i/s -      4.410k in   5.084265s
BenchRecord.select('a_boolean').where(id: i).first [5x]
                        865.267  (± 2.3%) i/s -      4.416k in   5.106423s
BenchRecord.select('a_date').where(id: i).first [5x]
                        928.350  (± 2.0%) i/s -      4.704k in   5.069394s
BenchRecord.select('a_datetime').where(id: i).first [5x]
                        921.557  (± 3.0%) i/s -      4.650k in   5.050482s
BenchRecord.select('a_decimal').where(id: i).first [5x]
                        934.106  (± 2.2%) i/s -      4.743k in   5.080159s
BenchRecord.select('a_float').where(id: i).first [5x]
                        917.135  (± 3.6%) i/s -      4.606k in   5.028983s
BenchRecord.select('a_integer').where(id: i).first [5x]
                        908.356  (± 3.0%) i/s -      4.560k in   5.024454s
BenchRecord.select('a_string').where(id: i).first [5x]
                        884.575  (± 2.5%) i/s -      4.465k in   5.050762s
BenchRecord.select('a_text').where(id: i).first [5x]
                        885.386  (± 2.5%) i/s -      4.512k in   5.099262s
BenchRecord.select('a_time').where(id: i).first [5x]
                        903.517  (± 1.9%) i/s -      4.560k in   5.048718s
BenchRecord.select('a_timestamp').where(id: i).first [5x]
                        890.078  (± 1.2%) i/s -      4.465k in   5.017164s
BenchRecord.select('*').where(id: i).first [5x]
                        692.996  (± 2.5%) i/s -      3.528k in   5.094162s
BenchRecord.select('a_binary').where(['id = ?', an_id]).first [5x]
                        967.863  (± 2.4%) i/s -      4.888k in   5.053248s
BenchRecord.select('a_boolean').where(['id = ?', an_id]).first [5x]
                        985.789  (± 1.2%) i/s -      4.940k in   5.011991s
BenchRecord.select('a_date').where(['id = ?', an_id]).first [5x]
                        984.103  (± 0.8%) i/s -      4.982k in   5.062807s
BenchRecord.select('a_datetime').where(['id = ?', an_id]).first [5x]
                        973.591  (± 0.8%) i/s -      4.940k in   5.074372s
BenchRecord.select('a_decimal').where(['id = ?', an_id]).first [5x]
                        966.999  (± 1.6%) i/s -      4.845k in   5.011555s
BenchRecord.select('a_float').where(['id = ?', an_id]).first [5x]
                        967.089  (± 1.4%) i/s -      4.895k in   5.062724s
BenchRecord.select('a_integer').where(['id = ?', an_id]).first [5x]
                        950.410  (± 1.4%) i/s -      4.784k in   5.034578s
BenchRecord.select('a_string').where(['id = ?', an_id]).first [5x]
                        936.350  (± 1.2%) i/s -      4.732k in   5.054410s
BenchRecord.select('a_text').where(['id = ?', an_id]).first [5x]
                        942.921  (± 2.0%) i/s -      4.770k in   5.060932s
BenchRecord.select('a_time').where(['id = ?', an_id]).first [5x]
                        946.679  (± 1.5%) i/s -      4.743k in   5.011185s
BenchRecord.select('a_timestamp').where(['id = ?', an_id]).first [5x]
                        951.083  (± 2.7%) i/s -      4.784k in   5.033872s
BenchRecord.select('*').where(['id = ?', an_id]).first [5x]
                        862.522  (± 0.9%) i/s -      4.320k in   5.009068s

AR_VERSION="~>7.0" RAILS_ENV=production AR_ADAPTER=sqlite3 rvm ruby-3.1 do ruby --yjit bench/benchmark_update.rb 5

AR_VERSION="~>7.0" RAILS_ENV=production AR_ADAPTER=sqlite3 jruby -Xcompile.invokedynamic -Ijdbc-sqlite3/lib bench/benchmark_update.rb 5

update 1x ips indy

BenchRecord#update() [1x]
                         16.041k (± 8.8%) i/s -     79.002k in   4.986032s
BenchRecord#update('a_binary' => "\xB6'\xC9\xB0\x84\x96\x19M[\x10\x9F\xBDy\xDE\xAF\x8E...(1536)") [1x]
                         14.618k (± 5.1%) i/s -     72.772k in   4.993534s
BenchRecord#update('a_boolean' => true) [1x]
                         14.638k (± 2.0%) i/s -     73.216k in   5.003874s
BenchRecord#update('a_date' => Mon, 16 May 2022) [1x]
                         14.356k (± 2.1%) i/s -     71.765k in   5.001055s
BenchRecord#update('a_datetime' => Mon, 16 May 2022 08:32:48 -0500) [1x]
                         12.667k (± 2.8%) i/s -     63.434k in   5.011889s
BenchRecord#update('a_decimal' => 0.123456789055555e10) [1x]
                         13.220k (± 2.8%) i/s -     65.992k in   4.995838s
BenchRecord#update('a_float' => 999.99) [1x]
                         13.608k (± 1.6%) i/s -     68.580k in   5.040995s
BenchRecord#update('a_integer' => 4242) [1x]
                         14.529k (± 1.4%) i/s -     73.080k in   5.030864s
BenchRecord#update('a_string' => "BORAT Ipsum!") [1x]
                         14.986k (± 2.8%) i/s -     74.942k in   5.004536s
BenchRecord#update('a_text' => "Kazakhstan is th...(464)") [1x]
                         14.809k (± 2.2%) i/s -     74.400k in   5.026524s
BenchRecord#update('a_time' => 2022-05-16 08:32:48.321912 -0500) [1x]
                         14.226k (± 1.3%) i/s -     71.248k in   5.009167s
BenchRecord#update('a_timestamp' => 2022-05-16 08:32:48.322258 -0500) [1x]
                         14.524k (± 1.4%) i/s -     72.816k in   5.014656s
BenchRecord#update(...) [1x]
                          7.518k (± 1.3%) i/s -     37.752k in   5.022136s

update 1x ips no indy

BenchRecord#update() [1x]
                          7.597k (± 4.3%) i/s -     37.884k in   4.996857s
BenchRecord#update('a_binary' => "\xD4\a\x1A\xF4\xE9\x1E\x9A\xC2%iJ\x89\x13\x03\v`...(1536)") [1x]
                          6.533k (± 3.2%) i/s -     32.643k in   5.003573s
BenchRecord#update('a_boolean' => true) [1x]
                          6.651k (± 1.0%) i/s -     33.488k in   5.035425s
BenchRecord#update('a_date' => Mon, 16 May 2022) [1x]
                          6.487k (± 2.4%) i/s -     32.580k in   5.025338s
BenchRecord#update('a_datetime' => Mon, 16 May 2022 08:35:31 -0500) [1x]
                          5.722k (± 2.8%) i/s -     28.674k in   5.015159s
BenchRecord#update('a_decimal' => 0.123456789055555e10) [1x]
                          6.039k (± 0.7%) i/s -     30.212k in   5.002700s
BenchRecord#update('a_float' => 999.99) [1x]
                          6.051k (± 3.0%) i/s -     30.800k in   5.095298s
BenchRecord#update('a_integer' => 4242) [1x]
                          5.954k (± 1.9%) i/s -     30.130k in   5.062202s
BenchRecord#update('a_string' => "BORAT Ipsum!") [1x]
                          6.143k (± 1.2%) i/s -     30.772k in   5.010269s
BenchRecord#update('a_text' => "Kazakhstan is th...(464)") [1x]
                          6.175k (± 0.9%) i/s -     30.870k in   4.999337s
BenchRecord#update('a_time' => 2022-05-16 08:35:31.885283 -0500) [1x]
                          5.997k (± 3.0%) i/s -     30.050k in   5.015324s
BenchRecord#update('a_timestamp' => 2022-05-16 08:35:31.885513 -0500) [1x]
                          6.286k (± 1.6%) i/s -     31.600k in   5.028753s
BenchRecord#update(...) [1x]
                          3.518k (± 2.2%) i/s -     17.595k in   5.004407s

update 5x ips indy

BenchRecord#update() [5x]
                        608.945  (±28.2%) i/s -      2.796k in   5.008357s
BenchRecord#update('a_binary' => "\xBCR\xCB\x18\xE2\xB9\x8Cw\x00\x88\xBA\xAD\x10\x86^z...(1536)") [5x]
                        860.746  (±12.5%) i/s -      4.239k in   5.003797s
BenchRecord#update('a_boolean' => true) [5x]
                          2.445k (±15.7%) i/s -     11.745k in   4.997710s
BenchRecord#update('a_date' => Mon, 16 May 2022) [5x]
                          2.573k (± 3.7%) i/s -     12.857k in   5.004608s
BenchRecord#update('a_datetime' => Mon, 16 May 2022 08:38:08 -0500) [5x]
                          2.161k (± 7.3%) i/s -     10.719k in   4.993194s
BenchRecord#update('a_decimal' => 0.123456789055555e10) [5x]
                          2.227k (± 6.6%) i/s -     11.088k in   5.003918s
BenchRecord#update('a_float' => 999.99) [5x]
                          2.176k (± 6.6%) i/s -     10.800k in   4.997705s
BenchRecord#update('a_integer' => 4242) [5x]
                          2.374k (± 3.1%) i/s -     11.844k in   4.995445s
BenchRecord#update('a_string' => "BORAT Ipsum!") [5x]
                          2.471k (± 2.3%) i/s -     12.341k in   4.997366s
BenchRecord#update('a_text' => "Kazakhstan is th...(464)") [5x]
                          2.411k (± 2.6%) i/s -     12.040k in   4.997383s
BenchRecord#update('a_time' => 2022-05-16 08:38:08.25635 -0500) [5x]
                          2.296k (± 4.6%) i/s -     11.440k in   4.994675s
BenchRecord#update('a_timestamp' => 2022-05-16 08:38:08.256758 -0500) [5x]
                          2.372k (± 2.9%) i/s -     11.832k in   4.993638s
BenchRecord#update(...) [5x]
                          1.257k (± 3.7%) i/s -      6.272k in   4.996084s

update 5x ips no indy

BenchRecord#update() [5x]
                          1.548k (± 2.9%) i/s -      7.716k in   4.990013s
BenchRecord#update('a_binary' => "\x1A|v\xE1uHC$OB\xC9\x93,\xD6\x90F...(1536)") [5x]
                          1.293k (± 2.5%) i/s -      6.500k in   5.031640s
BenchRecord#update('a_boolean' => true) [5x]
                          1.293k (± 2.1%) i/s -      6.528k in   5.052111s
BenchRecord#update('a_date' => Mon, 16 May 2022) [5x]
                          1.301k (± 1.5%) i/s -      6.533k in   5.023820s
BenchRecord#update('a_datetime' => Mon, 16 May 2022 08:40:17 -0500) [5x]
                          1.145k (± 3.2%) i/s -      5.766k in   5.042208s
BenchRecord#update('a_decimal' => 0.123456789055555e10) [5x]
                          1.219k (± 2.2%) i/s -      6.120k in   5.022330s
BenchRecord#update('a_float' => 999.99) [5x]
                          1.207k (± 2.6%) i/s -      6.050k in   5.016046s
BenchRecord#update('a_integer' => 4242) [5x]
                          1.251k (± 2.5%) i/s -      6.300k in   5.038889s
BenchRecord#update('a_string' => "BORAT Ipsum!") [5x]
                          1.278k (± 1.6%) i/s -      6.468k in   5.063832s
BenchRecord#update('a_text' => "Kazakhstan is th...(464)") [5x]
                          1.276k (± 1.4%) i/s -      6.480k in   5.077871s
BenchRecord#update('a_time' => 2022-05-16 08:40:17.199594 -0500) [5x]
                          1.253k (± 1.4%) i/s -      6.300k in   5.027726s
BenchRecord#update('a_timestamp' => 2022-05-16 08:40:17.199807 -0500) [5x]
                          1.272k (± 2.0%) i/s -      6.426k in   5.053011s
BenchRecord#update(...) [5x]
                        694.584  (± 1.6%) i/s -      3.484k in   5.017224s

update 1x cruby 3.1

BenchRecord#update() [1x]
                        319.396  (± 6.3%) i/s -      1.673k in   5.258842s
BenchRecord#update('a_binary' => "t\x8A#\xE1,\xCD,\x80\xFF/\x12\xCC9jJ\x95...(1536)") [1x]
                        274.453  (± 4.4%) i/s -      1.380k in   5.038260s
BenchRecord#update('a_boolean' => true) [1x]
                        225.460  (±17.7%) i/s -      1.152k in   5.306987s
BenchRecord#update('a_date' => Mon, 16 May 2022) [1x]
                        163.917  (±17.7%) i/s -    847.000  in   5.339122s
BenchRecord#update('a_datetime' => Mon, 16 May 2022 08:47:09 -0500) [1x]
                        194.961  (±10.8%) i/s -    990.000  in   5.149053s
BenchRecord#update('a_decimal' => 0.123456789055555e10) [1x]
                        163.489  (±15.9%) i/s -    854.000  in   5.388764s
BenchRecord#update('a_float' => 999.99) [1x]
                        133.808  (±12.0%) i/s -    714.000  in   5.415896s
BenchRecord#update('a_integer' => 4242) [1x]
                        106.367  (± 8.5%) i/s -    572.000  in   5.414433s
BenchRecord#update('a_string' => "BORAT Ipsum!") [1x]
                        141.710  (±15.5%) i/s -    704.000  in   5.128725s
BenchRecord#update('a_text' => "Kazakhstan is th...(464)") [1x]
                        146.128  (± 6.8%) i/s -    736.000  in   5.061819s
BenchRecord#update('a_time' => 2022-05-16 08:47:09.346135189 -0500) [1x]
                        131.992  (± 8.3%) i/s -    697.000  in   5.320870s
BenchRecord#update('a_timestamp' => 2022-05-16 08:47:09.346140708 -0500) [1x]
                        130.796  (± 8.4%) i/s -    665.000  in   5.121762s
BenchRecord#update(...) [1x]
                        115.799  (± 6.9%) i/s -    588.000  in   5.102194s

update 1x cruby yjit

BenchRecord#update() [1x]
                        272.316  (± 9.9%) i/s -      1.614k in   5.990008s
BenchRecord#update('a_binary' => "\xC9\xBA\xF1>\xB2/g\xC7_\f\xE8\xE8\xE8\xB7\aI...(1536)") [1x]
                        203.628  (± 6.9%) i/s -      1.128k in   5.567794s
BenchRecord#update('a_boolean' => true) [1x]
                        203.584  (± 4.9%) i/s -      1.122k in   5.525519s
BenchRecord#update('a_date' => Mon, 16 May 2022) [1x]
                        199.310  (± 3.5%) i/s -      1.044k in   5.244078s
BenchRecord#update('a_datetime' => Mon, 16 May 2022 08:49:10 -0500) [1x]
                        166.733  (± 7.2%) i/s -    884.000  in   5.330806s
BenchRecord#update('a_decimal' => 0.123456789055555e10) [1x]
                        157.181  (± 5.1%) i/s -    845.000  in   5.390069s
BenchRecord#update('a_float' => 999.99) [1x]
                        150.306  (± 4.0%) i/s -    784.000  in   5.224112s
BenchRecord#update('a_integer' => 4242) [1x]
                        144.868  (± 5.5%) i/s -    780.000  in   5.400643s
BenchRecord#update('a_string' => "BORAT Ipsum!") [1x]
                        143.470  (± 4.2%) i/s -    720.000  in   5.028039s
BenchRecord#update('a_text' => "Kazakhstan is th...(464)") [1x]
                        141.928  (± 4.9%) i/s -    748.000  in   5.283706s
BenchRecord#update('a_time' => 2022-05-16 08:49:10.510463821 -0500) [1x]
                        133.036  (± 5.3%) i/s -    688.000  in   5.186599s
BenchRecord#update('a_timestamp' => 2022-05-16 08:49:10.51046898 -0500) [1x]
                        123.308  (± 3.2%) i/s -    630.000  in   5.113894s
BenchRecord#update(...) [1x]
                        114.067  (± 3.5%) i/s -    580.000  in   5.090156s

update 5x cruby

BenchRecord#update() [5x]
                        101.888  (± 2.9%) i/s -    567.000  in   5.570441s
BenchRecord#update('a_binary' => "\xC7 \xB4S\xE9`\x9B\xE1\x15\x12\x9F\xFD{\xA0\xBFq...(1536)") [5x]
                         84.276  (± 5.9%) i/s -    460.000  in   5.478481s
BenchRecord#update('a_boolean' => true) [5x]
                         75.543  (± 2.6%) i/s -    403.000  in   5.337765s
BenchRecord#update('a_date' => Mon, 16 May 2022) [5x]
                         83.893  (± 2.4%) i/s -    432.000  in   5.151597s
BenchRecord#update('a_datetime' => Mon, 16 May 2022 08:51:20 -0500) [5x]
                         75.311  (± 2.7%) i/s -    378.000  in   5.024613s
BenchRecord#update('a_decimal' => 0.123456789055555e10) [5x]
                         72.142  (± 1.4%) i/s -    368.000  in   5.102369s
BenchRecord#update('a_float' => 999.99) [5x]
                         69.335  (± 2.9%) i/s -    352.000  in   5.080971s
BenchRecord#update('a_integer' => 4242) [5x]
                         66.113  (± 1.5%) i/s -    341.000  in   5.160368s
BenchRecord#update('a_string' => "BORAT Ipsum!") [5x]
                         66.027  (± 1.5%) i/s -    338.000  in   5.119428s
BenchRecord#update('a_text' => "Kazakhstan is th...(464)") [5x]
                         63.757  (± 3.1%) i/s -    324.000  in   5.084802s
BenchRecord#update('a_time' => 2022-05-16 08:51:20.000155848 -0500) [5x]
                         60.534  (± 3.3%) i/s -    312.000  in   5.161937s
BenchRecord#update('a_timestamp' => 2022-05-16 08:51:20.000161274 -0500) [5x]
                         59.204  (± 1.7%) i/s -    297.000  in   5.018695s
BenchRecord#update(...) [5x]
                         54.669  (± 1.8%) i/s -    279.000  in   5.104958s

update 5x cruby yjit

BenchRecord#update() [5x]
                         96.858  (± 4.1%) i/s -    600.000  in   6.203431s
BenchRecord#update('a_binary' => "\xD5\xDF\xDEn\xBA\x95\xD5r\xE3\xA7\xC1\xA0\xD7\xB3~q...(1536)") [5x]
                         90.612  (± 2.2%) i/s -    480.000  in   5.300784s
BenchRecord#update('a_boolean' => true) [5x]
                         83.284  (± 2.4%) i/s -    435.000  in   5.226816s
BenchRecord#update('a_date' => Mon, 16 May 2022) [5x]
                         77.809  (± 2.6%) i/s -    391.000  in   5.027679s
BenchRecord#update('a_datetime' => Mon, 16 May 2022 08:53:42 -0500) [5x]
                         72.932  (± 2.7%) i/s -    368.000  in   5.049414s
BenchRecord#update('a_decimal' => 0.123456789055555e10) [5x]
                         70.663  (± 1.4%) i/s -    368.000  in   5.209217s
BenchRecord#update('a_float' => 999.99) [5x]
                         68.268  (± 2.9%) i/s -    350.000  in   5.129680s
BenchRecord#update('a_integer' => 4242) [5x]
                         65.114  (± 1.5%) i/s -    338.000  in   5.193476s
BenchRecord#update('a_string' => "BORAT Ipsum!") [5x]
                         62.986  (± 1.6%) i/s -    325.000  in   5.161339s
BenchRecord#update('a_text' => "Kazakhstan is th...(464)") [5x]
                         61.655  (± 3.2%) i/s -    312.000  in   5.063515s
BenchRecord#update('a_time' => 2022-05-16 08:53:42.130041622 -0500) [5x]
                         60.355  (± 1.7%) i/s -    308.000  in   5.104593s
BenchRecord#update('a_timestamp' => 2022-05-16 08:53:42.130051116 -0500) [5x]
                         58.581  (± 1.7%) i/s -    300.000  in   5.122883s
BenchRecord#update(...) [5x]
                         54.909  (± 1.8%) i/s -    279.000  in   5.081903s

update 5x java 8 indy

BenchRecord#update() [5x]
                        898.302  (±22.8%) i/s -      4.179k in   4.971833s
BenchRecord#update('a_binary' => "4\vHK\xE5C\xCE\xB5{\xC6eM\xAC\x13K\xEB...(1536)") [5x]
                          1.732k (±24.0%) i/s -      7.982k in   4.992522s
BenchRecord#update('a_boolean' => true) [5x]
                          2.062k (±10.4%) i/s -     10.179k in   4.997948s
BenchRecord#update('a_date' => Mon, 16 May 2022) [5x]
                          2.244k (± 5.2%) i/s -     11.174k in   4.995048s
BenchRecord#update('a_datetime' => Mon, 16 May 2022 09:08:15 -0500) [5x]
                          1.772k (±11.1%) i/s -      8.700k in   4.997500s
BenchRecord#update('a_decimal' => 0.123456789055555e10) [5x]
                          1.874k (±10.2%) i/s -      9.138k in   4.953919s
BenchRecord#update('a_float' => 999.99) [5x]
                          1.920k (± 5.9%) i/s -      9.575k in   5.004820s
BenchRecord#update('a_integer' => 4242) [5x]
                          2.029k (± 5.8%) i/s -     10.116k in   5.005951s
BenchRecord#update('a_string' => "BORAT Ipsum!") [5x]
                          2.095k (± 4.8%) i/s -     10.470k in   5.009807s
BenchRecord#update('a_text' => "Kazakhstan is th...(464)") [5x]
                          2.167k (± 2.3%) i/s -     10.836k in   5.003785s
BenchRecord#update('a_time' => 2022-05-16 09:08:15.467379 -0500) [5x]
                          2.046k (± 6.4%) i/s -     10.186k in   5.002155s
BenchRecord#update('a_timestamp' => 2022-05-16 09:08:15.467668 -0500) [5x]
                          2.226k (± 3.3%) i/s -     11.150k in   5.015486s
BenchRecord#update(...) [5x]
                          1.100k (± 3.3%) i/s -      5.516k in   5.018420s

update 5x java 17 indy parallel GC

BenchRecord#update() [5x]
                        449.595  (±20.0%) i/s -      2.145k in   5.004979s
BenchRecord#update('a_binary' => "\xEC*vP\x9A\xF7\xBB\xFE\xA5\xF6\xAE\xC7<s\xD0N...(1536)") [5x]
                        617.461  (±21.2%) i/s -      2.938k in   5.001987s
BenchRecord#update('a_boolean' => true) [5x]
                          1.540k (±35.0%) i/s -      6.757k in   4.996769s
BenchRecord#update('a_date' => Mon, 16 May 2022) [5x]
                          2.261k (± 5.4%) i/s -     11.259k in   4.996036s
BenchRecord#update('a_datetime' => Mon, 16 May 2022 09:11:18 -0500) [5x]
                          1.981k (± 7.9%) i/s -      9.820k in   4.994257s
BenchRecord#update('a_decimal' => 0.123456789055555e10) [5x]
                          2.082k (± 8.0%) i/s -     10.320k in   4.995675s
BenchRecord#update('a_float' => 999.99) [5x]
                          2.121k (± 6.4%) i/s -     10.556k in   5.003335s
BenchRecord#update('a_integer' => 4242) [5x]
                          2.208k (± 5.3%) i/s -     10.994k in   4.994508s
BenchRecord#update('a_string' => "BORAT Ipsum!") [5x]
                          2.201k (± 7.1%) i/s -     10.925k in   4.993642s
BenchRecord#update('a_text' => "Kazakhstan is th...(464)") [5x]
                          2.284k (± 3.8%) i/s -     11.408k in   5.004162s
BenchRecord#update('a_time' => 2022-05-16 09:11:18.68084 -0500) [5x]
                          2.216k (± 4.6%) i/s -     11.032k in   4.991254s
BenchRecord#update('a_timestamp' => 2022-05-16 09:11:18.681132 -0500) [5x]
                          2.256k (± 3.6%) i/s -     11.256k in   4.997511s
BenchRecord#update(...) [5x]
                          1.211k (± 7.7%) i/s -      6.006k in   4.994639s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment