The runner side of the project has been running a lot slower than the UI, but I do feel I have made some interesting project.
I provisioned an “old” desktop I have to run the bench, it is running ubuntu 12.04.03 LTS (x64) this is in line with what most servers out there should be running.
I also had to spend an inordinate amount of time getting cpufreutisl to play nicely. I originally though I could disable all CPU scaling in the BIOS but it just does not play nice.
Instead I force the CPU into performance mode which give very even and consistent results. Multiple runs of the Discourse bench come back with results within 1ms on multiple runs.
I also added a -b
option (best of) to the Discourse bench so we can repeat tests multiple times and pick the best.
I have got a very large number of ruby builds installed now and have decided to standardize on chruby.
Initially, I was using rbenv, but rbenv performs just way too much magic and rbenv rehash
was taking forever.
Next week I will see if I can script a huge run of the Discourse bench across all the builds so we can graph it. However in the mean time I have a project for @andypike , @dmathieu and the UI team.
Recently, funny-falcon has come up with a pretty awesome optimisation that makes method caching in Ruby much faster. We are trying to gather information about how much it improves things. ko1 is open to merging it in once all the concerns are addressed. You can read about this here: http://bugs.ruby-lang.org/issues/9262
I think it would completely awesome if we could highlight the differences between before and after in a pretty bar chart generated from the UI side. It would open up a completely new usage pattern for bench ui, and is incredibly useful. There are multiple perf patches pending, providing great comparisons of the behavior before and after is key to getting stuff accepted.
Here are there results of running
# runs the discourse bench 5 times, 300 reqs per page per tested
$ ruby script/bench.rb -b 5 -i 300
###BEFORE
---
home:
50: 49
75: 50
90: 52
99: 114
categories:
50: 75
75: 77
90: 83
99: 149
home_admin:
50: 57
75: 59
90: 60
99: 127
topic:
50: 12
75: 13
90: 13
99: 83
categories_admin:
50: 88
75: 90
90: 96
99: 161
topic_admin:
50: 22
75: 23
90: 25
99: 99
timings:
load_rails: 3029
ruby-version: 2.1.0-p-1
rss_kb: 253160
architecture: amd64
operatingsystem: Ubuntu
kernelversion: 3.8.0
memorysize: 23.55 GB
physicalprocessorcount: 1
processor0: Intel(R) Core(TM) i7 CPU 960 @ 3.20GHz
virtual: physical
###AFTER:
---
topic_admin:
50: 20
75: 22
90: 24
99: 30
topic:
50: 12
75: 13
90: 14
99: 37
home_admin:
50: 54
75: 55
90: 58
99: 121
categories_admin:
50: 80
75: 82
90: 89
99: 156
categories:
50: 69
75: 71
90: 98
99: 159
home:
50: 47
75: 48
90: 50
99: 105
timings:
load_rails: 2970
ruby-version: 2.1.0-p-1
rss_kb: 255392
architecture: amd64
operatingsystem: Ubuntu
kernelversion: 3.8.0
memorysize: 23.55 GB
physicalprocessorcount: 1
processor0: Intel(R) Core(TM) i7 CPU 960 @ 3.20GHz
virtual: physical
Is there any way we can get this graphed on the UI in a bar chart so we can attach to the ticket.
(note: 99 = 99th percentile, just as ab returns it)