Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Poor performance when HTTP keep-alive is disabled #160

Open
bnoordhuis opened this issue Oct 16, 2014 · 0 comments
Open

Poor performance when HTTP keep-alive is disabled #160

bnoordhuis opened this issue Oct 16, 2014 · 0 comments

Comments

@bnoordhuis
Copy link

I observe that throughput for a simple 'Hello, world' server drops by about 10x when the client does not use or support HTTP keep-alive. My 8-core i7 manages about ~28k req/s with keep-alive and ~2.4k req/s without.

I expected some TCP setup/teardown overhead but, according to perf record, most CPU time can be traced back to the spawn() call in src/http/server/mod.rs. I see expensive system calls to clone(), mmap(), mprotect(), and so on, all originating from imp::thread::create() from the standard library. A thread pool would probably help alleviate that.

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

No branches or pull requests

1 participant