stashfree
stashfree

Reputation: 675

How can I test all ulimits of docker?

Docker containers are currently running at unlimited ulimits...

However, the host system has limits on everything.

How can I test if it is complying with the host system? Any ways I can simulate a max open file connection etc?

I'm curious how docker actually allocates this limit considering a server is limited by a lot of things including open ports etc.

Currently from what I think... there are different ips assigned to different containers... so each ips can have 65535 ports?

So that means unlimited ports for docker??? What about file descriptors?

Anyone has any ideas?

Upvotes: 0

Views: 1765

Answers (2)

creack
creack

Reputation: 121492

Docker does not tamper with ulimits, if the host is limited, then the container will be as well.

Containers are nothing more than specials processes, so the fd limit is the same as for any other process on the host.

Concerning the port, same thing, if you host has any limitation, Docker will not bypass them. It just creates a veth pair. So you will be most likely limited to 65535 * max veth ports.

You can test the limit by writing a small program that will open N files or for N times and see if it works.

Upvotes: 1

Murali KG
Murali KG

Reputation: 134

Docker ulimits are configured here /etc/init/docker.conf , the docker daemon config, which will be used for all the containers.

Also check this answer for more information

Upvotes: 0

Related Questions