On Tue, 11 Sep 2018 13:49:05 GMT, Sönke Ludwig wrote:

On Tue, 11 Sep 2018 10:21:40 GMT, Marcio Martins wrote:

We tried upgrading to 0.8.4, and while it was somewhat painless to upgrade, we were disappointed to see that compile times for our main app went up by 30%, from 22secs to 29secs, and that a basic non-scientific test ab -n 100 -c 5 http:/localhost:8080/ shows that our app is now only able to server 1.08 reqs/sec, down from 1.59 with 0.7.33.

Note that our app uses vibe for much more than just serving the request. There are plenty of database and client HTTP request traffic.

We are going to stick to 0.7.3 for the time being :(

An interesting question would be to test this with subConfiguration "vibe-d:core" "libevent". In theory there shouldn't be a noticeable difference to 0.7.33 in that case.

Generally, the HTTP server is currently slower when using vibe-core, which is going to be fixed with the upcoming vibe-http package. The raw network code on the other hand should be faster than before.

But the request throughput generally seems awfully slow. Do you have an idea where the main CPU time is spent, or whether there may be some blocking I/O in the main thread?

Yes, the majority of the CPU is spent rendering templates, roughly the main thread is blocked for 40ms per request. I have tried adding sleep(1.usecs); every few milliseconds to ensure progress on other requests, but it didn't make any noticeable difference. CPU usage for all the requests is less than 50% so for sure there seems to be excessive waiting... Do you have any other recommendations or things I could try or how to debug it further? This was tested on Ubuntu 14.04. Simply running it on Ubuntu 18.04 doubles the throughput, which could indicate better kernel-level resource management, and less waiting. I excluded the possibility of the improvement being the new libevent version in 18.04, by installing libevent 2.1.6-8 on ubuntu 14.04 and verifying no noticeable difference.