mickel8

mickel8

Membrane Core Team

Beamchmark - tool for measuring BEAM performance

Hi,
Beamchmark is a very simple tool for measuring BEAM performance.
Sometimes when you want to check how busy is your EVM it might be better to check its schedulers utilization instead of CPU usage provided e.g. by htop. This is beacause of schedulers busy waiting.

You can specify custom scenario by implementing Beamchmark.Scenario behaviour.
Next, Beamchmark will measure BEAM performance (at the moment scheduler utilization, context switches and reductions) while running this scenario.
When running for the second time it will also compare current results with the previous ones.

We use it for measuring video conference system performance.

You can check it out under GitHub - membraneframework/beamchmark: Elixir tool for benchmarking EVM performance · GitHub

Example output

================
SYSTEM INFO
================

System version: Erlang/OTP 24 [erts-12.0] [source] [64-bit] [smp:64:64] [ds:64:64:10] [async-threads:1] [jit]
System arch: x86_64-pc-linux-gnu
NIF version: 2.16

================
BASE
================

Normal schedulers
--------------------
16 0.12332162915531408 12.3%
18 0.11722485535815715 11.7%
54 5.032564790559668e-6 0.0%
5 0.12924638166306135 12.9%
19 0.11832582564937888 11.8%
42 0.10761756740560681 10.8%
27 0.09217876193705123 9.2%
49 0.044102097083953525 4.4%
62 2.1700132428583926e-5 0.0%
56 5.13526535806117e-6 0.0%
35 0.11343372764090544 11.3%
10 0.12592799368513882 12.6%
24 0.09445682751448983 9.4%
50 0.007215266765866991 0.7%
53 5.831814229859165e-6 0.0%
36 0.11795585709316166 11.8%
4 0.13320479706823643 13.3%
21 0.11916323114808863 11.9%
52 6.048572589380919e-6 0.0%
22 0.11839551487569377 11.8%
17 0.1146888235904518 11.5%
55 7.401888888771653e-6 0.0%
58 5.457144203623767e-6 0.0%
3 0.10351742825669948 10.4%
8 0.12687996095950224 12.7%
1 0.139757648063115 14.0%
7 0.11675491327932552 11.7%
2 0.13038384886731064 13.0%
60 5.4813951497368795e-6 0.0%
14 0.12273367212149136 12.3%
15 0.12623944357439068 12.6%
20 0.11647546069579101 11.6%
41 0.10742868119026028 10.7%
40 0.09643592886662816 9.6%
59 5.221452399409748e-6 0.0%
13 0.12229514501569524 12.2%
38 0.11958099183445867 12.0%
51 0.003301180300997468 0.3%
6 0.13223338383518576 13.2%
64 6.414434547506458e-6 0.0%
28 0.11555683092723558 11.6%
25 0.1148205815011423 11.5%
34 0.10963802380435157 11.0%
32 0.11351149079901764 11.4%
9 0.1302195658050994 13.0%
37 0.1030777426340972 10.3%
11 0.12248292296180183 12.2%
31 0.09712795112394824 9.7%
46 0.08673162179260727 8.7%
63 1.4286599569948833e-5 0.0%
26 0.11565643722504804 11.6%
57 5.658058349094716e-6 0.0%
48 0.049119085089049976 4.9%
45 0.09384519414615936 9.4%
39 0.11796164946445747 11.8%
43 0.09566901886800855 9.6%
30 0.11353305704473911 11.4%
61 5.8769432955532854e-5 0.0%
47 0.06787424714208626 6.8%
29 0.11903822824147328 11.9%
23 0.11543367635169725 11.5%
44 0.10037409897053118 10.0%
12 0.12242256044427376 12.2%
33 0.11358235119101953 11.4%
Total: 0.0852860252934174 8.5%

CPU schedulers
--------------------
107 0.0 0.0%
115 0.0 0.0%
79 0.0 0.0%
118 0.0 0.0%
114 0.0 0.0%
101 0.0 0.0%
65 0.0 0.0%
106 0.0 0.0%
93 0.0 0.0%
67 0.0 0.0%
92 0.0 0.0%
94 0.0 0.0%
84 0.0 0.0%
125 0.0 0.0%
121 0.0 0.0%
127 0.0 0.0%
105 0.0 0.0%
102 0.0 0.0%
70 0.0 0.0%
66 0.0 0.0%
82 0.0 0.0%
119 0.0 0.0%
128 0.011159736402495195 1.1%
96 0.0 0.0%
87 0.0 0.0%
111 0.0 0.0%
90 0.0 0.0%
75 0.0 0.0%
104 0.0 0.0%
97 0.0 0.0%
112 0.0 0.0%
99 0.0 0.0%
74 0.0 0.0%
83 0.0 0.0%
122 0.0 0.0%
103 0.0 0.0%
108 0.0 0.0%
78 0.0 0.0%
95 0.0 0.0%
77 0.0 0.0%
123 0.0 0.0%
126 0.0 0.0%
80 0.0 0.0%
116 0.0 0.0%
86 0.0 0.0%
68 0.0 0.0%
110 0.0 0.0%
72 0.0 0.0%
109 0.0 0.0%
120 0.0 0.0%
91 0.0 0.0%
85 0.0 0.0%
76 0.0 0.0%
81 0.0 0.0%
98 0.0 0.0%
71 0.0 0.0%
100 0.0 0.0%
88 0.0 0.0%
69 0.0 0.0%
113 0.0 0.0%
89 0.0 0.0%
124 0.0 0.0%
73 0.0 0.0%
117 0.0 0.0%
Total: 1.7437088128898742e-4 0.0%

IO schedulers
--------------------

Total: 0 0%

Weighted
--------------------
0.08546067401497172 8.5%

Reductions
--------------------
4366438896

Context Switches
--------------------
8225771

================
NEW
================

Normal schedulers
--------------------
16 0.12766651841366977 12.8%  0.004344889258355689 4.0650406504064875%
18 0.12623933654184297 12.6%  0.009014481183685821 7.692307692307693%
54 0.026166548572311002 2.6%  0.026161516007520442 nan
5 0.14226038117153825 14.2%  0.013013999508476898 10.077519379844958%
19 0.12847107569758381 12.8%  0.010145250048204935 8.474576271186436%
42 0.11021637228759568 11.0%  0.002598804881988867 1.8518518518518334%
27 0.1232729579903922 12.3%  0.031094196053340975 33.69565217391306%
49 0.07450088988044047 7.5%  0.030398792796486947 70.45454545454544%
62 2.9401778752875332e-5 0.0%  7.701646324291406e-6 0%
56 0.02162994663543132 2.2%  0.021624811370073257 nan
35 0.12426093977160607 12.4%  0.010827212130700634 9.73451327433628%
10 0.1361110112567493 13.6%  0.01018301757161047 7.936507936507937%
24 0.11719365680914552 11.7%  0.02273682929465569 24.468085106382958%
50 0.050825721877617365 5.1%  0.04361045511175037 628.5714285714286%
53 0.03408978501003332 3.4%  0.03408395319580346 nan
36 0.12342016919919341 12.3%  0.005464312106031752 4.237288135593204%
4 0.14366101310290186 14.4%  0.010456216034665428 8.27067669172932%
21 0.12709412012556964 12.7%  0.00793088897748101 6.722689075630257%
52 0.04115423686939777 4.1%  0.04114818829680839 nan
22 0.11543268867946113 11.5%  -0.002962826196232643 -2.5423728813559308%
17 0.128400422848902 12.8%  0.013711599258450197 11.304347826086953%
55 0.02559172514938536 2.6%  0.02558432326049659 nan
58 4.938630557421869e-6 0.0%  -5.185136462018979e-7 0%
3 0.14014341178404496 14.0%  0.03662598352734549 34.61538461538461%
8 0.13402840171689867 13.4%  0.007148440757396429 5.511811023622059%
1 0.14353265852664854 14.4%  0.00377501046353354 2.8571428571428754%
7 0.1374798372208734 13.7%  0.020724923941547874 17.094017094017104%
2 0.14229811712057377 14.2%  0.011914268253263138 9.230769230769226%
60 3.2152322592158207e-5 0.0%  2.6670927442421327e-5 0%
14 0.12821854813041064 12.8%  0.005484876008919282 4.0650406504064875%
15 0.12705768349676053 12.7%  8.182399223698456e-4 0.7936507936507837%
20 0.12662701574540447 12.7%  0.010151555049613459 9.482758620689651%
41 0.11837240258880774 11.8%  0.010943721398547462 10.28037383177572%
40 0.11923249339699626 11.9%  0.022796564530368102 23.958333333333343%
59 5.114110179140922e-6 0.0%  -1.0734222026882545e-7 0%
13 0.130044321423 13.0%  0.007749176407304742 6.557377049180332%
38 0.12064154327712961 12.1%  0.0010605514426709484 0.8333333333333286%
51 0.04859227973756821 4.9%  0.04529109943657074 1533.3333333333335%
6 0.13733284994722608 13.7%  0.005099466112040318 3.787878787878782%
64 2.6515179658314175e-5 0.0%  2.0100745110807717e-5 0%
28 0.11744776457160935 11.7%  0.001890933644373774 0.8620689655172384%
25 0.12569764159572772 12.6%  0.010877060094585417 9.565217391304344%
34 0.1199291686759884 12.0%  0.010291144871636834 9.09090909090908%
32 0.1225474786594902 12.3%  0.009035987860472564 7.89473684210526%
9 0.1384851750256562 13.8%  0.008265609220556774 6.15384615384616%
37 0.12741701264261787 12.7%  0.024339270008520666 23.300970873786397%
11 0.13128593244945397 13.1%  0.008803009487652141 7.377049180327873%
31 0.12057088337993159 12.1%  0.023442932255983345 24.74226804123711%
46 0.10500569293164506 10.5%  0.018274071139037798 20.689655172413808%
63 1.167241607526052e-4 0.0%  1.0243756118265637e-4 0%
26 0.12178516843570256 12.2%  0.00612873121065452 5.172413793103445%
57 0.016000276292433044 1.6%  0.01599461823408395 nan
48 0.09175904589482825 9.2%  0.042639960805778275 87.7551020408163%
45 0.11498491982685588 11.5%  0.021139725680696525 22.34042553191489%
39 0.1077791634478798 10.8%  -0.010182486016577674 -8.474576271186436%
43 0.09783116312881152 9.8%  0.0021621442608029673 2.083333333333343%
30 0.12384280759898027 12.4%  0.01030975055424116 8.771929824561411%
61 1.3514800354046263e-5 0.0%  -4.525463260148659e-5 0%
47 0.1073233698085129 10.7%  0.03944912266642664 57.35294117647058%
29 0.12471059912939608 12.5%  0.005672370887922801 5.0420168067227%
23 0.12183976809307168 12.2%  0.006406091741374423 6.086956521739111%
44 0.11603537117086218 11.6%  0.015661272200331006 15.999999999999986%
12 0.13437942534565117 13.4%  0.011956864901377415 9.836065573770497%
33 0.11744473188373031 11.7%  0.0038623806927107762 2.6315789473684106%
Total: 0.09852487504648118 9.9%  0.013238849753063775 16.47058823529413%

