开发者

Using Erlang for testing.

Can I test on a computer with a single core erlang programs for four or more cores?

When starting without using any parameter erlang smp assumes 2:2 like this:

Erlang R14A (erts-5.8) [smp: 2:2] [rq: 2] [async-threads: 0]

I am using a Pentium 4, does that mean I have t开发者_StackOverflow社区wo cores?


By default one scheduler is started per available core, and multi run-queues are used (one for each scheduler; available since R13). In your shell [smp 2:2] means that you have two schedulers running on two cores; [rq: 2] means you are using two run queues.

If you want to change the number of schedulers, start with erl +S 4 for four schedulers for example.

Make sure that if you compile erlang on a single-core system, you enable smp in the configure script using --enable-smp-support. Otherwise you might not be able to use multiple schedulers.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