-
Edit the
Dockerfilein order to select the desired PHP version -
Build the image and start the stack
This will create some classes on the fly (seegenerate_classes.phpfor details)docker-compose up --build
-
Create some load
ab -n 1000 -c 10 http://localhost:8080/
-
Monitor the memory usage
docker stats
-
Repeat with another PHP version
- Directly after start: 6.301MiB
- After one request: 9.5MiB
- After 1,001 requests: 37.05MiB
- After 11,001 requests: 37.05MiB
- Directly after start: 6.633MiB
- After one request: 15.77MiB
- After 1,001 requests: 59.54MiB
- After 11,001 requests: 274MiB