[erlang-questions] erlang performance

Tony Rogvall tony@REDACTED
Thu May 15 12:33:26 CEST 2014


This is fantastics work. Really nice.

For Joe may I suggest to use the github.com/tonyrog/beam (or similar),
a beam emulator written in Erlang, and perform simulations instead.
The number of registers and memory cache size and speed will vary anyway.
With a simulator you can change all parameters without getting your hands dirty :-)

The beam emulator is not complete and do/will only cover the external instructions.
That does not stop anyone from implementing the loader and the internal instructions
as well.

/Tony



On 15 maj 2014, at 10:07, Lukas Larsson <lukas@REDACTED> wrote:

> Hello,
> 
> On Wed, May 14, 2014 at 10:26 PM, Joe Armstrong <erlang@REDACTED> wrote:
> 
> I'd like a have a rough idea of the average number of memory fetches and
> stores per Beam instruction and per Erlang reduction.
> 
> 
> I recently did some digging into optimizing the code for the emulator and created a tool that extracts the c-code and assembler output for each instruction in beam. I did the checks for both PowerPC[1] and x86[2]. From this you should be able to parse out how many fetches and stores each instruction does. I don't know how many instructions there normally is per function, but if you just take some random code and use erts_debug:df(Module) you will get a file with one instruction per line and then you can extrapolate. 
> 
> I'm not sure what kind of performance indicator this will be though as you have to know the cache hit rate and memory latency as well to judge how long time each instruction takes. Also normally I've found that an Erlang application spends about 50% of it's time executing code outside the emulator loop (ets, gc, bifs etc).
> 
> Lukas
> 
>    [1]: https://dl.dropboxusercontent.com/u/6250179/asm_comparison_ppc.html (download file for css to work, the new part is after some optimizations I did for ppc only)
>    [2]: https://dl.dropboxusercontent.com/u/6250179/asm_x86.html (download file for css to work)
> 
>  
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

"Installing applications can lead to corruption over time. Applications gradually write over each other's libraries, partial upgrades occur, user and system errors happen, and minute changes may be unnoticeable and difficult to fix"



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140515/30be3b95/attachment.htm>


More information about the erlang-questions mailing list