Skip to content

Instantly share code, notes, and snippets.

@steventux
Created March 23, 2012 17:03
Show Gist options
  • Save steventux/2172792 to your computer and use it in GitHub Desktop.
Save steventux/2172792 to your computer and use it in GitHub Desktop.
Benchmarks of POST to Padrino with postdata of 180c chars using various datastores and insertion techniques. (Ruby 1.9.3 + Passenger 3.0.11)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Passenger Ruby 1.9.3 Mysql AR create
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Server Software: Apache/2.2.14
Server Hostname: perf-test.local
Server Port: 80
Document Path: /message
Document Length: 0 bytes
Concurrency Level: 5
Time taken for tests: 9.593 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 262000 bytes
Total POSTed: 340000
HTML transferred: 0 bytes
Requests per second: 104.25 [#/sec] (mean)
Time per request: 47.963 [ms] (mean)
Time per request: 9.593 [ms] (mean, across all concurrent requests)
Transfer rate: 26.67 [Kbytes/sec] received
34.61 kb/s sent
61.29 kb/s total
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.1 0 1
Processing: 23 48 39.9 41 699
Waiting: 23 48 39.9 41 698
Total: 23 48 40.0 41 699
Percentage of the requests served within a certain time (ms)
50% 41
66% 43
75% 44
80% 45
90% 53
95% 75
98% 105
99% 126
100% 699 (longest request)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Passenger Ruby 1.9.3 Mysql Raw SQL insert
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Server Software: Apache/2.2.14
Server Hostname: perf-test.local
Server Port: 80
Document Path: /message
Document Length: 0 bytes
Concurrency Level: 5
Time taken for tests: 8.718 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 262000 bytes
Total POSTed: 340340
HTML transferred: 0 bytes
Requests per second: 114.70 [#/sec] (mean)
Time per request: 43.591 [ms] (mean)
Time per request: 8.718 [ms] (mean, across all concurrent requests)
Transfer rate: 29.35 [Kbytes/sec] received
38.12 kb/s sent
67.47 kb/s total
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.2 0 5
Processing: 28 43 7.1 41 84
Waiting: 28 43 7.1 41 84
Total: 29 43 7.1 41 84
Percentage of the requests served within a certain time (ms)
50% 41
66% 43
75% 44
80% 44
90% 49
95% 63
98% 69
99% 76
100% 84 (longest request)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Passenger Ruby 1.9.3 Postgres AR create
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Server Software: Apache/2.2.14
Server Hostname: perf-test.local
Server Port: 80
Document Path: /message
Document Length: 0 bytes
Concurrency Level: 5
Time taken for tests: 3.767 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 262000 bytes
Total POSTed: 340000
HTML transferred: 0 bytes
Requests per second: 265.43 [#/sec] (mean)
Time per request: 18.837 [ms] (mean)
Time per request: 3.767 [ms] (mean, across all concurrent requests)
Transfer rate: 67.91 [Kbytes/sec] received
88.13 kb/s sent
156.04 kb/s total
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 1
Processing: 6 19 47.8 12 715
Waiting: 6 19 47.7 12 715
Total: 6 19 47.8 12 715
Percentage of the requests served within a certain time (ms)
50% 12
66% 13
75% 16
80% 16
90% 19
95% 36
98% 96
99% 120
100% 715 (longest request)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Passenger Ruby 1.9.3 Postgres Raw SQL insert
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Server Software: Apache/2.2.14
Server Hostname: perf-test.local
Server Port: 80
Document Path: /message
Document Length: 0 bytes
Concurrency Level: 5
Time taken for tests: 2.801 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 262000 bytes
Total POSTed: 340000
HTML transferred: 0 bytes
Requests per second: 357.01 [#/sec] (mean)
Time per request: 14.005 [ms] (mean)
Time per request: 2.801 [ms] (mean, across all concurrent requests)
Transfer rate: 91.35 [Kbytes/sec] received
118.54 kb/s sent
209.89 kb/s total
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 1
Processing: 6 14 29.6 8 455
Waiting: 6 14 29.6 8 455
Total: 6 14 29.6 8 455
Percentage of the requests served within a certain time (ms)
50% 8
66% 9
75% 11
80% 12
90% 16
95% 24
98% 72
99% 98
100% 455 (longest request)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Passenger Ruby 1.9.3 Mongoid create
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Server Software: Apache/2.2.14
Server Hostname: perf-test.local
Server Port: 80
Document Path: /message
Document Length: 0 bytes
Concurrency Level: 5
Time taken for tests: 2.066 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 262000 bytes
Total POSTed: 340000
HTML transferred: 0 bytes
Requests per second: 483.92 [#/sec] (mean)
Time per request: 10.332 [ms] (mean)
Time per request: 2.066 [ms] (mean, across all concurrent requests)
Transfer rate: 123.82 [Kbytes/sec] received
160.68 kb/s sent
284.49 kb/s total
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.3 0 7
Processing: 2 10 20.6 6 131
Waiting: 0 10 20.6 6 131
Total: 2 10 20.6 6 132
Percentage of the requests served within a certain time (ms)
50% 6
66% 7
75% 8
80% 9
90% 11
95% 15
98% 107
99% 121
100% 132 (longest request)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment