Skip to content
This repository has been archived by the owner on Jan 1, 2021. It is now read-only.

ulimit -p is not process limit #1165

Open
nnutter opened this issue May 13, 2016 · 3 comments
Open

ulimit -p is not process limit #1165

nnutter opened this issue May 13, 2016 · 3 comments
Labels
question Usability question, not directly related to an error with Boot2Docker

Comments

@nnutter
Copy link

nnutter commented May 13, 2016

I noticed that the comment and code don't agree here in rootfs/rootfs/usr/local/etc/init.d/docker#L102-L104:

    # Increasing the number of open files and processes by docker
    ulimit -n $DOCKER_ULIMITS
    ulimit -p $DOCKER_ULIMITS

-p is the pipe size whereas -u would be user processes. I don't know if it matters as it's been this way for a long time but wanted to report it in case it might be.

@tianon
Copy link
Contributor

tianon commented May 13, 2016

With the ulimit we have in boot2docker, the code is correct:

docker@boot2docker:~$ ulimit -a
-f: file size (blocks)             unlimited
-t: cpu time (seconds)             unlimited
-d: data seg size (kb)             unlimited
-s: stack size (kb)                8192
-c: core file size (blocks)        0
-m: resident set size (kb)         unlimited
-l: locked memory (kb)             64
-p: processes                      15667
-n: file descriptors               1024
-v: address space (kb)             unlimited
-w: locks                          unlimited
-e: scheduling priority            0
-r: real-time priority             0

It's probably worth adding a comment in that file noting this discrepancy. 😅

@nnutter
Copy link
Author

nnutter commented May 13, 2016

Ah, interesting. I thought to check different version of bash but not broad enough. =)

@basil-conto
Copy link

basil-conto commented Mar 28, 2017

The discrepancy spotted is not between the code and comment in question, nor between different versions of bash. Rather, it is between the options supported by the ulimit shell builtin in bash and dash , respectively. Notice that the script in question uses the latter shell. See http://askubuntu.com/a/251600 for a helpful explanation and suggestions.

@wglambert wglambert added the question Usability question, not directly related to an error with Boot2Docker label Jul 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Usability question, not directly related to an error with Boot2Docker
Projects
None yet
Development

No branches or pull requests

4 participants