Skip to content

Instantly share code, notes, and snippets.

View matthiasl's full-sized avatar

Matthias Lang matthiasl

View GitHub Profile
@matthiasl
matthiasl / schedule.erl
Created October 7, 2022 15:37
Code which demonstrates a process getting starved in R15 and earlier
%% Throwaway to investigate how long gzipping a logfile freezes out
%% other processes.
%%
%% Typical run
%% -----------
%%
%% /usr/local/src/otp_src_R14B03/bin/erl -smp disable -s schedule go -s init stop
%% This leaves a logfile, 'erlang_timestamps.txt' which shows that the
%% 'sleeper()' process doesn't get any CPU time for about 700 milliseconds.
%% Ideally, sleeper() gets CPU every 10 ms or so.