From 7f54f3bb6ec972e35e17bd2a6b2eb339f3721693 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Thu, 13 Oct 2022 12:49:29 -0400 Subject: Added loadtesting notes for Etherpad --- 2022/organizers-notebook/index.org | 62 +++++++++++++++++++++++++++++++++++--- 1 file changed, 57 insertions(+), 5 deletions(-) (limited to '2022/organizers-notebook') diff --git a/2022/organizers-notebook/index.org b/2022/organizers-notebook/index.org index 81465a16..51fa4128 100644 --- a/2022/organizers-notebook/index.org +++ b/2022/organizers-notebook/index.org @@ -306,12 +306,11 @@ Where should we host this? Consider if we need extra scaling beyond being on a beefy live0? - Scale calculator: https://scale.etherpad.org/ - - assuming 3 concurrent authors, 200 lurkers per pad, 3 concurrent pads - - 1 core, 4GB RAM, bandwidth Mb/s: 14.688 + - assuming 3 concurrent authors, 100 lurkers per pad, 3 concurrent pads + - 1 core, 4GB RAM, bandwidth Mb/s: 7.488 - https://mclear.co.uk/2021/09/08/deploying-etherpad-at-scale-in-one-minute/ - https://github.com/ether/etherpad-load-test -etherpad-load-test: 1GB nanode, 42 clients connected (11 authors, 31 lurkers) Will need to try this again when we resize nodes. Probably just the extra memory will be enough and the CPU use from node won't step on the streaming, but not sure *** DONE Use the API to create pages based on all the slugs @@ -321,9 +320,62 @@ CLOSED: [2022-10-12 Wed 20:31] History or regeneration will be fine. We'll probably link to it shortly before the event, and we can also turn off the service until we're ready. *** DONE Generate talk-specific pad content CLOSED: [2022-10-12 Wed 20:31] -*** TODO Set up nginx reverse proxy +*** DONE Set up nginx reverse proxy +CLOSED: [2022-10-13 Thu 12:19] +*** DONE Load-test +CLOSED: [2022-10-13 Thu 12:32] + +tl;dr: Either a separate 4GB Linode or being on live0 will probably be +okay, but I'm not 100% sure due to the limitations of my load-testing +setup. I don't know if we need to shard by pad. + +It looks like etherpad-load-test tends to max out at ~40 connections +on a specific node. I used GNU Parallel to run the loadtesting tool +against a 4GB Linode instance (shared CPU) from five nodes at the same +time (my X220, my 2GB Linode instance, front0, and the node with the +pad), and they all reached about 35-45 clients before failure (not +updating within 100ms). + +#+begin_src sh :eval no +echo 'node node_modules/etherpad-load-test/app.js http://170.187.195.5:9001 -d 120 > ~/output.txt' | parallel -J loadtest -j 1 --onall --verbose --tag +#+end_src + +#+begin_src sh :eval no :results output replace +echo 'grep Local ~/output.txt | tail -1' | parallel -J loadtest -j 1 --onall --tag +#+end_src + +#+RESULTS: +:results: +: Local Clients Connected: 43 +front Local Clients Connected: 43 +live Local Clients Connected: 44 +root@170.187.195.5 Local Clients Connected: 38 +web Local Clients Connected: 42 +:end: + +Files were created at roughly the same time, so the max loads probably +overlapped. It would be good to have finer control over the +etherpad-load-test tool. Haven't figured out how to properly use ~-l~ +and ~-a~ yet. + +#+begin_src sh :eval yes :results output replace +echo 'stat -c %y ~/output.txt' | parallel -J loadtest -j 1 --onall --tag +#+end_src + +#+RESULTS: +:results: +: 2022-10-13 12:42:32.212744774 -0400 +front 2022-10-13 16:42:34.466605650 +0000 +live 2022-10-13 16:38:46.818016379 +0000 +root@170.187.195.5 2022-10-13 16:39:01.738965567 +0000 +web 2022-10-13 12:39:14.417086960 -0400 +:end: -*** TODO Link to pad from talk page +CPU graph went only up to 5%. Network max was 2.36 Mb/s in, 1.25 Mb/s out. +looking at top, CPU seems to go only up to about 12% or so. +*** TODO Set up pad.emacsconf.org to point to live0.emacsconf.org :bandali: +*** BLOCKED Set up letsencrypt +*** BLOCKED Link to pad from talk page *** TODO Be able to fall back to wikimedia if necessary, probably keyed off PAD property ** TODO Update IRC instructions because of multiple tracks :PROPERTIES: -- cgit v1.2.3