GithubHelp home page GithubHelp logo

Comments (11)

kazu-yamamoto avatar kazu-yamamoto commented on June 18, 2024

Just FYI.

When this benchmark was created, this feature of nodejs was not available.

And the current GHC does not make use of cores well even if -N is specified since there is just one IO manager. Now, the parallel IO manager is merged to GHC head. So, if we use GHC head, Yesod scales on multi cores well.

from benchmarks.

benma avatar benma commented on June 18, 2024

Thanks.

Still, then node should have been launched 3 times on three different ports and having httperf fire at all of them (or the Haskell versions should have been run with -N1), to ensure a comparison on the same grounds.

On GHC 7.4.2, I see a two-fold increase in performance when going from -N1 to -N3. Also, I see multiple cores maxing out in htop. Is the old IO manager the reason that I don't see a three-fold increase?

from benchmarks.

kazu-yamamoto avatar kazu-yamamoto commented on June 18, 2024

GHC 7.4.2 is using the old manager. Yes, we cannot expect that -N3 results in a three-fold increase.

from benchmarks.

kazu-yamamoto avatar kazu-yamamoto commented on June 18, 2024

You may be interested in this article: https://github.com/snoyberg/posa-chapter/blob/master/warp.md

from benchmarks.

benma avatar benma commented on June 18, 2024

Thank you. So mightyhttpd2 uses forkIO to run on multiple cores. Sorry for the noob question, but how would I adapt the warp.hs benchmark script to also fully utilize all cores (without the new IO manager)?

from benchmarks.

kazu-yamamoto avatar kazu-yamamoto commented on June 18, 2024

Mighttpd2 uses forkProcess to run on multiple cores. I'm not the author of this package. Decision should go to @snoyberg.

from benchmarks.

snoyberg avatar snoyberg commented on June 18, 2024

I have no problem merging in this patch, the point of the benchmarks was simply to use the tools we were comparing against in their standard configuration (thus the reason that Yesod doesn't use the prefork technique). If you send a pull request, I'll merge it.

from benchmarks.

benma avatar benma commented on June 18, 2024

I sent the pull request. Could you please tell me how to modify the warp example to use the prefork technique as well? I would like to see how it fares until the parallel IO manager is released.

from benchmarks.

snoyberg avatar snoyberg commented on June 18, 2024

You can see some code I put together at:

https://gist.github.com/snoyberg/5335726

But @kazu-yamamoto is really the pre-fork expert; I've been meaning to ask him to have a look at that file and see if it makes sense.

from benchmarks.

kazu-yamamoto avatar kazu-yamamoto commented on June 18, 2024

If this runs as a foreground process (not as a daemon), this code looks good. Please don't forget to remove the +RTS -N option.

from benchmarks.

benma avatar benma commented on June 18, 2024

Thanks a lot to both of you. I appreciate the help!

from benchmarks.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.