CPU schedulers
--------------------
107 0.0 0.0%  0.0 0%
115 0.0 0.0%  0.0 0%
79 0.0 0.0%  0.0 0%
118 0.0 0.0%  0.0 0%
114 0.0 0.0%  0.0 0%
101 0.0 0.0%  0.0 0%
65 0.0 0.0%  0.0 0%
106 0.0 0.0%  0.0 0%
93 0.0 0.0%  0.0 0%
67 0.0 0.0%  0.0 0%
92 0.0 0.0%  0.0 0%
94 0.0 0.0%  0.0 0%
84 0.0 0.0%  0.0 0%
125 0.0 0.0%  0.0 0%
121 0.0 0.0%  0.0 0%
127 0.009551413063225432 1.0%  0.009551413063225432 nan
105 0.0 0.0%  0.0 0%
102 0.0 0.0%  0.0 0%
70 0.0 0.0%  0.0 0%
66 0.0 0.0%  0.0 0%
82 0.0 0.0%  0.0 0%
119 0.0 0.0%  0.0 0%
128 0.002978445402194614 0.3%  -0.008181291000300581 -72.72727272727273%
96 0.0 0.0%  0.0 0%
87 0.0 0.0%  0.0 0%
111 0.0 0.0%  0.0 0%
90 0.0 0.0%  0.0 0%
75 0.0 0.0%  0.0 0%
104 0.0 0.0%  0.0 0%
97 0.0 0.0%  0.0 0%
112 0.0 0.0%  0.0 0%
99 0.0 0.0%  0.0 0%
74 0.0 0.0%  0.0 0%
83 0.0 0.0%  0.0 0%
122 0.0 0.0%  0.0 0%
103 0.0 0.0%  0.0 0%
108 0.0 0.0%  0.0 0%
78 0.0 0.0%  0.0 0%
95 0.0 0.0%  0.0 0%
77 0.0 0.0%  0.0 0%
123 0.0 0.0%  0.0 0%
126 0.0 0.0%  0.0 0%
80 0.0 0.0%  0.0 0%
116 0.0 0.0%  0.0 0%
86 0.0 0.0%  0.0 0%
68 0.0 0.0%  0.0 0%
110 0.0 0.0%  0.0 0%
72 0.0 0.0%  0.0 0%
109 0.0 0.0%  0.0 0%
120 0.0 0.0%  0.0 0%
91 0.0 0.0%  0.0 0%
85 0.0 0.0%  0.0 0%
76 0.0 0.0%  0.0 0%
81 0.0 0.0%  0.0 0%
98 0.0 0.0%  0.0 0%
71 0.0 0.0%  0.0 0%
100 0.0 0.0%  0.0 0%
88 0.0 0.0%  0.0 0%
69 0.0 0.0%  0.0 0%
113 0.0 0.0%  0.0 0%
89 0.0 0.0%  0.0 0%
124 0.0 0.0%  0.0 0%
73 0.0 0.0%  0.0 0%
117 0.0 0.0%  0.0 0%
Total: 1.9577903852218822e-4 0.0%  2.1408157233200793e-5 0%

IO schedulers
--------------------

Total: 0 0%  0 0%

Weighted
--------------------
0.09872065828564532 9.9%  0.013259984270673597 16.47058823529413%

Reductions
--------------------
4959999777  593560881 13.593706339134812%

Context Switches
--------------------
12898957  4673186 56.81152563084967%

Results successfully saved to "/tmp/videoroom_benchmark/new" directory

First Post!

cmo

cmo

10 points for a wonderful package name :upside_down_face:

Most Liked

balins

balins

Hi folks,
I’m happy to announce that version 1.0.0 of Beamchmark has been released!
In the latest release, we made it possible to customize Beamchmark’s output with so-called formatters, which are modules implementing Beamchmark.Formatter behaviour. Apart from the already used console output, Beamchmark now ships with an HTML formatter, which you can use to display graphical reports.

Check the library out at GitHub or hex.pm!

mickel8

mickel8

Membrane Core Team

v1.1.0

Hi!
Beamchmark is growing, and today we are announcing version 1.1.0, with CPU Usage measurements implementation.

Now you can measure and compare both schedulers and CPU utilization.

You can check it out there:

Example output:

shuntrho

shuntrho

v.1.4.0

Hi everyone!
We are happy to announce release 1.4.0 of Beamchmark. It comes with a very useful feature, allowing to attach to and perform a benchmark of an already running Elixir application.
We also added measuring of memory utilization and fixed a few issues with plots.

Check it out on GitHub and hex.pm!

Where Next?

Popular in Announcing Top

grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 54260 488
New
mischov
import Meeseeks.CSS html = HTTPoison.get!("https://news.ycombinator.com/").body for story <- Meeseeks.all(html, css("tr.athing")) do...
New
josevalim
Yes, yet another parser combinator library! Most of the parser combinators in the ecosystem are either compile-time, often using AST tra...
159 19951 141
New
mbuhot
Leverage Open Api 3.0 (Swagger) to document, test, validate and explore your Plug and Phoenix APIs. Generate and serve a JSON Open API ...
New
josevalim
Hi everyone, We would like to announce that Plataformatec is working on a new MySQL driver called MyXQL. Our goal is to eventually integ...
New
RobertDober
Earmark is a pure-Elixir Markdown converter. It is intended to be used as a library (just call Earmark.as_html), but can also be used as...
239 12978 134
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 44265 214
New

Other popular topics Top

vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 40165 209
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement