Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run two or more rockermq container in a host set the max heap size. #93

Open
xiwolaisi opened this issue Oct 13, 2023 · 1 comment
Open

Comments

@xiwolaisi
Copy link

well,when we used docker to run rocketmq two or more container in a host,we found that the max heap size can‘t limited by cgroups.
so, why it happened?

@xiwolaisi
Copy link
Author

we found taht max heap size set by https://github.com/apache/rocketmq-docker/blob/master/image-build/scripts/runbroker-customize.sh the script.
In this script , linux set max heap size by "free -m" to calculate.But "free -m" will read host /proc/meminfo,it not cgroups limited.
we found lxcfs can make it .
when you install lxcfs and run it 。
then you run
docker run -it --name my_rocketmq -memory=8g -v /var/lib/lxcfs/proc/meminfo:/proc/meminfo:rw apache/rocketmq:4.7.1
and then you wiil found that “free -m” is 8g

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant