Search code examples
erlangemulationerl

What do the Erlang emulator info statements mean?


When I start up my Erlang emulator, there the first bit has a bunch of informational things. (Slightly reformatted for effect.)

manoa:~ stu$ erl
Erlang (BEAM) emulator version 5.6.5 
[source] [smp:2] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.6.5 (abort with ^G)
1> 

Some of it I can guess at, probably accurate, but some of it means 'here be magic'.

  • Erlang (BEAM) emulator version 5.6.5: the version, of course
  • [source]: the emulator was compiled from source?
  • [smp:2]: two CPU cores detected and available
  • [async-threads:0]: currently running jobs?
  • [hipe]: ?
  • [kernel-poll:false]: ?

I also wonder if there are other [foo] items that may pop up with different configurations, builds or start up parameters.

So, what do the Erlang emulator info statements mean?


Solution

  • [async-threads:0]

    Size of async thread pool available for loaded drivers to use. This allows blocking syscalls to be performed in a separate kernel thread from the beam vm. Use command switch +A N to adjust the size of the pool.

    [hipe]

    Support for native compilation of erlang source and bytecode. Tends to mostly be useful for number crunching code. IO-bound code do fine on the bytecode interpreter.

    [kernel-poll:false]

    There is the old select(2) and poll(2) system calls for receiving notification that some file descriptor is ready for unblocking writing or reading. They do not scale well to high number of open file descriptors. Modern operatingsystems have alternative interfaces, linux has epoll, freebsd has kqueue. Enable with command switch +K true