Moonshine icon indicating copy to clipboard operation
Moonshine copied to clipboard

Server using only one core

Open teodor-pripoae opened this issue 9 years ago • 3 comments

Hi,

My laptop has 4 cores, and doing an apache benchmark shows only one core is used. Is there any setting available to make it work on multiple cores ?

teodor-pripoae avatar Sep 18 '15 15:09 teodor-pripoae

It's because currently Crystal's HTTP::Server is not capable of using all the CPUs

sdogruyol avatar Sep 19 '15 09:09 sdogruyol

I know that Crystal made the switch from threads to evented IO a few months ago, but is there any option to make moonshine server run on multiple cores ? Maybe something similar with node cluster ?

teodor-pripoae avatar Sep 19 '15 12:09 teodor-pripoae

I tried switching the HTTP::Server's listen method to listen_fork but it seems that it's not forking any threads. Will have to investigate.

dhruvrajvanshi avatar Sep 22 '15 21:09 dhruvrajvanshi