Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate our performance on https://github.com/the-benchmarker/web-frameworks #1448

Closed
helenmasters opened this issue May 8, 2019 · 3 comments
Assignees
Milestone

Comments

@helenmasters
Copy link
Contributor

It has been reported in our Slack that we are not performing well when running this benchmark, in comparison to other Swift frameworks.

As we are not familiar with this benchmark we will take a look.

@helenmasters helenmasters added this to the 2019.10 milestone May 8, 2019
@helenmasters helenmasters self-assigned this May 8, 2019
@pushkarnk
Copy link
Contributor

The Kitura implementation doesn't seem to include the NIO mode. May be we should add that too.

@helenmasters
Copy link
Contributor Author

David Jones and I investigated yesterday and he immediately noticed that Kitura is running inside an Ubuntu 14.04 Docker container, which is a performance penalty compared to running on 16.04 or 18.04 (related to an old + poorly performing libicu on that old distro)

Unfortunately, our generated projects specify ibmcom/swift-ubuntu:5.0.1 rather than using the official swift:5.0.1 image. The former is based on 14.04, which is something that David has raised that we need to address. Long-term we believe we will be moving Kitura projects to use the official Swift images.

We can change
FROM: ibmcom/swift-ubuntu:5.0.1

to

RUN apt-get update && apt-get install -y openssl-dev libcurl4-openssl-dev

after which we are ~35% faster.

Here's a set of results which David ran locally (bare-metal Ubuntu 16.04 server, he modified the client/docker commands to run on 8 CPUs equivalent to the benchmark author's setup):

Language (Runtime) Framework (Middleware) Requests / s Throughput
swift (4.2) [perfect] (3.1) 142786.33 134.38 MB
swift (5.0) [kitura-1804] (2.7) 100213.67 186.64 MB
swift (5.0) [kitura-1804] (2.6) 99507.67 185.31 MB
swift (5.0) [vapor] (3.3) 93971.33 157.05 MB
swift (5.0) [kitura-1604] (2.7) 89525.33 166.74 MB
swift (4.2) [kitura-1604] (2.7) 80761.00 150.42 MB
swift (5.0) [kitura-1404] (2.6) 74396.33 138.55 MB
swift (5.0) [kitura-nio-1804] (2.7) 73765.33 139.60 MB
swift (5.0) [kitura-1404] (2.7) 73496.33 136.87 MB
swift (5.0) [kitura-nio] (2.7) 60809.00 115.02 MB

... we also don't see the regression between Kitura 2.6 and Kitura 2.7. They are about equal in performance.

David has submitted a PR to update the Kitura dockerfiles to 18.04:
FYI, the-benchmarker/web-frameworks#1346

At this point we're going to close off this issue and have raised two other separate issues covering two other items which we noticed whilst running this benchmark:

@waghanza
Copy link

FYI, I am working on running this on production-ready IaaS (instead of docker) on the-benchmarker/web-frameworks#632

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

No branches or pull requests

3 participants