Decentralized ETS Counters for Better Scalability
Erlang - Ericsson OTP Team Blog
by Kjell Winblad
2y ago
A shared Erlang Term Storage (ETS) table is often an excellent place to store data that is updated and read from multiple Erlang processes frequently. ETS provides key-value stores to Erlang processes. When the write_concurrency option is activated, ETS tables use fine-grained locking internally. Therefore, a scenario where multiple processes insert and remove different items in an ETS table should scale well with the number of utilized cores. Unfortunately, in practice, the scalability for such scenarios is not yet perfect. However, the ETS table option decentralized_counters (introduced in E ..read more
Visit website
Erlang/OTP 24 Highlights
Erlang - Ericsson OTP Team Blog
by Lukas Larsson
2y ago
Finally Erlang/OTP 24 is here! A release that for me has been about 10 years in the making. As is tradition by now, this blog post will go through the additions to Erlang/OTP that I am most excited about! Erlang/OTP 24 includes contributions from 60+ external contributors totalling 1400+ commits, 300+ PRs and changing 0.5 million(!) lines of code. Though I’m not sure the line number should count as we vendored all of AsmJit and re-generated the wxWidgets support. If we ignore AsmJit and wx, there are still 260k lines of code added and 320k lines removed, which is about 100k more than what our ..read more
Visit website
A few notes on message passing
Erlang - Ericsson OTP Team Blog
by John Högberg
2y ago
Message passing has always been central to Erlang, and while reasonably well-documented we’ve avoided going into too much detail to give us more freedom when implementing it. There’s nothing preventing us from describing it in a blog post though, so let’s have a closer look! Erlang processes communicate with each other by sending each other signals (not to be confused with Unix signals). There are many different kinds and messages are just the most common. Practically everything involving more than one process uses signals internally: for example, the link/1 function is implemented by having t ..read more
Visit website
The Road to the JIT
Erlang - Ericsson OTP Team Blog
by Björn Gustavsson
2y ago
As long as Erlang has existed, there has always been the need and the ambition to make it faster. This blog post is a history lesson that outlines the major Erlang implementations and attempts to improve the performance of Erlang. The Prolog interpreter The first version of Erlang was implemented in Prolog in 1986. That version of Erlang was too slow for creating real applications, but it was useful for finding out which features of the language were useful and which were not. New language features could be added or deleted in a matter of hours or days. It soon became clear that Erlang needed ..read more
Visit website
Further adventures in the JIT
Erlang - Ericsson OTP Team Blog
by John Högberg
2y ago
This post continues our adventures in the JIT, digging a bit deeper into the implementation details. While writing things in machine code (assembler) gives you great freedom it comes at the cost of having to invent almost everything yourself, and there’s no clever compiler to help you catch mistakes. For example, if you call a function in a certain manner and said function doesn’t expect that, you’ll crash your OS process at best or spend hours chasing a heisenbug at worst. Hence, conventions are always front and center when writing assembler, so we need to visit some of the ones we’ve chosen ..read more
Visit website
A first look at the JIT
Erlang - Ericsson OTP Team Blog
by John Högberg
2y ago
Now that we’ve had a look at BEAM and the interpreter we’re going to explore one of the most exciting additions in OTP 24: the just-in-time compiler, or “JIT” for short. If you’re like me the word “JIT” probably makes you think of Hotspot (Java) or V8 (Javascript). These are very impressive pieces of engineering but they seem to have hijacked the term; not all JITs are that sophisticated, nor do they have to be in order to be fast. We’ve made many attempts at a JIT over the years that aimed for the stars only to fall down. Our latest and by far most successful attempt went for simplicity inste ..read more
Visit website
A closer look at the interpreter
Erlang - Ericsson OTP Team Blog
by John Högberg
2y ago
In my previous post we had a look at BEAM, and now that we’re more familiar with it it’s time for us to look at the reference implementation: the interpreter. The interpreter can be thought of as an endless loop that looks at the current instruction, executes it, and then moves on to the next one. In normal builds our code is laid out as directly threaded code, where each instruction consists of the machine code address of its handler, followed by its arguments, which are in turn followed by the next instruction: Instruction address First argument Second argument ... and so on. I ..read more
Visit website
A brief introduction to BEAM
Erlang - Ericsson OTP Team Blog
by John Högberg
2y ago
This post is a brief primer on BEAM, the virtual machine that executes user code in the Erlang Runtime System (ERTS). It’s intended to help those new to BEAM follow an upcoming series of posts about the JIT in OTP 24, leaving implementation details for later. BEAM is often confused with ERTS and it’s important to distinguish between the two; BEAM is just the virtual machine and it has no notion of processes, ports, ETS tables, and so on. It merely executes instructions and while ERTS has influenced their design, it doesn’t affect what they do when the code is running, so you don’t need to unde ..read more
Visit website
The New Scalable ETS ordered_set
Erlang - Ericsson OTP Team Blog
by Kjell Winblad
2y ago
The scalability of ETS tables of type ordered_set with the write_concurrency option is substantially better in Erlang/OTP 22 than earlier releases. In some extreme cases, you can expect more than 100 times better throughput in Erlang/OTP 22 compared to Erlang/OTP 21. The cause of this improvement is a new data structure called the contention adapting search tree (CA tree for short). This blog post will give you insights into how the CA tree works and show you benchmark results comparing the performance of ETS ordered_set tables in OTP 21 and OTP 22. Try it Out! This escript makes it convenient ..read more
Visit website
OTP 23 Highlights
Erlang - Ericsson OTP Team Blog
by Kenneth Lundin
2y ago
OTP 23 has just been released (May 13:th 2020). It has been a long process with three release candidates in February, March and April before the final release. We are very thankful for the feedback we have got regarding the release candidates, which has revealed some bugs and flaws that our internal testing did not find. This blog post will describe some highlights of what is new in OTP 23. You can download the readme describing the changes here: OTP 23 Readme. Or, as always, look at the release notes of the application you are interested in. For instance here: OTP 23 Erts Release Notes. Langu ..read more
Visit website

Follow Erlang - Ericsson OTP Team Blog on FeedSpot

Continue with Google
Continue with Apple
OR