dhruvrajvanshi / Moonshine

Web framework for Crystal language [DEPRECATED in favour of kemal]
MIT License
121 stars 11 forks source link

Server using only one core #19

Open teodor-pripoae opened 9 years ago

teodor-pripoae commented 9 years ago

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 ?

sdogruyol commented 9 years ago

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

teodor-pripoae commented 9 years ago

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 ?

dhruvrajvanshi commented 9 years ago

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.