go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.22k stars 5.42k forks source link

Deploying Gitea with Docker causes server disk write exceptions. #32007

Open AigeStudio opened 2 weeks ago

AigeStudio commented 2 weeks ago

Description

After Gitea is deployed in Docker mode and a demo project is pushed, it is observed for a week and a large number of BLOCK Input operations are seen through docker stats:

CONTAINER ID   NAME      CPU %     MEM USAGE / LIMIT     MEM %     NET I/O          BLOCK I/O         PIDS
d7165c75a99b   gitea     0.13%     116.3MiB / 7.634GiB   1.52%     19.2kB / 456kB   34.8GB / 24.6kB   20
c6881353dff8   nexus     0.43%     2.732GiB / 7.634GiB   35.78%    2.78kB / 0B      182MB / 15.2MB    95

For comparison, here is a Nexus service that has been running for half a month. This causes the server to have a large number of disk write operations and a surge in CPU usage during a fixed period of time. Gitea is not currently open to others and is still in the personal testing phase, so it is unlikely to be caused by the number of users.

Gitea Version

1.22.2

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

https://docs.gitea.com/zh-cn/installation/install-with-docker

Database

SQLite

lunny commented 1 week ago

Do you have any other operations rather than packages push? i.e. git push/pull?

Aathoss commented 1 day ago

I have the same problem: high disk usage, especially in writing, due to API calls.

The two services run on different machines:

As soon as I launch act_runner, the machine hosting Gitea experiences a constant disk usage of 1.5MB/s.

lunny commented 16 hours ago

I think the most possible I/O is the repository indexer of Gitea. act_runner will generate logs if there are tasks. The logs will be written to database first and then disk after finished.