Closed chenzx closed 6 years ago
I see it in Window's process manager,
In Performance > CPU Usage, all 4 cpu cores seem active,
But in Process > "CPU" column, the value is at most 25.
Multiple threads can run on one core, but if two threads is executing tasks simultaneously, they would need 2 cores.
Your CPU usage would depend on Asio internals and the load of the server. Other than that you are on your own here, at least I am of no more help I think, especially on Windows.
Thanks for rely. After i use python scripts to do concurrent requests, the CPU usage now goes to >25. So it's due to previous sequential requests.
2018-01-17 19:30 GMT+08:00 Ole Christian Eidheim notifications@github.com:
Multiple threads can run on one core, but if two threads is executing tasks simultaneously, they would need 2 cores.
Your CPU usage would depend on Asio internals and the load of the server. Other than that you are on your own here, at least I am of no more help I think, especially on Windows.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/eidheim/Simple-Web-Server/issues/201#issuecomment-358277435, or mute the thread https://github.com/notifications/unsubscribe-auth/AAmBT38wDg7ZwsaTVV6uL8qaxwJTajSuks5tLdnwgaJpZM4RhD_K .
When set thread pool size to >1, but CPU usage only 25, means these threads are all running on a single hard cpu core?
''' HttpServer server; server.config.port = 9999; server.config.reuse_address = true; server.config.thread_pool_size = 5; server.config.timeout_request = 300; server.config.timeout_content = 600; '''