|
| 1 | +## SDK Scale Testing |
| 2 | +This directory contains the scale testing workloads for the SDK. The workloads are designed to test the performance |
| 3 | +and scalability of the SDK under various conditions. There are different types of workloads and each will create a log |
| 4 | +file when run. These logs are named in this format `<file name>-<process id>-<date time>.log`. |
| 5 | + |
| 6 | +### Setup VM |
| 7 | +1. Create a VM in Azure with the following configuration: |
| 8 | + - 8 vCPUs |
| 9 | + - 32 GB RAM |
| 10 | + - Ubuntu |
| 11 | + - Accelerated networking |
| 12 | +2. Fork and clone this repository |
| 13 | +3. Go to azure cosmos folder |
| 14 | + - `cd azure-sdk-for-python/sdk/cosmos/azure-cosmos` |
| 15 | +4. Install the required packages and create virtual environment |
| 16 | + - `sudo apt-get update` |
| 17 | + - `sudo apt-get install python3-pip` |
| 18 | + - `sudo apt-get install python3.12-venv` |
| 19 | + - `python3 -m venv azure-cosmosdb-sdk-environment` |
| 20 | + - `source azure-cosmosdb-sdk-environment/bin/activate` |
| 21 | + - `pip install -r dev_requirements.txt` |
| 22 | +5. Checkout the branch with the changes to test. |
| 23 | +6. Install azure-cosmos |
| 24 | + - `pip install .` |
| 25 | +7. Go to workloads folder |
| 26 | + - `cd tests/workloads` |
| 27 | +8. Fill out relevant configs in `workload_configs.py`: key, host, etc |
| 28 | +9. Install envoy proxy https://www.envoyproxy.io/docs/envoy/latest/start/install |
| 29 | +10. Update envoy_simple_config.yaml to have the correct account info. Replace <> with account name. |
| 30 | +11. Go to envoy folder and start envoy |
| 31 | + - `cd envoy` |
| 32 | + - `mkdir logs` |
| 33 | + - `envoy -c <envoy_file>.yaml --log-level debug --log-path logs/debug.txt` |
| 34 | +12. Run the setup workload to create the database and containers and insert data |
| 35 | + - `python3 initial-setup.py` |
| 36 | +13. Run the scale workloads |
| 37 | + - `./run_workloads.sh <number of clients per workload>` |
| 38 | + |
| 39 | +### Monitor Run |
| 40 | +- `ps -eaf | grep "python3"` to see the running processes |
| 41 | +- `tail -f <log_file>` to see the logs in real time |
0 commit comments