Skip to content
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

[BUG] Very high IO wait on initial launch #257

Closed
1 task done
mpatton125 opened this issue Jun 1, 2023 · 8 comments
Closed
1 task done

[BUG] Very high IO wait on initial launch #257

mpatton125 opened this issue Jun 1, 2023 · 8 comments

Comments

@mpatton125
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Due to the chown present when the image is initially launched, my system faces very high IO wait that impacts the rest of my system activities.

To put this in context I have a very large library with over 570000 books and more than 1 million files under /app/calibre-web/cps/cache (bind mount to the host for persistence).

Would it be possible to replace the global chown with a find that applies a chown only to files without the correct ownership already?

Expected Behavior

Only files that were not owned by abc.abc should be chown'ed.

Steps To Reproduce

  1. Launch the container
  2. Wait while the chown takes forever...

Environment

- OS: Ubuntu 22.04
- How docker service was installed: distro's packagemanager

CPU architecture

x86-64

Docker creation

docker-compose

  calibre-web:
    image: ghcr.io/linuxserver/calibre-web:nightly
    restart: unless-stopped
    networks:
      docker_vlan:
    hostname: calibre-web
    container_name: calibre-web
    mac_address: 02:42:0a:00:02:21
    volumes:
      - type: bind
        source: /storage/docker/calibre-web/config/
        target: /config/
      - type: bind
        source: '/storage/Library'
        target: /books
      - type: bind
        source: /storage/docker/calibre-web/cache/
        target: /app/calibre-web/cps/cache/
    environment:
      - TZ=Australia/Sydney
      - PUID=1000
      - GUID=1000
      - DOCKER_MODS=linuxserver/mods:universal-calibre

Container logs

Not sure this is relevant.
@github-actions
Copy link

github-actions bot commented Jun 1, 2023

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@github-actions
Copy link

github-actions bot commented Jul 1, 2023

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

@mpatton125
Copy link
Author

I modified /root/etc/s6-overlay/s6-rc.d/init-calibre-web-config/run as follows and it appears to work:

# permissions
#lsiown -R abc:abc \
#    /config \
#    /app/calibre-web/cps/cache

/usr/bin/find /config \( \! -group abc -o \! -user abc \) -exec chown abc:abc {} \;
/usr/bin/find /app/calibre-web/cps/cache \( \! -group abc -o \! -user abc \) -exec chown abc:abc {} \;

@github-actions
Copy link

github-actions bot commented Aug 1, 2023

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

@mpatton125
Copy link
Author

Any chance my patch (above) is suitable?

@LinuxServer-CI
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

@quietsy
Copy link
Member

quietsy commented Sep 18, 2023

@mpatton125 We pushed a fix for lsiown, can you please check if the problem is fixed now?

@mpatton125
Copy link
Author

@quietsy - I can confirm the fix works as expected for me. No more huge spikes of IO wait. Many thanks.

@quietsy quietsy closed this as completed Sep 19, 2023
@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants