[swift-server-dev] HTTP API v0.1.0

Carl Brown carl.brown.swift at linuxswift.com
Thu Nov 2 11:15:09 CDT 2017


> On Nov 1, 2017, at 8:13 PM, Helge Heß via swift-server-dev <swift-server-dev at swift.org> wrote:
> b) A complete ‘queue free’ model. I’m doing this in my current approach. It is kinda lock free, but has a lot of async dispatching. The base performance overhead is/should-be pretty high, but scalability is kinda like to optimal (theoretically making use of as many CPUs as possible).
> 
> Not sure how well this goes in Linux. Are DispatchQueue’s also cheap on Linux or does the current implementation create a new thread for each?

From what I've seen, they're pretty expensive on Linux.

I had a previous implementation (prior to https://github.com/carlbrown/HTTPSketch/commit/fd083cd30 <https://github.com/carlbrown/HTTPSketch/commit/fd083cd30> ) that created a new `DispatchQueue` for every `accept()` (i.e. each new TCP connection), and it performed horribly on Linux.  It got much, much faster once I created a fixed pool of queues and reused/shared them between connections.

-Carl

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-server-dev/attachments/20171102/cb726afb/attachment.html>


More information about the swift-server-dev mailing list