从mesos到marathon提供的低内存资源

4bbkushb  于 2021-06-26  发布在  Mesos
关注(0)|答案(0)|浏览(154)

软件:
马拉松1.1.1,mesos 0.28.1
问题:
有时,我们注意到从mesos到marathon提供的资源非常少,这会导致应用程序陷入“等待”状态。在从节点系统上,资源由mesos决定,不受resources标志的控制。
最近的例子:
具有16gb内存的从属设备。2个docker容器在其上运行,总共分配了6gb内存。实际使用量约为400mb。进入盒子,检查可用内存,我看到机器上有~9gb的可用内存。在marathon提供的从服务器中,我看到可用的内存不足300mb,因为我想要部署的容器需要2gb,所以应用程序部署就卡住了。重新启动从属服务器解决了问题。
我查看了确定可用内存的代码,它没有任何复杂的逻辑来解释这种行为(master/src/slave/containerizer/containerizer.cpp)。
观察到类似行为的人对我如何改进设置有什么建议吗?
日志(ihlworkerslave1是有问题的节点)

Jun  8 02:25:46 ihlmaster1 marathon[4805]: [2016-06-08 02:25:46,735] INFO Offer [a78f4eb9-382b-4a14-9d0f-43a032da5e57-O7322]. Insufficient resources for [/hc-manager] (need cpus=0.1, mem=2048.0, disk=0.0, ports=([2552, 8888, 8889] required), available in offer: [id { value: "a78f4eb9-382b-4a14-9d0f-43a032da5e57-O7322" } framework_id { value: "d41742e6-1e26-4172-b687-9692c8d34732-0000" } slave_id { value: "a78f4eb9-382b-4a14-9d0f-43a032da5e57-S2" } hostname: "ihlworkerslave1" resources { name: "ports" type: RANGES ranges { range { begin: 2552 end: 2552 } range { begin: 8888 end: 8889 } range { begin: 31000 end: 31021 } range { begin: 31024 end: 31419 } range { begin: 31423 end: 31709 } range { begin: 31711 end: 31907 } range { begin: 31909 end: 32000 } } role: "*" } resources { name: "cpus" type: SCALAR scalar { value: 3.1 } role: "*" } resources { name: "mem" type: SCALAR scalar { value: 270.0 } role: "*" } resources { name: "disk" type: SCALAR scalar { value: 5112.0 } role: "*" } attributes { name: "layer" type: TEXT t
Jun  8 02:25:46 ihlmaster1 marathon[4805]: [2016-06-08 02:25:46,735] INFO Offer [a78f4eb9-382b-4a14-9d0f-43a032da5e57-O7323]. Considering unreserved resources with roles {*}. Couldn't find host port 2552 (of 2552, 8888, 8889) in any offered range for app [/hc-manager] (mesosphere.marathon.tasks.PortsMatcher:marathon-akka.actor.default-dispatcher-296)
Jun  8 02:25:46 ihlmaster1 marathon[4805]: [2016-06-08 02:25:46,735] INFO Offer [a78f4eb9-382b-4a14-9d0f-43a032da5e57-O7323]. Insufficient resources for [/hc-manager] (need cpus=0.1, mem=2048.0, disk=0.0, ports=([2552, 8888, 8889] required), available in offer: [id { value: "a78f4eb9-382b-4a14-9d0f-43a032da5e57-O7323" } framework_id { value: "d41742e6-1e26-4172-b687-9692c8d34732-0000" } slave_id { value: "a78f4eb9-382b-4a14-9d0f-43a032da5e57-S3" } hostname: "ihlworkerslave2" resources { name: "cpus" type: SCALAR scalar { value: 3.9 } role: "*" } resources { name: "mem" type: SCALAR scalar { value: 12558.0 } role: "*" } resources { name: "disk" type: SCALAR scalar { value: 5112.0 } role: "*" } resources { name: "ports" type: RANGES ranges { range { begin: 31000 end: 31678 } range { begin: 31682 end: 32000 } } role: "*" } attributes { name: "layer" type: TEXT text { value: "worker" } } url { scheme: "http" address { hostname: "ihlworkerslave2." ip: "10.184.245.125" port: 5051 } path: "/slave(
Jun  8 02:25:46 ihlmaster1 marathon[4805]: [2016-06-08 02:25:46,735] INFO Offer [a78f4eb9-382b-4a14-9d0f-43a032da5e57-O7324]. Considering unreserved resources with roles {*}. Couldn't find host port 2552 (of 2552, 8888, 8889) in any offered range for app [/hc-manager] (mesosphere.marathon.tasks.PortsMatcher:marathon-akka.actor.default-dispatcher-296)
Jun  8 02:25:46 ihlmaster1 marathon[4805]: [2016-06-08 02:25:46,735] INFO Offer [a78f4eb9-382b-4a14-9d0f-43a032da5e57-O7324]. Insufficient resources for [/hc-manager] (need cpus=0.1, mem=2048.0, disk=0.0, ports=([2552, 8888, 8889] required), available in offer: [id { value: "a78f4eb9-382b-4a14-9d0f-43a032da5e57-O7324" } framework_id { value: "d41742e6-1e26-4172-b687-9692c8d34732-0000" } slave_id { value: "a78f4eb9-382b-4a14-9d0f-43a032da5e57-S6" } hostname: "ihlworkerslave4" resources { name: "cpus" type: SCALAR scalar { value: 4.0 } role: "*" } resources { name: "mem" type: SCALAR scalar { value: 14606.0 } role: "*" } resources { name: "disk" type: SCALAR scalar { value: 5112.0 } role: "*" } resources { name: "ports" type: RANGES ranges { range { begin: 31000 end: 32000 } } role: "*" } attributes { name: "layer" type: TEXT text { value: "worker" } } url { scheme: "http" address { hostname: "ihlworkerslave4." ip: "10.184.245.145" port: 5051 } path: "/slave(1)" }] (mesosphere.mesos.TaskBuild
Jun  8 02:25:46 ihlmaster1 marathon[4805]: [2016-06-08 02:25:46,735] INFO Offer [a78f4eb9-382b-4a14-9d0f-43a032da5e57-O7325]. Considering unreserved resources with roles {*}. Couldn't find host port 2552 (of 2552, 8888, 8889) in any offered range for app [/hc-manager] (mesosphere.marathon.tasks.PortsMatcher:marathon-akka.actor.default-dispatcher-296)
Jun  8 02:25:46 ihlmaster1 marathon[4805]: [2016-06-08 02:25:46,735] INFO Offer [a78f4eb9-382b-4a14-9d0f-43a032da5e57-O7325]. Insufficient resources for [/hc-manager] (need cpus=0.1, mem=2048.0, disk=0.0, ports=([2552, 8888, 8889] required), available in offer: [id { value: "a78f4eb9-382b-4a14-9d0f-43a032da5e57-O7325" } framework_id { value: "d41742e6-1e26-4172-b687-9692c8d34732-0000" } slave_id { value: "a78f4eb9-382b-4a14-9d0f-43a032da5e57-S4" } hostname: "ihlworkerslave3" resources { name: "ports" type: RANGES ranges { range { begin: 31000 end: 32000 } } role: "*" } resources { name: "cpus" type: SCALAR scalar { value: 3.8 } role: "*" } resources { name: "mem" type: SCALAR scalar { value: 10510.0 } role: "*" } resources { name: "disk" type: SCALAR scalar { value: 5112.0 } role: "*" } attributes { name: "layer" type: TEXT text { value: "worker" } } attributes { name: "akkaseeder" type: TEXT text { value: "true" } } url { scheme: "http" address { hostname: "ihlworkerslave3." ip: "10.184.24
Jun  8 02:25:46 ihlmaster1 marathon[4805]: [2016-06-08 02:25:46,735] INFO Offer [a78f4eb9-382b-4a14-9d0f-43a032da5e57-O7326]. Considering unreserved resources with roles {*}. Couldn't find host port 2552 (of 2552, 8888, 8889) in any offered range for app [/hc-manager] (mesosphere.marathon.tasks.PortsMatcher:marathon-akka.actor.default-dispatcher-296)
Jun  8 02:25:46 ihlmaster1 marathon[4805]: [2016-06-08 02:25:46,735] INFO Offer [a78f4eb9-382b-4a14-9d0f-43a032da5e57-O7326]. Insufficient resources for [/hc-manager] (need cpus=0.1, mem=2048.0, disk=0.0, ports=([2552, 8888, 8889] required), available in offer: [id { value: "a78f4eb9-382b-4a14-9d0f-43a032da5e57-O7326" } framework_id { value: "d41742e6-1e26-4172-b687-9692c8d34732-0000" } slave_id { value: "a78f4eb9-382b-4a14-9d0f-43a032da5e57-S5" } hostname: "ihlworkerslave5" resources { name: "ports" type: RANGES ranges { range { begin: 31000 end: 32000 } } role: "*" } resources { name: "cpus" type: SCALAR scalar { value: 3.8 } role: "*" } resources { name: "mem" type: SCALAR scalar { value: 10510.0 } role: "*" } resources { name: "disk" type: SCALAR scalar { value: 5112.0 } role: "*" } attributes { name: "layer" type: TEXT text { value: "worker" } } attributes { name: "akkaseeder" type: TEXT text { value: "true" } } url { scheme: "http" address { hostname: "ihlworkerslave5." ip: "10.184.24

谢谢您!

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题