Ruby 2.6.1 will speed Discourse up!

I have been investigating general performance today and was very pleasantly surprised to see the new version of ruby (2.6.1) both reduces memory usage AND speeds up Discourse.

In particular, looking at Discourse bench:

RSS is reduced from 293332 to 262140 bytes!

Median request time

route 2.5.3 (ms) 2.6.1 (ms) change
categories 41 39 4.88%
home 46 43 6.52%
topic 54 48 11.11%
categories_admin 70 65 7.14%
home_admin 72 67 6.94%
topic_admin 82 77 6.10%

75th percentile

route 2.5.3 2.6.1 change
categories 42 41 2.38%
home 50 46 8.00%
topic 59 51 13.56%
categories_admin 75 76 -1.33%
home_admin 78 77 1.28%
topic_admin 85 83 2.35%

90th percentile

route 2.5.3 2.6.1 change
categories 49 52 -6.12%
home 56 56 0.00%
topic 62 61 1.61%
categories_admin 82 81 1.22%
home_admin 84 82 2.38%
topic_admin 93 92 1.08%

99th percentile

route 2.5.3 2.6.1 change
categories 58 81 -39.66%
home 81 108 -33.33%
topic 76 88 -15.79%
categories_admin 105 132 -25.71%
home_admin 115 132 -14.78%
topic_admin 123 142 -15.45%

It is going to take us a bit of time prior to upgrading to 2.6.1, we will probably switch over in 2-3 months. We also still need to validate these results on rubybench.org. That said these initial results are incredibly promising.

We will be usually expecting 7% improvement however our 1 in 100 requests will suffer a 15-40% slowdown. My interpretation of the results is that the runtime has gotten faster, but the major GC time has become a bit slower.

35 Likes