Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clojure http-kit version not using all CPU power #4

Open
alexandrejbr opened this issue May 16, 2014 · 4 comments
Open

clojure http-kit version not using all CPU power #4

alexandrejbr opened this issue May 16, 2014 · 4 comments
Assignees

Comments

@alexandrejbr
Copy link
Owner

Clojure http-kit version is not using all CPU power on ubuntu 14.04 LTS (i don't think the problem is on the OS but I mentioned it anyway).

In my quad-core it reaches an average of ~70% virtual core (8 virtual cores) usage.

Other versions use almost all CPU power. Node.js uses nearly 100% in all virtual cores, and other versions like play and spray use ~97% in all virtual cores.

I think there may be a problem on clojure http-kit version of the test.

@hiddenbyte
Copy link
Collaborator

This might be because of the 'thread' parameter of http-kit server. This indicates the number of "threads to compute response from request", http-kit defaults to 4 when the parameter is not set.

A commit - 01eb5d7 - was made to set the 'thread' parameter with the value returned from 'Runtime.getRuntime().availableProcessors()' http://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html#availableProcessors%28%29.

This might 'solve' this issue.

@alexandrejbr
Copy link
Owner Author

Now it's worse:

  • text: 45922.79 (~55% CPU)
  • json_stock: 34126.00 (75% CPU)
  • json_chesire: 40842.24 (65% CPU)
  • json_clj-json: 41372.61 (~60% CPU)

Can you reproduce this behavior in your machine?

@alexandrejbr alexandrejbr reopened this May 20, 2014
@hiddenbyte
Copy link
Collaborator

How many threads "to compute" were printed when executed ?

@alexandrejbr
Copy link
Owner Author

8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants