[erlang-questions] My frustration with Erlang

Mikael Pettersson <>
Sat Sep 13 21:22:03 CEST 2008

Paul Fisher writes:
 > Joel Reymont wrote:
 > > These are gen_server call timeouts when requests for game information
 > > take longer than the default 5 seconds. I have an average of 5 players
 > > per game so this is not because a large number of processes are trying
 > > to access the game.
 > > 
 > > I suppose this is a reflection of the load on the system, although CPU
 > > usage never goes past 300% which tells me that no more than 3 cores
 > > are used by Erlang.
 > We have a system with a completely different workload profile, but our 
 > initial testing has indicated a SMP scaling barrier, such that scaling 
 > beyond 4 cores (on x86-64 linux 2.6.24 w/R12-3) deteriorate quickly.
 > My very preliminary in investigations indicated a substantial number of 
 > futex system calls (which should happen only on contended locks which 
 > need kernel arbitrartion) as the work scaled toward 4 cores.  I had 
 > initially thought that this was related to the amount of work we perform 
 > in linked in drivers via async threads, but some more current 
 > information indicates that this might be more core scheduler related.

You might get more help debugging this if you provided code
which triggers the problem. Obviously not your proprietary code,
but something that stresses the Erlang system in the same way.

The Erlang system doesn't do any explicit futex ops on it's own.
But glibc's pthread lock ops will do futex ops in their slow paths.

More information about the erlang-questions mailing list