Comparing the fairness and real-time performance of schedulers in Erlang and Go

Hi, I’ve created a new repository on GitHub to compare the fairness and real-time performance of schedulers in Erlang and Go. Feel free to check it out!

This repository contains a comparative analysis of the scheduling fairness and real-time performance between Golang and Erlang. The tests demonstrate that Golang’s goroutine scheduler performs poorly - it’s crude, unfair, and lacks good real-time characteristics. In contrast, Erlang’s scheduler proves significantly superior in both fairness and real-time performance!

9 Likes

This looks like a fun experiment!

For clarity, do you think you could explain the results more explicitly? What should one expect from a “perfectly fair” scheduler? And how do the results specifically show that Erlang’s results exhibit “more fairness” than Go’s?

Also, perhaps text files with the actual results would be beneficial. Screenshots of small samples make the overall conclusion unverifiable.

I don’t think the “lockstep” behavior you observed in Erlang is realistic or even desired. Also I cannot reproduce it; are you using a non-SMP run time? I do not have a go setup to test out the Go. version, but I suspect your Go result is also too in-sync-y for some reason.

I have:

erlang…work2 cnt: 894
erlang…work1 cnt: 674
erlang…work2 cnt: 895
erlang…work1 cnt: 675
erlang…work2 cnt: 896
^C

My erlang is:

derek@roastidious:~/projects/tt$ erl
Erlang/OTP 26 [erts-14.1] [source] [32-bit] [smp:32:4] [ds:32:4:10] [async-threads:1]

Eshell V14.1 (press Ctrl+G to abort, type help(). for help)
1>