[WIP] tests: add comprehensive memory limits testing framework (Closes #4247)#4989
[WIP] tests: add comprehensive memory limits testing framework (Closes #4247)#4989jeff-zed wants to merge 1 commit intolf-edge:masterfrom
Conversation
…dge#4247) - tests/memory-testing/: add complete testing framework for VM memory allocation limits - scripts/maximum-memory-test.sh: test memory allocation up to system limits with various scenarios - scripts/simple-memory-test.sh: basic memory allocation validation tests - scripts/boundary-finder.sh: binary search to find exact memory allocation boundaries - terraform/: infrastructure as code for automated test configuration and deployment - examples/: ready-to-run test scenarios for different use cases - docs/eve_memory_testing_package.md: comprehensive documentation for the testing framework This framework validates EVE's memory management capabilities including: - Maximum RAM allocation to containers/VMs - Memory overhead calculations - OOM boundary testing - Concurrent allocation scenarios - Memory pressure handling The tests can be run standalone or integrated into CI/CD pipelines to ensure EVE properly enforces memory limits and handles resource constraints gracefully. Signed-off-by: jeff-zed <jeff@zededa.com>
|
Wow. We will have to review it. Looks pretentious. |
Thanks? I am working on extending it with |
| echo "Step 1: Deploy base container with ${base_allocation}MB" | ||
| test_single_container $base_allocation "PRESSURE_BASE" | ||
|
|
||
| echo "Step 2: Add additional containers while base is running" |
There was a problem hiding this comment.
How does the add anything? test_single_containers does a cleanup_containers at the end.
eriknordmark
left a comment
There was a problem hiding this comment.
Is this ready for review and validation? It is marked as WIP and draft, and when I follow the instructions (after correcting the missing "/" in the path names it doesn't find the application to run. See below.
One thing I wanted to understand is what disk and network I/O stress tests you are running from the VM. From what I can tell you merely boot different size VMs but the issue is explicit about running such stress tests.
Failure to run basic test:
nordmark@bobo:~/lf-edge/issue-4247-memory-tests/eve$ ./tests/memory-testing/scripts/simple-memory-test.sh
=== Simple EVE Memory Allocation Test ===
Results: ../results/simple-memory-20250702_121558
=== Initial System State ===
✔ Adam status: container with name eden_adam is running
Adam is expected at https://172.16.0.148:3333
For local Adam you can run 'docker logs eden_adam' to see logs
✔ Registry status: container with name eden_registry is running
Registry is expected at https://172.16.0.148:5050
For local registry you can run 'docker logs eden_registry' to see logs
✔ Redis status: container with name eden_redis is running
Redis is expected at 172.16.0.148:6379
For local Redis you can run 'docker logs eden_redis' to see logs
✔ EServer process status: container with name eden_eserver is running
EServer is expected at http://172.16.0.148:8888 from EVE
For local EServer you can run 'docker logs eden_eserver' to see logs
--- context: default ---
EVE state: registered
✔ EVE REMOTE IPs: 192.168.0.10; fe80::6c92:de61:d19f:f725; 192.168.0.11; fe80::9f4c:216d:c141:b45
Last info received time: 2025-07-02 12:11:27 -0700 PDT
✔ EVE memory: 749 MB/2.8 GB
✔ EVE on Qemu status: running with pid 784376
Logs for local EVE at: /home/nordmark/main/eden/dist/default-eve.log
✔ EVE Request IP: 172.16.0.148
=== Testing: light (128 MB) ===
Description: Light memory allocation test
INFO[0000] not found app with name simple-memory-test-light
Pre-test EVE memory: memory:
Deploying container with 128MB memory...
config changed, to see config run 'eden controller edge-node get-config'
INFO[0002] deploy pod simple-memory-test-light with docker://ubuntu:20.04 request sent
✅ Deployment command successful
Waiting... (0/120) Status: UNKNOWN
Description
This PR adds a testing framework to validate EVE's memory management capabilities, specifically addressing VM memory limits with maximum RAM allocation as described in issue #4247.
The framework includes:
The test suite can be run standalone or integrated into CI/CD pipelines, providing automated validation of EVE's memory management and resource constraints.
Fixes: #4247
How to test and validate this PR
Expected Results:
Changelog notes
Added memory limits testing framework for validating VM/container memory allocation, overhead calculations, and resource constraint handling. Includes automated tests for memory boundaries, stress scenarios, and concurrent allocations.
PR Backports
Checklist
I do not have an amd64 device or a "standard" (non-Apple) arm64 device for testing.
And the last but not least: