-
Notifications
You must be signed in to change notification settings - Fork 219
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
ulimit -n is too low inside toolbox and can't be changed. #213
Comments
Interesting. We could bump the default limit for all toolboxes and/or introduce a However, I don't think it will really work. A non-root user can't override |
Were you by any chance referring to the soft and hard limits? On my host, the hard limit is 4096 and the soft limit is 1024. Hence a non-root user can bump the soft limit till 4096:
However, inside the rootless toolbox container, both soft and hard limits are 1024:
|
As @giuseppe pointed out, this does work: Are 4096 file descriptors enough to build GStreamer with Cerbero? :) |
Yes, I'm referring to the hard limit inside the container being set to the soft limit of the host. I guess ideally for toolbox, the hard would be set to the hard limit of the host for most thing. |
On my recently installed F30 machine, I have a hard limit of 524288 fds, which makes a lot of sense |
Erm, for GStreamer, we set it to 10240 .. but I thinkm ito's just adding a 0.. Can't we just inherit the limit from the host ? |
Ah, so the hard limit is indeed higher on Fedora 30. So far I was playing on Fedora 29, where the hard limit used to be 4096.
Yeah, I think for toolbox containers we should just use the host limits. @giuseppe said that he's investigating if this can be made even easier with |
I've opened a PR so you can use |
Just experienced a problem with this when I tried to install packages using npm. |
The low limit also causes issues with Wine/Esync. |
Since Podman supports '--ulimit host' only from version 1.5.0, which is newer than the minimum required version of 1.4.0, this only works if a new enough Podman is available. https://github.com/debarshiray/toolbox/issues/213
Fixed via https://github.com/debarshiray/toolbox/pull/229 You'd need Podman 1.5.0 to have the ulimits passed through from the host to the containers. |
Note that the soft limit for the number of open file descriptors cannot be tested at the moment because Podman sets the Toolbx container to have a value higher than the host's [1]. [1] containers/podman#17681 containers#213
Note that the soft limit for the maximum number of open file descriptors cannot be tested at the moment because Podman sets the Toolbx container to have a value higher than the host's [1]. [1] containers/podman#17681 containers#213
Note that the soft limit for the maximum number of open file descriptors cannot be tested at the moment because Podman sets the Toolbx container to have a value higher than the host's [1]. [1] containers/podman#17681 containers#213
Note that the soft limit for the maximum number of open file descriptors cannot be tested at the moment because Podman sets the Toolbx container to have a value higher than the host's [1]. [1] containers/podman#17681 containers#213
Podman sets the Toolbx container's soft limit for the maximum number of open file descriptors to the host's hard limit, which is often greater than the host's soft limit. [1] containers/podman#17681 containers#213
Podman sets the Toolbx container's soft limit for the maximum number of open file descriptors to the host's hard limit, which is often greater than the host's soft limit [1]. [1] containers/podman#17681 containers#213
The following caveats must be noted: * Podman sets the Toolbx container's soft limit for the maximum number of open file descriptors to the host's hard limit, which is often greater than the host's soft limit [1]. * The ulimit(1) options -b, -k, P and -T don't work on Fedora 38 because the corresponding resource arguments for getrlimit(2) are absent from the operating system. These are RLIMIT_SBSIZE, RLIMIT_KQUEUES, RLIMIT_NPTS and RLIMIT_PTHREAD respectively. [1] containers/podman#17681 containers#213
The following caveats must be noted: * Podman sets the Toolbx container's soft limit for the maximum number of open file descriptors to the host's hard limit, which is often greater than the host's soft limit [1]. * The ulimit(1) options -P, -T, -b, and -k don't work on Fedora 38 because the corresponding resource arguments for getrlimit(2) are absent from the operating system. These are RLIMIT_NPTS, RLIMIT_PTHREAD, RLIMIT_SBSIZE and RLIMIT_KQUEUES respectively. [1] containers/podman#17681 containers#213
GStreamer, like GTK, also implies GLib. It adds a whole new dimension to the list of use cases, and there's concrete evidence of folks using Toolbx for GStreamer development [1]. [1] containers/toolbox#213
Building GStreamer with Cerbero requires over 1024 FDs, creating a container by hand with podman I can do "--ulimit nofile=10240", but I can't find a similar option when using toolbox.
The text was updated successfully, but these errors were encountered: