Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 518973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:59:33+00:00 2026-05-13T07:59:33+00:00

In a test I’m building here my goal is to create a parser. So

  • 0

In a test I’m building here my goal is to create a parser. So I’ve built a concept proof that reads all messages from a file, and after pushing all of them to memory I’m spawning one process to parse each message. Until that, everything is fine, and I’ve got some nice results. But I could see that the erlang VM is not using all my processor power (I have a quad core), in fact it is using about 25% percent of my processor when doing my test. I’ve made a counter-test using c++ that uses four threads and obviously it is using 100% thus producing a better result (I’ve respected the same queue model erlang uses).

So I’m wondering what could be “slowing” my erlang test? I know it’s not a serialization matter as I’m spawning one process per message. One thing I’ve thought is that maybe my message is too small (about 10k each), and so making that much of processes is not helping achieve a great performance.

Some facts about the test:

106k messages
On erlang (25% processor power used) – 204 msecs
On my C++ test (100% processor power used) – 80 msecs

Yes the difference isn’t that great but if there is more power available certainly there is more room for improvement, right?

Ah, I’ve done some profilling and wasn’t able to find another way to optimize, since there are few function calls and most of them are string to object convertion.

Update:

Woooow! Following Hassan Syed idea, I’ve managed to achieve 35 msecs against 80 from c++! This is awesome!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:59:33+00:00Added an answer on May 13, 2026 at 7:59 am

    It seems your erlang VM is using only one core.

    Try starting it like this:

    erl -smp enable +S 4
    

    The -smp enable flag tells Erlang to start the runtime system with SMP support enabled
    With +S 4 you start 4 Erlang schedulers (1 for each core)

    You can see if you have SMP enabled when you start the shell:

    Erlang R13B01 (erts-5.7.2) [source] [64-bit] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false]
    
    Eshell V5.7.2  (abort with ^G)
    1> 
    

    [smp:2:2] tells it is running with smp enabled 2 schedulers 2 schesulers online

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Test(XXX) #b1-wrap { cursor:pointer; height:107px; left:573px; // this seems that the dash-line is caused
Test here: http://jsperf.com/test-for-speed-of-various-conditionals I'm interested if others are getting the same results, and what
// Create test video frame void CreateFrame(char * buffer, int w, int h, int
#test/factories.rb Factory.define :estado do |estado| estado.nombre Distrito Federal end Factory.define :municipio do |municipio| municipio.nombre
#test.pl use Getopt::Long; Getopt::Long::Configure (bundling); GetOptions ( 'TestB|B|b' => \$testb , 'TestA|A|a' => \$testa,
test.html <html> <body> <span> hello Joe</span> <span> hello Bob</span> <span> hello Gundam</span> <span> hello
test :: [String] -> [String] test = foldr step [] where step x ys
test = [a,b,c,d,e] def xuniqueCombinations(items, n): if n==0: yield [] else: for i in
%TEST ; ... for { sub atest } sub atest { ... push $TEST
In test server it is working. But production gives this traceback: what different? And

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.