Overview

Startup an Erlang shell and compile the code:
c(relay).
c(led).

Create a process that will handle (the fake) LEDs:
Led = led:start(5).

Create a ring of 10000 processes and connect the head to the Led process just created:
Head = relay:create_ring(10000,Led,[]).

Send a number to the head indicating the number of loops the token has to make:
Head ! 100.

This step can be repeated as many times as you want.
Once you are satisfied, destroy the process ring by telling it to the head:
Head ! terminate.

Optionally forget about the Head binding.
f(Head).

Performance measurement info:
Head = relay:create_ring(1000,Led).
relay:start(Head,10000).     

Led = led:start(1).                
Head = relay:create_ring(10,Led).
Led1 = led:start(1).
Head1 = relay:create_ring(1000,Led1).
relay:start(Head,100),relay:start(Head1,100).
  
Led2 = led:start(1).
Head2 = relay:create_ring(10,Led2).
Led3 = led:start(1).
Head3 = relay:create_ring(10,Led3).
Led4 = led:start(1).
Head4 = relay:create_ring(10,Led4).
Led5 = led:start(1).
Head5 = relay:create_ring(10,Led5).
Led6 = led:start(1).
Head6 = relay:create_ring(10,Led6).
Led7 = led:start(1).
Head7 = relay:create_ring(10,Led7).


relay:start(Head,100),relay:start(Head1,100),relay:start(Head2,100),relay:start(Head3,100),relay:start(Head4,100),relay:start(Head5,100),relay:start(Head6,100),relay:start(Head7,100).

Led1 = led:start(1).
Head1 = relay:create_ring(1000,Led1).
Led2 = led:start(1).
Head2 = relay:create_ring(1000,Led2).
relay:start(Head1,10000),relay:start(Head2,10000).
ok
Finished. Time:32679822 
Finished. Time:33874539 

Led1 = led:start(1,1).
Head1 = relay:create_ring(1,1000,Led1).
Led2 = led:start(2,1).
Head2 = relay:create_ring(2,1000,Led2).
relay:start(Head1,10000),relay:start(Head2,10000).

Finished. Time:48175690 
Finished. Time:48174249 

1 core (using taskset):
Finished. Time:43582938 
Finished. Time:43582741 

Force the erlang schedulers to be bound to the cores:
erl +sbt db
Led1 = led:start(1,1).
Head1 = relay:create_ring(1,1000,Led1).
relay:start(Head1,10000).
Finished. Time:18964857 

Led2 = led:start(1,1).
Head2 = relay:create_ring(1,1000,Led2).
relay:start(Head1,10000),relay:start(Head2,10000).
Finished. Time:46113693 
Finished. Time:46113659 

Led3 = led:start(2,1).
Head3 = relay:create_ring(2,1000,Led3).
relay:start(Head1,10000),relay:start(Head3,10000).
Finished. Time:32767514 
Finished. Time:35072298 

Led4 = led:start(3,1).
Head4 = relay:create_ring(3,1000,Led3).
relay:start(Head1,10000),relay:start(Head3,10000),relay:start(Head4,10000).

Led5 = led:start(4,1).
Head5 = relay:create_ring(4,1000,Led3).
relay:start(Head1,10000),relay:start(Head3,10000),relay:start(Head4,10000),relay:start(Head5,10000).

Information about starting with Rebar:
https://bitbucket.org/basho/rebar/wiki/GettingStarted
./rebar compile eunit

Jesper Louis Andersen showed me how to start a performance analysis tool.
This is how to use it (see t.erl):
t:start(), t:analyze(), t:server().