Add possibility to reuse internal git processes #10376

Closed
opened 2025-11-02 09:05:36 -06:00 by GiteaMirror · 11 comments
Owner

Originally created by @PulsarFX on GitHub (Mar 3, 2023).

Feature Description

Currently gitea starts one or more new git.exe processes to handle incoming requests.
We have 300+ repos we need to push. This takes about 5-8minutes to finish (using c# gitea api).
I assume, that most of the time is lost inside gitea from starting and stopping git processes, like you can see in this process explorer screenshot:

giteaPushLotsOfGitExe

There should be a way to keep a bunch of git processes running to make gitea reuse them (like worker processes in apache or similar servers)
(or is it already possible?)

Screenshots

No response

Originally created by @PulsarFX on GitHub (Mar 3, 2023). ### Feature Description Currently gitea starts one or more new git.exe processes to handle incoming requests. We have 300+ repos we need to push. This takes about 5-8minutes to finish (using c# gitea api). I assume, that most of the time is lost inside gitea from starting and stopping git processes, like you can see in this process explorer screenshot: ![giteaPushLotsOfGitExe](https://user-images.githubusercontent.com/4960210/222752951-9e034b56-95a6-43b0-beef-4ed68c4ac081.png) There should be a way to keep a bunch of git processes running to make gitea reuse them (like worker processes in apache or similar servers) (or is it already possible?) ### Screenshots _No response_
GiteaMirror added the type/proposaltype/feature labels 2025-11-02 09:05:36 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Mar 3, 2023):

IMO it's not possible .... (maybe you could try the gogit version, but I guess it doesn't help too much)

If you have a heavy server, I think Gitea on Linux wins.

@wxiaoguang commented on GitHub (Mar 3, 2023): IMO it's not possible .... (maybe you could try the `gogit` version, but I guess it doesn't help too much) If you have a heavy server, I think Gitea on Linux wins.
Author
Owner

@zeripath commented on GitHub (Mar 3, 2023):

I just don't think it's possible. We provide builds with gogit for those on Windows because of the issue of expensive processes.

@zeripath commented on GitHub (Mar 3, 2023): I just don't think it's possible. We provide builds with gogit for those on Windows because of the issue of expensive processes.
Author
Owner

@silverwind commented on GitHub (Mar 4, 2023):

Unless git has a interface where you can pipe in multiple commands into a single process, I see no way.

@silverwind commented on GitHub (Mar 4, 2023): Unless git has a interface where you can pipe in multiple commands into a single process, I see no way.
Author
Owner

@PulsarFX commented on GitHub (Mar 4, 2023):

Thanks for all your feedback. I'll try with the gogit Version.

@PulsarFX commented on GitHub (Mar 4, 2023): Thanks for all your feedback. I'll try with the gogit Version.
Author
Owner

@stuzer05 commented on GitHub (Mar 4, 2023):

Thanks for all your feedback. I'll try with the gogit Version.

gogit repository has been archived by the owner on Mar 25, 2022. It is now read-only.

@stuzer05 commented on GitHub (Mar 4, 2023): > Thanks for all your feedback. I'll try with the gogit Version. gogit repository has been archived by the owner on Mar 25, 2022. It is now read-only.
Author
Owner

@zeripath commented on GitHub (Mar 4, 2023):

Which repository are you referring to? https://github.com/go-git/go-git is not archived

@zeripath commented on GitHub (Mar 4, 2023): Which repository are you referring to? https://github.com/go-git/go-git is not archived
Author
Owner

@stuzer05 commented on GitHub (Mar 4, 2023):

Which repository are you referring to? https://github.com/go-git/go-git is not archived

Pardon me, might've seen the wrong one https://github.com/speedata/gogit

@stuzer05 commented on GitHub (Mar 4, 2023): > Which repository are you referring to? https://github.com/go-git/go-git is not archived Pardon me, might've seen the wrong one https://github.com/speedata/gogit
Author
Owner

@PulsarFX commented on GitHub (Mar 4, 2023):

I mean the gitea build with gogit

@PulsarFX commented on GitHub (Mar 4, 2023): I mean the gitea build with gogit
Author
Owner

@PulsarFX commented on GitHub (Mar 6, 2023):

Feedback on using gitea-1.18.5-gogit-windows-4.0-amd64.exe :

  • Process Explorer looks about the same,
  • Test scenario takes about the same time
  • but it has far less impact on the CPU

maybe you can put a hint or a description to the main page on what gogit is or what it does different to the gitea-1.18.5-gogit-windows-4.0-amd64.exe

@PulsarFX commented on GitHub (Mar 6, 2023): Feedback on using gitea-1.18.5-gogit-windows-4.0-amd64.exe : - Process Explorer looks about the same, - Test scenario takes about the same time - but it has far less impact on the CPU maybe you can put a hint or a description to the main page on what gogit is or what it does different to the gitea-1.18.5-gogit-windows-4.0-amd64.exe
Author
Owner

@wxiaoguang commented on GitHub (Mar 6, 2023):

maybe you can put a hint or a description to the main page on what gogit is or what it does different to the gitea-1.18.5-gogit-windows-4.0-amd64.exe

There was one: https://docs.gitea.io/en-us/install-from-binary/#choosing-the-right-file

Feel free to improve the documents ~~

@wxiaoguang commented on GitHub (Mar 6, 2023): > maybe you can put a hint or a description to the main page on what gogit is or what it does different to the gitea-1.18.5-gogit-windows-4.0-amd64.exe There was one: https://docs.gitea.io/en-us/install-from-binary/#choosing-the-right-file Feel free to improve the documents ~~
Author
Owner

@wxiaoguang commented on GitHub (Mar 6, 2023):

Test scenario takes about the same time

ps: I suspect there might be other bottlenecks, for example, disk io? network? And Gitea needs the real git.exe (not the gogit) to handle push/pull in many cases, so Linux wins (even if a Linux VM in Windows) 😂 Sever performance optimization is a big topic.

@wxiaoguang commented on GitHub (Mar 6, 2023): > Test scenario takes about the same time ps: I suspect there might be other bottlenecks, for example, disk io? network? And Gitea needs the real git.exe (not the gogit) to handle push/pull in many cases, so Linux wins (even if a Linux VM in Windows) 😂 Sever performance optimization is a big topic.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10376