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 资源限制之内存
是否与这个值(MemorySwappiness)有关
"MemorySwap": 1073741824,
"MemorySwappiness": -1, <== 此值有关
1
cephei 2017-07-24 16:47:02 +08:00
宿主上建了 Swap 了吗
|
2
zuolan 2017-07-24 16:54:50 +08:00
ubuntu-stress 是什么镜像?
|
4
cephei 2017-07-25 10:04:09 +08:00
docker stats 看一下资源使用情况吧
|