Erlang Performance Lab

Hello everyone!

Erlang Performance Lab is a tool for developers working with the BEAM, which aims to help with analysis of performance and behaviour of their systems.

Our goal is to provide a tool which will allow folks to see and understand what’s happening inside their systems at first few glances. That’s why we focus on visualising system’s behaviour rather than displaying raw debug information, which may be more detailed, but much harder to comprehend. We strive to make EPL useful for experienced developers, as well as people just getting into the BEAM world. Please note that it’s not meant to be a production-ready monitoring solution, but rather a debugging tool used in your day-to-day development.

Currently our three main “views” are:

  • general node info, memory usage and processes count
  • visualisation of applications’ supervision trees
  • visualisation of network traffic between nodes in a cluster, and visualisation of message passing inside a single node

And a little teaser:

Usage

EPL is portable, meaning you only need Erlang installed on your machine. Then download our prebuilt escript and you’re good to go. You can find download link on our website. To see what it’s all about, follow examples in the README.

Contributing

EPL is completely open-source, and we’d very much appreciate any kind of contributions, be it general usability feedback, finding bugs (:blush:), or developing new views and extending existing ones!

We’re announcing it here today, because just 2 hours ago we merged a pull request, which allows development of backend plugins in Elixir!

Resources

If you have any questions regarding EPL, our vision, roadmap, favourite color, don’t hesitate to ask here or post an issue on Github. :slight_smile:

27 Likes

Ooo this looks fascinating! Thanks for the post!

4 Likes

I’m glad you like it :slight_smile: Have fun and break it!

3 Likes

Looks great :023:

1 Like

I used this in a recent presentation on Elixir to show the clustering features in action … the eye-candy really grabbed people, and I’ll continue to monitor the project as it matures to provide further tools. Thanks to everyone who is working on this!

Another interesting tool in this category that i found (and have also used in presentations :slight_smile: is https://github.com/koudelka/visualixir

2 Likes

Great to hear that you’ve already found it useful!

We’re currently working on polishing existing views. Next on the roadmap are:

  • Drawing flame graphs for the processes
  • Tracking messages received by the process, recording how they affect its state, and drawing it on a “timeline”
3 Likes

Is EPL in coordination with Vizceral (Netflix), or is this something separate?

1 Like

From: erlangpl/README.md at master · erlanglab/erlangpl · GitHub

It takes around 1 minute on stock MacBook 2015 plus dependencies download for the first time. Second time dependencies will be cached.

I’m on a not at all low-end desktop (new, ‘high’-end work developer desktop, 4 cores, hyper-threading, 8gigs of ram, not as good as my home desktop but eh) and its been building for over 15 minutes now… The dots just keep spinning and spinning and spinning…

Join me in the forever-spinning… ^.^

But wow, that is a bit of a nasty build time on the front-end, maybe cache it in the github repo instead, or use a language that does not take forever to compile (*cough*elm*cough*)? :slight_smile:

1 Like

Yes, we’re using Vizceral for cluster and message passing views.

1 Like

That’s, wow, pretty long. Did you consider downloading our prebuilt escript? Or do you really want to compile it manually?

Actually, we have complete setup for writing frontend code with Elm, so extending EPL with Elm is not a problem.

2 Likes

I was just following the instructions from top-to-bottom on the readme in the “Getting Started” section. It is still on that same screen as the animation, coming up on 30 minutes now (it took a few minutes to grab the animation and sync it). I cloned it into another directory too and tried the same thing, its doing the same thing.

I’m not seeing instructions for curl’ing or mix installing the escript on the README.md, is it listed somewhere else?

Yes, you can find download link on our webiste. I should’ve probably made first link in the post point to this page instead of a repository. Let me know if the package works for you :slight_smile:

I’ll add download instructions to the README.

Heh, I never check the website for something when there is a github repo for it… ^.^;

Got it, the escript works, the make build-ui was ‘still’ going so I killed it.

Running it on my test server crashes a few seconds after it connects:

=ERROR REPORT==== 5-Apr-2017::14:26:45 ===
** Generic server epl_st terminating
** Last message in was {data,
                           {'devserver@127.0.0.1',{1491,424005,703000}},
                           [{process_count,337},
                            {memory_total,61696912},
                            {spawn,[]},
                            {exit,[]},
                            {send,
                                [{{#Port<6777.19116>,<6777.421.0>},15,0},
                                 {{#Port<6777.19117>,<6777.420.0>},15,0},
                                 {{#Port<6777.19119>,<6777.419.0>},15,0},
                                 {{#Port<6777.19120>,<6777.418.0>},15,0},
                                 {{#Port<6777.19121>,<6777.417.0>},15,0},
                                 {{#Port<6777.19123>,<6777.416.0>},15,0},
                                 {{#Port<6777.19124>,<6777.415.0>},15,0},
                                 {{#Port<6777.19126>,<6777.414.0>},15,0},
                                 {{#Port<6777.19127>,<6777.413.0>},15,0},
                                 {{#Port<6777.19128>,<6777.412.0>},15,0},
                                 {{#Port<6777.23262>,<6777.567.0>},2,0},
                                 {{<6777.45.0>,<6777.47.0>},0,1},
                                 {{<6777.45.0>,<6777.567.0>},1,0},
                                 {{<6777.567.0>,<6777.572.0>},1,0}]},
                            {send_self,[]},
                            {'receive',
                                [{#Port<6777.19116>,10,130},
                                 {#Port<6777.19117>,10,130},
                                 {#Port<6777.19119>,10,130},
                                 {#Port<6777.19120>,10,130},
                                 {#Port<6777.19121>,10,130},
                                 {#Port<6777.19123>,10,130},
                                 {#Port<6777.19124>,10,130},
                                 {#Port<6777.19126>,10,130},
                                 {#Port<6777.19127>,10,130},
                                 {#Port<6777.19128>,10,130},
                                 {#Port<6777.23262>,2,24},
                                 {<6777.45.0>,1,0},
                                 {<6777.47.0>,1,0},
                                 {<6777.274.0>,5,0},
                                 {<6777.412.0>,15,75},
                                 {<6777.413.0>,15,75},
                                 {<6777.414.0>,15,75},
                                 {<6777.415.0>,15,75},
                                 {<6777.416.0>,15,75},
                                 {<6777.417.0>,15,75},
                                 {<6777.418.0>,15,75},
                                 {<6777.419.0>,15,75},
                                 {<6777.420.0>,15,75},
                                 {<6777.421.0>,15,75},
                                 {<6777.543.0>,3,0},
                                 {<6777.546.0>,3,0},
                                 {<6777.549.0>,4,0},
                                 {<6777.567.0>,2,6}]},
                            {trace,[]}]}
** When Server state == {state,[]}
** Reason for termination ==
** {function_clause,
       [{lists,map,
            [#Fun<epl_st.2.5273273>,
             {'EXIT',
                 {{#{'__exception__' => true,
                     '__struct__' => 'Elixir.RuntimeError',
                     message => <<"attempted to call GenServer :wobserver_metrics but no handle_call/3 clause was provided">>},
                   [{'Elixir.Agent.Server','handle_call (overridable 1)',3,
                        [{file,"lib/gen_server.ex"},{line,559}]},
                    {gen_server,try_handle_call,4,
                        [{file,"gen_server.erl"},{line,615}]},
                    {gen_server,handle_msg,5,
                        [{file,"gen_server.erl"},{line,647}]},
                    {proc_lib,init_p_do_apply,3,
                        [{file,"proc_lib.erl"},{line,247}]}]},
                  {gen_server,call,[<6777.404.0>,which_children,infinity]}}}],
            [{file,"lists.erl"},{line,1238}]},
        {epl_st,generate_sup_tree,1,[{file,"src/epl_st.erl"},{line,105}]},
        {epl_st,'-handle_info/2-fun-0-',2,[{file,"src/epl_st.erl"},{line,76}]},
        {lists,foldl,3,[{file,"lists.erl"},{line,1263}]},
        {epl_st,handle_info,2,[{file,"src/epl_st.erl"},{line,75}]},
        {gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,601}]},
        {gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,667}]},
        {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]}

=INFO REPORT==== 5-Apr-2017::14:26:45 ===
    application: epl_st
    exited: shutdown
    type: temporary

So apparently it crashes if the wobserver is running on the remote node. Connecting it to a different test server seems to work, although as I’m clicking around on the supervisor tree page I get a few errors like:

=ERROR REPORT==== 5-Apr-2017::14:23:59 ===
** Cowboy handler epl_st_EPL terminating in websocket_handle/3
   for the reason error:badarg
** Message was {text,<<"<6777.435.0>">>}
** Options were []
** Handler state was undefined_state

Quite pretty and responsive though! Any chance of some text labels on the supervisor tree graph?

Yes, we’re now focusing on extending existing views, including supervision trees. Can you create relevant issues in our repository? About errors you’ve encountered and functionality you’d like to see.

I can’t promise we’ll be super fast with resolving those issues, but we’ll do our best :slight_smile:

Reported, and no worry. :slight_smile:

I’m not using wobserver on my big project due to its lack of security, and the little crashes did not seem to affect the usability in my quick testing, so all good. :slight_smile:

1 Like

Since the usage and UI could be really similar to the visualisation tools for Kubernetes, you might want to have a look at Weave Scope, a visualisation tool for docker containers (inside a Kubernetes cluster).

1 Like

I’ve just published a blog post which presents an interesting ErlangPL use case. Here is the link: https://medium.com/@mentel.kk/using-erlang-performance-lab-with-a-real-project-f101f39619c7
I encourage you to read it! :slight_smile:

3 Likes