Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/paoliniluis/metabase-load-test-k6
A repo to start load testing Metabase
https://github.com/paoliniluis/metabase-load-test-k6
k6 metabase
Last synced: about 9 hours ago
JSON representation
A repo to start load testing Metabase
- Host: GitHub
- URL: https://github.com/paoliniluis/metabase-load-test-k6
- Owner: paoliniluis
- Created: 2023-08-28T12:28:24.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-01T15:33:10.000Z (3 months ago)
- Last Synced: 2024-08-01T17:32:16.918Z (3 months ago)
- Topics: k6, metabase
- Language: JavaScript
- Homepage:
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Metabase performance testing w/K6
===============================## Components
- Metabase is exposed through port 3001
- App DB (PosgreSQL() is exposed through port 5432
- Data DB (PosgreSQL() is exposed through port 5433
- A python container that initializes Metabase by adding [email protected] / metabot1 as the user/pass, adds the data db and deletes the H2 sample DB
- K6 running on a container that will start when the previous container finishes## Performance considerations:
1) Metabase App is resource constrained on CPU in order to see how many concurrent users can sustain on the load testing
2) App DB has more than enough resources to sustain the load, also Metabase has MB_DISABLE_SESSION_THROTTLE and MB_APPLICATION_DB_MAX_CONNECTION_POOL_SIZE defaults changedK6 test:
1) check the stages in script.js to know how the load is pushed towards the application
2) code can be heavily optimized, this is a weekend's project to look for the cause of some performance regressions
3) we don't evaluate how fast the queries return from the Data DB here, it's just for checking how fast Metabase is and to make recommendations about the size of the server
4) sleep's are in the code to try to separate the calls and make the load tests as "natural" as possible, but this is just a dreamer's dreamMac users: you need to follow the same pattern as in https://github.com/paoliniluis/postgres-metabase-stack-m1, and bundle Metabase inside a aarch64 image, till we can ship an ARM container image
## How to test
Just change the Metabase container version and resources assigned to the Metabase container to see if it sustains the load
## Changelog
- Jul 2024 - Added the new bun api endpoint and tweaked the logging config. Now Metabase will send the log lines to this endpoint and those will be persisted on an app DB table called metrics. This is used to analyze performance on every single api call