Skip to content
This repository was archived by the owner on Mar 24, 2020. It is now read-only.
This repository was archived by the owner on Mar 24, 2020. It is now read-only.

File ULIMITs for Linux containers #34

Open

Description

@dwrightpulse

Hi,

I'm working on a PoC build to run Linux and Windows-based containers side by side on WS2019. To enable the side by side nature I have deployed the WS2019 host as per the instructions at https://github.com/linuxkit/lcow, using dockerd.exe and docker.exe from the master project from 13/02/19 and the v4.14.35-v0.3.9 release for the initrd.img and kernel files.

I can successfully run Linux containers, but when running the influxdb:1.7.4 container from https://hub.docker.com/_/influxdb, and writing to the database the console output report that it is unable to write data due to too many open files in use. We use this image in Azure ACI and have no issues with it.

Having done some investigation, the ULIMIT for files in the running container when running in LCOW on the 2019 host are 1024 and when running in ACI or Docker Desktop on Win 10-1809, the limits are over 1 million (see attached screenshots)

ulimit influx in azure
influx ulimit in docker desktop
ulimit influx in docker lcow on ws2019

I'm posting here as concluding this is an issue with the LinuxKit kernel that this solution uses. I have tried to see if I can use alternate kernel files to confirm if this is the issue (https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/linux-containers suggested Kata and Clear Linux kernels (but I have got nowhere with these 2 options so far)) and I am unable to over-ride the default files ulimit in the daemon.json file (as per https://docs.docker.com/engine/reference/commandline/dockerd/) as when starting the dockerd daemon it reports that this is not configurable in Windows (see further attached screenshot)

default-ulimit in docker lcow on ws2019

As a way of progressing, I'm happy to try the Kata or Clear kernel option if anyone can give me some guidance on how to get hold of the right files and configure LCOW to use them....

Activity

  1. justincormack commented on Mar 1, 2019

    @justincormack
    Member

    That limit will need to be set in https://github.com/Microsoft/opengcs/blob/master/init/init.c so you may want to open an issue there.

  2. dwrightpulse commented on Mar 1, 2019

    @dwrightpulse
    Author

    Thanks Justin, I'll do that...

  3. jstarks commented on Mar 2, 2019

    @jstarks

    We can increase the default there, but we should also fix Docker to support —ulimit and —default-ulimit when LCOW is supported. @jhowardmsft

  4. dwrightpulse commented on Mar 15, 2019

    @dwrightpulse
    Author

    @jhowardmsft @jstarks - Any update on this please?

  5. lowenna commented on Mar 15, 2019

    @lowenna

    Working on higher priority stuff right now. It’s on the list

  6. dwrightpulse commented on Mar 15, 2019

    @dwrightpulse
    Author

    Thanks John, any idea on timescale. My PoC timescale is end of May, is that feasible?

  7. lowenna commented on Mar 15, 2019

    @lowenna

    I can’t provide any timescale.

  8. dwrightpulse commented on Mar 15, 2019

    @dwrightpulse
    Author

    OK, can you give any input on using alternate kernels within LCOW to see if this circumvents the issue?

  9. lowenna commented on Mar 15, 2019

    @lowenna

    Not really. I was going to look at fixing it from moby not via an alt kernel

  10. dwrightpulse commented on May 15, 2019

    @dwrightpulse
    Author

    @jhowardmsft - are you any closer to fixing this in Moby?

    Will the Build announcements ref WSL2 have any effect on how this is implemented in the future?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions