From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Arne Babenhauserheide Newsgroups: gmane.lisp.guile.user Subject: Re: The benchmark of Artanis: guile server, Fibers, and Ragnarok Date: Fri, 11 May 2018 22:00:24 +0200 Message-ID: <87bmdm7yjr.fsf@web.de> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1526068743 7539 195.159.176.226 (11 May 2018 19:59:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 11 May 2018 19:59:03 +0000 (UTC) User-Agent: mu4e 0.9.18; emacs 25.3.1 Cc: Guile User , artanis@gnu.org To: Nala Ginrut Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri May 11 21:58:59 2018 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fHEBv-0001oB-0s for guile-user@m.gmane.org; Fri, 11 May 2018 21:58:59 +0200 Original-Received: from localhost ([::1]:40879 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHEE0-0004GA-Dh for guile-user@m.gmane.org; Fri, 11 May 2018 16:01:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43855) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHEDX-0004EB-By for guile-user@gnu.org; Fri, 11 May 2018 16:00:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fHEDW-00020u-9K for guile-user@gnu.org; Fri, 11 May 2018 16:00:39 -0400 Original-Received: from mout.web.de ([212.227.17.11]:46469) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fHEDR-0001ym-3U; Fri, 11 May 2018 16:00:33 -0400 Original-Received: from fluss ([80.136.16.252]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MRCjL-1es6Yj02gx-00UXVP; Fri, 11 May 2018 22:00:30 +0200 In-reply-to: X-Provags-ID: V03:K1:peXQR3B4gHTGTAAtCRmbLCDDKcmTg4C90FzFu4XYMzn0U1AXHen 7zeORXRv/OXp4MOukSoC0IfxBxmY6z7/B9FkHoQtiSg50kOEh+dPv3/dcK6DIOOEDNnTwSF qqm2l6UwEzgPuph9tL/7FlXYrX/r3ks6FCT50hL7ZIKOzORESFbopIU/ITQ7RPmD+xW3gcg 6xba3VKZ/Zz5amp9n8eRQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:cx4PQBMDycE=:/EtBLFQXAWiNY/XwkTefd5 ZPA8umfjb+12WhUnCj14gLwrM+lf3yMqEgrMYsCaVSWud1rn/J90OZtntdOPPtC/FDlDyQgP8 A15Ngqcvrv37/s2LXA7LUJcVcuQig6sawCl14s2tGGZFDyvRE7KXYX8EIai6oJIEuy+P7mgO+ EUWfkeGh/zEyLcaUwara7en9QgggsXeEd+0uY7zml1rdd61LlhSJ4BcpV/KgOY2y+7v+flOo9 rvTPpmhYXhlXYd5OLMww6hHU4V586EwXZXPTf4lEE1N9dlin5Vd0pGLLX+xZXIYIZlX3mniiy EAYjrWy1OQfhX8q+nXYfqjZz4DIvn5BKhj0U0ngsIxxQniVsvQBDVjgBBaxVPGPp2G1U9+Fkf bTEYCtAj2+N8RDn+OP7VBS+ph+6V0U7yd4HI8iNntUaszJlMRnNU5ZlcAzAq78ABlJeP5t5yn Wsbn2E+WqJEYifkCubtcQefr1OX+qjshfGNVqjNpTXbEBPGuTDPl/A3p3tP4fe/vcS+XLPaK4 JR3z7q/p+6/ORvcuUvFaBTvX+9BhgfisOa3lcLCuHk5auQYOiLBIE7YBqjbJpYGyCBveBYOVB NoAzIPJm/7s/vhzvqBG0AFlLA2PR2HRxdPNlup7Hsq3NOt8adZHy0XCzl+91/Q6rK3qruj5JH qD3RW3Jyv8KP2hwizF+RGErhjvKRSwEETPMbs3sMWZYIR7CTxk8dT0BGok0UqKH/47r8Kr/T7 Y/vW/pz/g8j19cY02yqn2/s9tWLu8S+tl3PTz2du6Fl8uXLoO823yeRvr6w= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.11 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:14564 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thank you for sharing your numbers! I=E2=80=99ll focus on the largest chang= e I see: Nala Ginrut writes: > -c 1000 > art work -s guile > ---------------- > Thread Stats Avg Stdev Max +/- Stdev > Latency 203.02ms 121.22ms 1.90s 59.75% > art work -s fibers > -------------------- > Thread Stats Avg Stdev Max +/- Stdev > Latency 613.76ms 79.96ms 666.43ms 95.09% > art work -s ragnarok; single instance > -------------------- > Thread Stats Avg Stdev Max +/- Stdev > Latency 284.85ms 515.70ms 1.97s 82.14% You can see the systems cope differently with overload. Ragnarok and pristine Guile both let specific requests starve, while fibers accepts higher average latency to avoid high maximum latency. Is this repeatable? If yes, then you can see the difference in scheduling here: With fibers none of the 1000 requests has to wait more than a second, while with pristine guile and with ragnarok some requests can stall everything. If you have a lot of resources being loaded to display a page, the maximum latency is the effective page load delay. I left out the 4-instance ragnarok test, because its coping with latency in the face of overload is not comparable, since it is less highly overloaded (and that=E2=80=99s the feature which struck me while reading). And anyway: These are already pretty good numbers. They don=E2=80=99t achie= ve the level of static file serving with massive caching (in my tests lighttpd could get more than a factor 2 increase over (fibers web server)), but it=E2=80=99s already on a level where it could support around= 500 active users on a single instance running on consumer hardware. As reference the following are results when I test plain guile fibers vs. lighttpd (the "it works" page) against my home server in my local network: Guile (fibers web server) =2D------------------------ wrk -c 100 -t 4 -d 10 4 threads and 100 connections Thread Stats Avg Stdev Max +/- Stdev Latency 138.76ms 46.83ms 318.43ms 80.22% Req/Sec 183.58 35.46 261.00 75.27% 7401 requests in 10.00s, 664.93KB read Requests/sec: 740.02 Transfer/sec: 66.49KB wrk -c 1000 -t 4 -d 10 4 threads and 1000 connections Thread Stats Avg Stdev Max +/- Stdev Latency 1.45s 685.52ms 4.08s 84.22% Req/Sec 144.65 41.90 248.00 72.22% 5768 requests in 10.03s, 518.22KB read Socket errors: connect 0, read 33, write 0, timeout 472 Requests/sec: 575.29 Transfer/sec: 51.69KB (for the 1000 connections, I had to use ulimit -n 24000 as root to avoid a "too many open files" error) Lighttpd =2D------- wrk -c 100 -t 4 -d 10 4 threads and 100 connections Thread Stats Avg Stdev Max +/- Stdev Latency 65.60ms 43.02ms 416.93ms 78.83% Req/Sec 372.27 49.61 523.00 73.79% 14755 requests in 10.00s, 4.96MB read Requests/sec: 1475.31 Transfer/sec: 508.31KB wrk -c 1000 -t 4 -d 10 http://d6.gnutella2.info 4 threads and 1000 connections Thread Stats Avg Stdev Max +/- Stdev Latency 129.14ms 145.20ms 1.56s 88.33% Req/Sec 372.59 140.95 728.00 60.26% 14830 requests in 10.01s, 4.99MB read Socket errors: connect 0, read 4, write 0, timeout 3074 Requests/sec: 1481.89 Transfer/sec: 510.59KB The Guile web server is just this: (import (fibers web server)) (define (handler request body) (values '((content-type . (text/plain)))= "Hello World!\n")) (run-server handler #:addr INADDR_ANY #:port 1234) What I also see is that Artanis seems to have low overhead. How do the numbers change with more complex pages? Best wishes, Arne --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE801qEjXQSQPNItXAE++NRSQDw+sFAlr19lwACgkQE++NRSQD w+u6SQ/9GWZoQV9legtIEgaESoY+ANmdZCaK6V1ANBYLOcW1KXtUFWYP/rEykskB xRzIMM5UiSu6Szr9LjqUn4aR/Q2uh592OPPBi5LUJg/Ob4KGaoq/aR6B7aRZB9E0 44Y5ueg6ihhLUcw26Y9IkWYxFnVkJv/dLsAOoBGzcqXldPeCbQojBYDDwMjy5cKw 1Qcc0iDr6PdRh2yiAHjKkVlRKfdg7gGrZ7uVhQpam+6mKwWioYaDxintysr+fVRo VT4it/6TlL4a4n8yEpMz/a92hYmL/ybVvUn0p11/Amot6LaiNKutEfCmT5k2pKcj K13Ly04OawL+IygaagYP/6EqDRgyx5ds60R6IQdOg0Qli8zOtl53DHD67zWk/xO4 HNoS5J5n4Zx1n7RqFBPqK4xX/TXUlHbhkq6XPC97o+wFFGwudZwy2srKRKrY2Pp3 m6pDs4TOQNovDhKBZ95U6+no7m8PNFMeqfZaQlFtQI1uJOJmNbCr1qR4GkbIMytV XqsoDNghruc9zG53yKcbnNuZuEmIfW04U4z4XQNn1Q3xKfuyHc7Eo8QspAWTNkv9 VgA8ObP9J9FOkQNA44Xw+28mvX3UZq2dOB6TFQ2UOQTL9JX/4dA5stpf5ueAArb8 j4XIuBK6xPBofBabgJdX3krxiej/kd01EoLTkrpq72tl7HB8SCSIswQBAQgAHRYh BN0ovebZh1yrzkqLHdzPDbMLwQVIBQJa9fZcAAoJENzPDbMLwQVImBgD/23hVdRh dzohq4KdQab9WwLIwMbugmbJYr/a03ITRe386LTH/aczREdlZ8+i621BoDdvBWy9 vKe9gFHhgi7UadZLATpvQF/g11VCcWsliuOgJCW8wIrJuubErKqqlOVJEGkYLYOC eOmM7kAka/Shsl4m9q8Zy0Ja+vpXMIqow/W+ =MoK7 -----END PGP SIGNATURE----- --=-=-=--