docker run -it --rm -m 100M --memory-swap 200M ubuntu-stress:latest /bin/bash
# 压测 100M oom 掉了
root@8b3e0e67c0c2:/# stress --vm 1 --vm-bytes 100M
stress: info: [12] dispatching hogs: 0 cpu, 0 io, 1 vm, 0 hdd
stress: FAIL: [12] (415) <-- worker 13 got signal 9
stress: WARN: [12] (417) now reaping child worker processes
stress: FAIL: [12] (451) failed run completed in 0s
root@8b3e0e67c0c2:/# stress --vm 1 --vm-bytes 50M
stress: info: [14] dispatching hogs: 0 cpu, 0 io, 1 vm, 0 hdd
这应该不科学吧?求解 参考的是这篇文章Docker 资源限制之内存
