rm-rf-etc

rm-rf-etc

I’m not much of a hardware buff, so please excuse my ignorance.

Let’s say I want to build a machine to maximize the performance of some arbitrary elixir service that I’ve built; does it make sense to simply add more cores to scale up the amount of concurrent processes my elixir-based service can parallelize? Does it scale linearly? How should I go about determining the optimum number of cores for my project?

Let’s say, for example, that I have somewhere between 10 and 30 genserver instances subscribed to some external service via websocket (each having its own dedicated websocket), and then I also have some additional processes for my frontend and things like the supervisor. And this is just an arbitrary example for the sake of discussion.

Thanks

Showing Posts 1 to 3

Exadra37

Exadra37

Maybe reading this article will help:

If you have been paying attention on Twitter recently, you have likely seen some increasing numbers regarding the number of simultaneous connections the Phoenix web framework can handle. This post documents some of the techniques used to perform the benchmarks.

or maybe you prefer to see this conference talk about it:

Both of them will give you more insights into what you are trying to understand, but will not give you a formula :wink:

dimitarvp

dimitarvp

In a normal high-performance language like Rust I’d say look for some parity between CPU cores and memory channels. F.ex. having 10 CPU cores (20 threads) and a 4-channel memory can make the machine not use its full potential in very memory-intensive apps – of which there aren’t that many, to be fair.

With a language like Elixir though you could easily have a 64-core CPU even with 4-channel memory (like the Threadripper 3990X) because Elixir is not a high-performance language and you’d likely want Elixir for I/O bound workflows because its green-thread preemptive concurrency model will net you insane benefits.

So if you want to focus on Elixir then you can get a lot of cores even if they are a bit slower.

al2o3cr

al2o3cr

The “getting to 1M websockets” stuff is 1000% worth reading / watching, but the big takeaway from that work is pretty simple: the way you figure out these things is to MEASURE.

— All posts loaded —

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 94592 917
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
heathen
Quite interesting article Google brought me. Didn’t find any mentions about it here. What do you think in general? Would you use togethe...
New
maennchen
:warning: Security advisory: Decimal DoS vulnerability A vulnerability has been published for decimal where very large exponents can cau...
New
marciol
It would be helpful to have a list of companies worldwide that hire engineers without prior experience in Elixir. Often, it can be quite ...
New
durvia
Anyone running long-lived stateful processes on BEAM? We’re building an AI agent runtime and would love to compare notes. We’re a small ...
New

Other Trending Topics Top

marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
webofbits
Aludel - LLM Evaluation Workbench Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews