Skip to content
sax edited this page Aug 16, 2012 · 4 revisions

Doing very basic performance testing show a slight, but reasonable, impact of enabling DTrace probes in Rails.

"Benchmarks" were done on the same computer (a 2012 MacBook Air) that was hosting the server, so they should be taken with a ginormous grain of salt.

  • Rails: 3.2.6
  • Server: Unicorn 4.3.1
  • Workers: 5

Without rails-dtrace

** SIEGE 2.72
** Preparing 50 concurrent users for battle.
The server is now under siege...
Lifting the server siege...      done.

Transactions:		        1245 hits
Availability:		      100.00 %
Elapsed time:		       59.92 secs
Data transferred:	       21.58 MB
Response time:		        1.81 secs
Transaction rate:	       20.78 trans/sec
Throughput:		        0.36 MB/sec
Concurrency:		       37.53
Successful transactions:        1245
Failed transactions:	           0
Longest transaction:	        4.23
Shortest transaction:	        0.32

With rails-dtrace, no tracing

** SIEGE 2.72
** Preparing 50 concurrent users for battle.
The server is now under siege...
Lifting the server siege...      done.

Transactions:		        1213 hits
Availability:		      100.00 %
Elapsed time:		       59.34 secs
Data transferred:	       21.07 MB
Response time:		        1.84 secs
Transaction rate:	       20.44 trans/sec
Throughput:		        0.36 MB/sec
Concurrency:		       37.60
Successful transactions:        1213
Failed transactions:	           0
Longest transaction:	        3.68
Shortest transaction:	        0.43

With rails-dtrace, tracing to a log file

sudo dtrace -n 'ruby*:rails:: { printf("%s %s %d", copyinstr(arg0), copyinstr(arg1), arg2) }' > ~/tmp/dtrace.log
** SIEGE 2.72
** Preparing 50 concurrent users for battle.
The server is now under siege...
Lifting the server siege...      done.

Transactions:		        1128 hits
Availability:		      100.00 %
Elapsed time:		       59.95 secs
Data transferred:	       19.44 MB
Response time:		        2.06 secs
Transaction rate:	       18.82 trans/sec
Throughput:		        0.32 MB/sec
Concurrency:		       38.72
Successful transactions:        1128
Failed transactions:	           0
Longest transaction:	        3.59
Shortest transaction:	        0.48

Clone this wiki locally