Mesos / Marathon内存使用限制的Docker

我们使用mesos-Marathon创build了一个wordpress容器,我们分配了0.1个CPU和64MB RAM。

当我们检查docker的统计数据时,我们观察到内存分配与我们在马拉松中分配的内存是不同的,有什么方法可以更新Docker容器的内存使用限制,我们可以设置所有容器的默认限制在恶魔级别。通过Mesos / Docker恶魔级别)

我们尝试在WordPress站点上进行负载testing,容器只有500个连接被终止,我们尝试使用JMeter进行负载testing。

提前致谢

Docker没有docker守护进程的内存选项。 至于什么是容器的默认内存限制,你只能在运行时(不是在运行之后)用下面的选项来设置限制:

-m, --memory="" Memory limit --memory-swap="" Total memory (memory + swap), '-1' to disable swap 

按照这个

我也看到这里仍然有问题。 确保你正在使用Mesos(0.22.1)或更高版本。

如何创build像这样的马拉松请求的容器?

 curl -X POST -H "Content-Type: application/json" http://<marathon-server>:8080/v2/apps -d@helloworld.json helloworld.json: { "id": "helloworld", "container": { "docker": { "image": "ubuntu:14.04" }, "type": "DOCKER", "volumes": [] }, "cmd": "while true; do echo hello world; sleep 1; done", "cpus": 0.1, "mem": 96.0, # Update the memory here. "instances": 1 }