-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Heartbeat] Shared chrome browser for synthetics #32352
Comments
Pinging @elastic/uptime (Team:Uptime) |
@andrewc ++, great poc! I'd love to see this implemented, it would reduce hardware requirements by a mile for concurrent monitors |
Hi! We're labeling this issue as |
Unlabeling as stale 👍 |
Hi! We're labeling this issue as |
We could significantly reduce the memory requirements for on-premise nodes by sharing a chromium instance between concurrent tests. As-is memory usage is quite spikey since we use a full chromium process per run. We could easily share that instance using
npx playwright-start
or add anpx @elastic/synthetics server
command to start a websocket server.The following benchmarks show that running multiple tests concurrently using a shared chromium is significantly more economical than running a single test with its own isolated chromium instance.
TL;DR: It's close to a 40%~ reduction in memory to use a single chrome instance, saving hundreds of megs per test runner
See bottom of issue for sample scripts.
Results
Scenario 1: Run 5 clients against WS server, then 1 client
Five runners, total memory while connected to WS
Total peak runner mem=1.9GiB
Total peak server mem=1GiB
Mem per run=580MiB
Total peak runner mem=390MiB
Total peak server mem=520MiB
Mem per run=910MiB
Single runner, total memory while connect to WS
Chromium Websocket server while running 5 clients, then one client
t
Single client, no websocket server
Total memory=790 MiB
Reproducing
Save the following
runtest.sh
script that can run 5x simultaneous runnersStart the chromium server
npx playwright-start --headless
Monitor its memory
psrecord --include-children --plot plotserver.png <PIDOFSERVER>
Run the runners:
psrecord --include-children --plot=plotclients1.png ./runtest.sh
The text was updated successfully, but these errors were encountered: