linuxserver/docker-ubooquity

High CPU load while apparently idle

Waldorf3 opened this issue · 3 comments

linuxserver.io


Expected Behavior

While not being actively used or doing housekeeping (i.e. scanning etc) it should run with negligible CPU load like any other Docker container

Current Behavior

It runs with up to 100% of a full core:

Steps to Reproduce

  1. start the docker container any way you like.
  2. monitor logs, wait for all the initial housekeeping to complete
  3. start a cpu monitoring program like top
#  top -c -d10
top - 14:01:29 up 12:19,  1 user,  load average: 1.77, 1.25, 0.73
Tasks: 224 total,   1 running, 223 sleeping,   0 stopped,   0 zombie
%Cpu(s): 26.4 us,  0.4 sy,  0.0 ni, 73.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :    923.1 total,     39.1 free,    457.3 used,    426.7 buff/cache
MiB Swap:   1024.0 total,    767.4 free,    256.6 used.    405.5 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
31991 www-data  20   0  233740 161832   4228 S 101.8  17.1   6:39.19 java -Xmx128m -jar /app/ubooquity/Ubooquity.jar -+
 2875 927       20   0   44804  19056   1968 S   1.3   2.0   2:46.36 python3 -um app --host 0.0.0.0 --port 5000
 2157 root      20   0  893568   2784   1452 S   0.7   0.3   0:09.69 /usr/bin/containerd-shim-runc-v2 -namespace moby +
  596 root      20   0 1196032  29016   5928 S   0.6   3.1   8:40.88 /usr/sbin/dockerd -H fd://
  495 root      20   0  962964  13552   6132 S   0.3   1.4   5:24.70 /usr/bin/containerd
  372 root      20   0       0      0      0 I   0.2   0.0   0:00.07 [kworker/0:0-events_power_efficient]
 2063 root      20   0  902212   5452   3040 S   0.2   0.6   0:51.42 /usr/bin/containerd-shim-runc-v2 -namespace moby +
 2884 root      20   0  174488  21720   9196 S   0.2   2.3   3:00.55 /usr/local/bin/node /usr/src/app/dist/bin/server.+
    1 root      20   0   34004   4004   2612 S   0.1   0.4   1:40.88 /sbin/init
  480 root      20   0       0      0      0 I   0.1   0.0   0:00.02 [kworker/3:1-events_power_efficient]

CONTAINER ID   NAMES                       IMAGE                             STATUS
d7172854223f   ubooquity                   lscr.io/linuxserver/ubooquity     Up 18 minutes
67309610ca90   eufy                        bropat/eufy-security-ws           Up 12 hours
82a8db524e37   wireguard                   lscr.io/linuxserver/wireguard     Up 12 hours
d8b53e46c97a   samba                       dperson/samba                     Up 12 hours (healthy)
c2afa2c2620c   portainer                   portainer/portainer-ce            Up 12 hours
1d4bde13ab5d   transmission-openvpn        haugene/transmission-openvpn      Up 4 hours (healthy)
67a14dc1edfe   emby                        emby/embyserver_arm32v7:latest    Up About an hour
aa52c615a146   whoogle-search              benbusby/whoogle-search           Up 12 hours (healthy)
b6ea8cdf6942   nginx-proxy-manager_app_1   jc21/nginx-proxy-manager:latest   Up 12 hours
f0fd60807e24   nginx-proxy-manager_db_1    jc21/mariadb-aria:latest          Up 12 hours
dc39b22af94f   pihole                      pihole/pihole:latest              Up 12 hours (healthy)

I realize this is "only" a tiny RPI 3B+ with very limited resources but notice the number of containers running, yet none of them appear in the top-10 CPU consumers. All containers perform absolutely acceptably when used, even Emby when not having to transcode to a webapp.

Environment

OS: Raspbian GNU/Linux 11 (bullseye) armv7l
CPU architecture: BCM2835 (4) @ 1.400GHz ( Raspberry Pi 3 Model B Plus Rev 1.3)
How docker service was installed:

From official repo, as per standard RPI guidelines. (curl -fsSL https://get.docker.com -o get-docker.sh)

Command used to create docker container (run/create/compose/screenshot)

docker-compose.yml:

version: "2.1"
services:
  ubooquity:
    image: lscr.io/linuxserver/ubooquity
    container_name: ubooquity
    environment:
      - PUID=33
      - PGID=33
      - TZ=Europe/Brussels
      - MAXMEM=128
    volumes:
      - ./config:/config
      - /usb1/data/public/Etoons:/comics
    ports:
      - 2202:2202
      - 2203:2203
    restart: unless-stopped

Docker logs

ubooquity    | -------------------------------------
ubooquity    |           _         ()
ubooquity    |          | |  ___   _    __
ubooquity    |          | | / __| | |  /  \
ubooquity    |          | | \__ \ | | | () |
ubooquity    |          |_| |___/ |_|  \__/
ubooquity    |
ubooquity    |
ubooquity    | Brought to you by linuxserver.io
ubooquity    | -------------------------------------
ubooquity    |
ubooquity    | To support LSIO projects visit:
ubooquity    | https://www.linuxserver.io/donate/
ubooquity    | -------------------------------------
ubooquity    | GID/UID
ubooquity    | -------------------------------------
ubooquity    |
ubooquity    | User uid:    33
ubooquity    | User gid:    33
ubooquity    | -------------------------------------
ubooquity    |
ubooquity    | [cont-init.d] 10-adduser: exited 0.
ubooquity    | [cont-init.d] 30-config: executing...
ubooquity    | [cont-init.d] 30-config: exited 0.
ubooquity    | [cont-init.d] 90-custom-folders: executing...
ubooquity    | [cont-init.d] 90-custom-folders: exited 0.
ubooquity    | [cont-init.d] 99-custom-files: executing...
ubooquity    | [custom-init] no custom files found exiting...
ubooquity    | [cont-init.d] 99-custom-files: exited 0.
ubooquity    | [cont-init.d] done.
ubooquity    | [services.d] starting services
ubooquity    | [services.d] done.
ubooquity    | 20220507 13:55:02 [main] INFO  com.ubooquity.Ubooquity - Running with the following parameters - headless: true, libraryport: -1, adminport: -1, remoteadmin: true, host: 0.0.0.0, debug: false, execdir: /config
ubooquity    | 20220507 13:55:02 [main] INFO  com.ubooquity.Ubooquity - #############################
ubooquity    | 20220507 13:55:02 [main] INFO  com.ubooquity.Ubooquity - #     Starting Ubooquity    #
ubooquity    | 20220507 13:55:02 [main] INFO  com.ubooquity.Ubooquity - #############################
ubooquity    | 20220507 13:55:02 [main] INFO  com.ubooquity.Ubooquity - Java version: 1.8.0_275
ubooquity    | 20220507 13:55:02 [main] INFO  com.ubooquity.Ubooquity - Java vendor: IcedTea
ubooquity    | 20220507 13:55:02 [main] INFO  com.ubooquity.Ubooquity - java vm name: OpenJDK Zero VM
ubooquity    | 20220507 13:55:02 [main] INFO  com.ubooquity.Ubooquity - java runtime name: OpenJDK Runtime Environment
ubooquity    | 20220507 13:55:02 [main] INFO  com.ubooquity.Ubooquity - Max heap size available: 123 MB
ubooquity    | 20220507 13:55:02 [main] INFO  com.ubooquity.Ubooquity - OS name: Linux
ubooquity    | 20220507 13:55:02 [main] INFO  com.ubooquity.Ubooquity - OS version: 5.15.32-v7+
ubooquity    | 20220507 13:55:02 [main] INFO  com.ubooquity.Ubooquity - OS architecture: arm
ubooquity    | 20220507 13:55:02 [main] INFO  com.ubooquity.Ubooquity - Loading local version info
ubooquity    | 20220507 13:55:02 [main] INFO  com.ubooquity.Ubooquity - Ubooquity 2.1.2 built on 2018-10-14 at 12:58
ubooquity    | 20220507 13:55:02 [main] INFO  com.ubooquity.Ubooquity - Creating application folders
ubooquity    | 20220507 13:55:02 [main] INFO  com.ubooquity.Ubooquity - Loading preferences
ubooquity    | 20220507 13:55:08 [main] INFO  org.eclipse.jetty.util.log - Logging initialized @18234ms to org.eclipse.jetty.util.log.Slf4jLog
ubooquity    | 20220507 13:55:08 [main] INFO  com.ubooquity.b - Starting internal server...
ubooquity    | 20220507 13:55:08 [main] INFO  com.ubooquity.b - Reverse proxy prefix: ubooquity
ubooquity    | 20220507 13:55:08 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Scanning books directories
ubooquity    | 20220507 13:55:08 [Scanner thread] WARN  com.ubooquity.data.database.a - Could not find id of root path /books (ignore this warning if you just added a new root directory)
ubooquity    | 20220507 13:55:08 [Scanner thread] INFO  com.ubooquity.data.database.a - Inserting/updating book entry in database : /books
ubooquity    | 20220507 13:55:08 [Scanner thread] INFO  com.ubooquity.data.database.a - Found 1 empty folders
ubooquity    | 20220507 13:55:08 [Scanner thread] INFO  com.ubooquity.data.database.a - Deleted empty folders from database. Looking for new ones...
ubooquity    | 20220507 13:55:08 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Finished scanning books directories, populating folders content cache
ubooquity    | 20220507 13:55:08 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Books folder content cache populated
ubooquity    | 20220507 13:55:08 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Scanning comics directories
ubooquity    | 20220507 13:55:09 [main] INFO  org.eclipse.jetty.server.Server - jetty-9.4.0.v20161208
ubooquity    | 20220507 13:55:09 [main] INFO  o.e.j.server.handler.ContextHandler - Started o.e.j.s.h.ContextHandler@2c971f{/,null,AVAILABLE,@admin}
ubooquity    | 20220507 13:55:09 [main] INFO  o.e.j.server.handler.ContextHandler - Started o.e.j.s.h.ContextHandler@172e513{/,null,AVAILABLE,@library}
ubooquity    | 20220507 13:55:09 [main] INFO  o.e.jetty.server.AbstractConnector - Started library@19a307b{HTTP/1.1,[http/1.1]}{0.0.0.0:2202}
ubooquity    | 20220507 13:55:09 [main] INFO  o.e.jetty.server.AbstractConnector - Started admin@8448fa{HTTP/1.1,[http/1.1]}{0.0.0.0:2203}
ubooquity    | 20220507 13:55:09 [main] INFO  org.eclipse.jetty.server.Server - Started @19409ms
ubooquity    | 20220507 13:55:09 [main] INFO  com.ubooquity.b - Internal server started. Listening on port 2202 (library) and 2203 (admin)
ubooquity    | Tyep Q then ENTER to exit
ubooquity    | 20220507 13:55:10 [Timer-0] INFO  com.ubooquity.Ubooquity - Checking latest available Ubooquity version from website
ubooquity    | 20220507 13:55:12 [Scanner thread] INFO  com.ubooquity.b.d - Reading metadata of comic file: /comics/Science - 2021 12 24.pdf
ubooquity    | 20220507 13:55:12 [Scanner thread] INFO  com.ubooquity.fileformat.pdf.b - Reading metadata of pdf file: /comics/Science - 2021 12 24.pdf
ubooquity    | 20220507 13:55:14 [Timer-0] INFO  com.ubooquity.Ubooquity - Latest version available: 2.1.2 - Current version: 2.1.2

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

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

This issue is locked due to inactivity