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

Add an option to disable kernel memory limiting #1520

Open
paulfelix opened this issue Jul 2, 2019 · 4 comments
Open

Add an option to disable kernel memory limiting #1520

paulfelix opened this issue Jul 2, 2019 · 4 comments

Comments

@paulfelix
Copy link

Attempting to set a kernel memory limit when running containers on some systems causes a fatal error. The error message is "kernel memory accounting disabled in this runc build".

This happens because github.com/opencontainers/runc (part of containerd.io) has been built for some systems (like CentOS) with the nokmem option. So for these systems, we need to disable kernel memory limiting.

@rdallman
Copy link
Contributor

rdallman commented Jul 2, 2019

hmm, it may be better just to check this in startup and quit with a nice error. memory limits are kinda key to the whole thing, it would not be a very fun experience without them (thrashing) and makes scheduling functions really challenging. unless there's another way to limit memory on these kinds of systems? we should probably recommend an alternate docker/runc installation in these cases?

thanks for reporting, this is unfortunate.

@paulfelix
Copy link
Author

Here is more info on why this is an issue.

There was some problem found when setting kernel memory limits on containers running on systems with Linux kernel version 3.x (e.g., CentOS 7):
opencontainers/runc#1725

So the solution was to introduce a nokmem build option for github.com/opencontainers/runc, and use that option when building on Linux kernel 3.x systems.

Thus, there seems to be two options:

  1. Downgrade your system's containerd.io to containerd.io-1.2.2-3.3.el7 (a version not built with nokmem) and hope you don't run into the same issue.

  2. Don't run Fn server on a Linux kernel 3.x system.

But, In cases where we are in full control of the Fn host environment and its functions, it would be REALLY NICE to have an Fn server config option that disables kernel memory limit setting.

@praveendk
Copy link

is containerd.io-1.2.2-3.3.el7 is installed as part of docker install? or fn?

@denismakogon
Copy link
Member

@praveendk docker, Fn is self-contained binary.

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

4 participants