Performance and analysis tools

Hello,

I’m looking for performance and analysis tools for my Erlang program which can give me real time information such as:

  • Memory usage
  • CPU usage (Percentage per core)
  • Processes count per core
  • Others…

Sugestions?

Thanks!

3 Likes

Benchee is the most popular benchmarking tool: https://github.com/bencheeorg/benchee and I think it will get you most of what you want.

4 Likes

As you’ve asked for real time information, such as process count per core, I’m assuming you’re asking for monitoring tools rather than benchmarking. Erlang comes with some built in tools, there’s also some you can add through hex.

etop

Command: :etop.start

Starts an in terminal UI similar to the unix top command. Does for processes in the VM what top does for processes in eg a linux system.

http://erlang.org/doc/man/etop.html

observer

Command: :observer.start

Starts a windowed application that displays a huge amount of information on the running VM, including memory, processes, load, process trees, and lots of other stuff.

http://erlang.org/doc/man/observer.html

observer-cli

An upgraded version of etop with lots of information, can be installed through hex. Possible to run remotely.

recon

This is a collection of tools used to get more information on your system, useful for debugging problematic systems.

12 Likes

You also have the builtin erlang profiling tools mentioned here: http://erlang.org/doc/efficiency_guide/profiling.html

I’ve used fprof together with erlgrind on many erlang projects but I think they should be usable in elixir as well

4 Likes

So yes benchee is more for measuring performance before something goes live or for testing out multiple approaches locally, from what I understand you want to have more of an introspection into the running system. @jola offered multiple great solutions there.

Adopting Elixir, which is great, has a chapter about Metrics and instrumenting your system.

Other projects they mention as being used in the wild:

I like whole Application Performance Monitoring Solutions in the SaaS space such as:

And for even more options you could take a look at some of our previous threads on the subject:

5 Likes

There also is OpenCensus for Erlang that has few integrations already and is provider agnostic. Telemetry.Metrics provides OC-inspired set of metrics as well.

And please, could we stop promoting that abomination of library called exometer? It sends shivers down my spine on just mention. Not only it was hellhole to compile it with Mix it also is highly outdated (really, no metric tags in 2019?). There are much better and simpler solutions already available (for example vmstats and statix for the example). And with raise of the telemetry tracking metrics will be even easier.

6 Likes

I’ve never used exometer so I couldn’t tell, but calling a library an “abomination” isn’t the right way to go or talk about open source libraries. People took care and time to build it offering it to you for free - nobody forces you to use it. You could even improve it. You have your reasons for not using it, that’s fine but you don’t have to resort to insults. That’s what contributes to burnout for maintainers & others. Also that’s really not something I want to see as a tone in the community as it also keeps people away from open source, as they are often afraid of that exact thing happening to them.

Never mind that the library is mentioned positively in a book (again Adopting Elixir) written by people respected by lots of us which was published about a year ago and where one of the authors is a lead developer at a big elixir company (bleacher report) using exometer apparently happily (otherwise I doubt he’d have included it in the book). Might not work for you, but might work for others.

4 Likes

NewRelic does have an Elixir agent…

6 Likes

Interesting, I didn’t know and always wondered why they didn’t have one :scream:

Thanks for letting us know!

1 Like