Skip to content

toolbox becomes unusably slow when creating lots of small files in /tmp #513

Closed

Description

@hferreiro

I have a process that from time to time creates lots of log files on /tmp. In the order of tens or hundreds of thousands. When this happens, fuse-overlayfs uses 100% of the CPU and everything works very slowly.

Trying to remove /tmp contents is particularly slow. Restarting the container doesn't help.

Activity

  1. A6GibKm commented on Jul 24, 2020

    @A6GibKm

    Have you tested this in other folders inside the sandbox or folder in your home? As far as I know, rootless podman is very slow when it comes to file IO in general.

  2. debarshiray commented on Jul 28, 2020

    @debarshiray
    Member

    Can you reproduce this with:

    $ podman run --rm -it --env=TERM=$TERM registry.fedoraproject.org/f31/fedora-toolbox:31 /bin/bash
    

    /tmp is mounted as a fuse-overlayfs, both in Toolbox containers and in stock Podman containers, so I'd say this needs to be moved to fuse-overlayfs. Although, I do wonder why Podman isn't mounting a tmpfs on /tmp.

    @giuseppe ?

  3. giuseppe commented on Jul 29, 2020

    @giuseppe
    Member

    this is definitely a fuse-overlayfs issue. Even if we manage to make it faster, dealing with so many files will always be slow using a FUSE file system.

    Would it be possible to mount a tmpfs on /tmp? I think that is the best solution.

  4. debarshiray commented on Jul 29, 2020

    @debarshiray
    Member

    Would it be possible to mount a tmpfs on /tmp?
    I think that is the best solution.

    Yes, I think so too. I was wondering if that's something Podman should do by default, or whether it's better if Toolbox explicitly did it. I am fine with either alternative.

    Thanks for taking a look, @giuseppe

  5. giuseppe commented on Jul 29, 2020

    @giuseppe
    Member

    Yes, I think so too. I was wondering if that's something Podman should do by default, or whether it's better if Toolbox explicitly did it. I am fine with either alternative.

    I'd also prefer we had a tmpfs by default, but I think we are just following what Docker does.

  6. hferreiro commented on Aug 5, 2020

    @hferreiro
    Author

    Yes, I confirm this is an issue with podman too. What's interesting is what's keeping fuse-overlayfs busy once the files are created. I'm trying to reproduce the issue again to find out about that.

  7. debarshiray commented on Aug 5, 2020

    @debarshiray
    Member

    Yes, I confirm this is an issue with podman too. What's interesting
    is what's keeping fuse-overlayfs busy once the files are created. I'm
    trying to reproduce the issue again to find out about that.

    Thank you for digging into it! Feel free to file an issue against fuse-overlayfs if you find anything, and CC me.

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