Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure cgroup in ceph

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces how to configure cgroup in ceph, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

Node cpu and memory node view

Prepare to edit the configuration file / etc/cgconfig.conf Note the mon and osd sections are added according to the actual situation as follows

Mount {cpu = / sys/fs/cgroup/cpu; cpuacct = / sys/fs/cgroup/cpuacct; cpuset = / sys/fs/cgroup/cpu; devices = / sys/fs/cgroup/devices; memory = / sys/fs/cgroup/memory; freezer = / sys/fs/cgroup/freezer;} group mon {perm {task {uid = root Gid = root;} admin {uid = root; gid = root;}} cpu {cpuset.cpus = 0; cpuset.mems = 0 } memory {memory.limit_in_bytes = 2g; memory.memsw.limit_in_bytes = 3G; memory.soft_limit_in_bytes = 1g; memory.swappiness = 0; memory.oom_control = 1; memory.failcnt = 1 }} group osd0 {perm {task {uid = root; gid = root;} admin {uid = root; gid = root }} cpu {cpuset.cpus = 1; # bind to the specified cpu cpuset.mems = 0 memory.limit_in_bytes 1;} memory {memory.limit_in_bytes = 2g; # physical memory is limited to 2G memory.memsw.limit_in_bytes = 3G # swap virtual memory is limited to 3G memory.soft_limit_in_bytes = 1g; # memory recycling will be triggered when physical memory achievement 1G is memory.swappiness = 0; # physical memory will be preferred memory.oom_control = 1; # when the memory reaches the upper limit, the process will not be closed, only the corresponding process will enter the sleep state memory.failcnt = 1 # report the number of times memory reaches memory.limit_in_bytes}}

Modify service configuration file osd service configuration modification / etc/init/ceph-osd.conf configuration is as follows

Mon service configuration modification / etc/init/ceph-mon.conf configuration is as follows

Thank you for reading this article carefully. I hope the article "how to configure cgroup in ceph" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report