In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to use LXCFS to enhance container isolation and resource visibility in Java. Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.
JVM will allocate heap memory according to the host's memory, so often in the case of container quota directly lead to java class applications do not come up, of course, java10 will be better adapted to the container, so this article through the introduction of lxcfs to solve the problem of resource visibility in the container, so that the container can see the real container quota resources.
This article focuses on how to use lxcfs to enhance container isolation and visibility. Binary deployment packages are used to ease deployment difficulties. It can be used in offline environments.
Analysis of Enhancing Docker Container Isolation Based on LXCFS blog.csdn.net/s1234567_89/article/details/50722915
Kubernetes Path 2 -Improve container resource visibility with LXCFS yq.aliyun.com/articles/566208
Use binary lxcfs package for installation and deployment, download address: github.com/cuisongliu/lxcfs/releases/download/lxcfs-3.0.3-binary-install/lxcfs.tar.gz
Make sure that the system has the fusermount command, and that the system uses fusermount to unload mount points.
Installation as shown in the figure:
lxcfs installation steps
Is it easy to operate? Below we compare the effects.
The first is to execute the command on a host without lxcfs installed:
bash1
2
docker run --rm -ti -m 200m ubuntu bash
free -m
The effect is as shown in the figure:
Lxcfs renderings not used
Next we execute the same command on the host with lxcfs installed
bash1
2
3
4
5
6
7
8
docker run --rm -it -m 200m \
-v /var/lib/lxcfs/proc/cpuinfo:/proc/cpuinfo:rw \
-v /var/lib/lxcfs/proc/diskstats:/proc/diskstats:rw \
-v /var/lib/lxcfs/proc/meminfo:/proc/meminfo:rw \
-v /var/lib/lxcfs/proc/stat:/proc/stat:rw \
-v /var/lib/lxcfs/proc/swaps:/proc/swaps:rw \
-v /var/lib/lxcfs/proc/uptime:/proc/uptime:rw \
ubuntu bash
The effect is as shown in the figure:
Using lxcfs renderings
Lxcfs is already in effect here.
Here explains the use of docker, for k8s users it is recommended to use https://github.com/fanux/kube/releases/tag/v.12.5-lxcfs-gate to replace k8s kebelet. This is a custom integrated version of the native k8s, so that all k8s pods will use lxcfs by default
Thank you for reading! About "how to use LXCFS to enhance container isolation and resource visibility in java" this article is shared here, I hope the above content can be of some help to everyone, so that everyone can learn more knowledge, if you think the article is good, you can share it to let more people see it!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
The foreground transaction code involved in Define Control Data for Pull list is MF60
© 2024 shulou.com SLNews company. All rights reserved.