Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tuning the Erlang VM #33

Open
jlouis opened this issue Feb 14, 2016 · 2 comments
Open

Tuning the Erlang VM #33

jlouis opened this issue Feb 14, 2016 · 2 comments

Comments

@jlouis
Copy link

jlouis commented Feb 14, 2016

Simple standard tunings of the Erlang VM cuts processing time in half here on my Linux Core i7 machine:

erl +P 2000000 +sbt db +sbwt very_long +swt very_low +sub true +Mulmbcs 32767 +Mumbcgs 1 +Musmbcs 2047

This makes the system lock the schedulers to physical cores so your kernel threads are not jumping around like mad. It also tells the VM to allocate carriers for memory in blocks of 32 megabytes and to use 2048 kilobyte blocks inside there. This means you get superpages in the TLB and you have way fewer TLB hits in the long run :)

@witeman
Copy link
Contributor

witeman commented Aug 1, 2016

I am using Erlang v19.0 in Windows 7, i7-5600U, there is no significant difference between your turning parameters and the original one 'erl +P 2000000', original one costs around 1763ms, while your turning one costs around 1700ms.

@jlouis
Copy link
Author

jlouis commented Aug 1, 2016

Two immediate comments:

  • The above won't work in a VM. It requires you have precise control over the "raw steel".
  • I'm quite sure many of those parameters are no-ops on Windows, so you will probably need some Unix-derivative to get these to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants