当我镜像一个文件很多的项目后,打开项目会出现cpu负载增高问题。
wfeii1980 opened this issue · 1 comments
wfeii1980 commented
Describe the feature
当文件过时像github做一下省略
Sorry, we had to truncate this directory to 1,000 files. 10,119 entries were omitted from the list.
Describe the solution you'd like
Describe alternatives you've considered
Additional context
当我镜像了https://github.com/loongarchlinux/extra 这个项目后,点开项目就会造成cpu高负载。我不确定是bug还是性能问题。
$ ps -ax | grep git
211977 pts/0 R+ 0:00 git log --pretty=format:%H d29151d01888153bf511873f45234bfc4b235d52 --max-count=1 -- fdkaac
211978 pts/0 R+ 0:00 git log --pretty=format:%H d29151d01888153bf511873f45234bfc4b235d52 --max-count=1 -- fdm
211979 pts/0 R+ 0:00 git log --pretty=format:%H d29151d01888153bf511873f45234bfc4b235d52 --max-count=1 -- fdupes
211981 pts/10 S+ 0:00 grep git
211982 pts/0 R+ 0:00 git log --pretty=format:%H d29151d01888153bf511873f45234bfc4b235d52 --max-count=1 -- feathernotes
211983 pts/0 R+ 0:00 git log --pretty=format:%H d29151d01888153bf511873f45234bfc4b235d52 --max-count=1 -- featherpad
$ top
top - 18:40:55 up 9:50, 1 user, load average: 7.78, 4.08, 5.11
任务: 277 total, 9 running, 253 sleeping, 0 stopped, 15 zombie
%Cpu0 : 64.5 us, 33.2 sy, 0.0 ni, 1.3 id, 0.0 wa, 0.7 hi, 0.3 si, 0.0 st
%Cpu1 : 64.7 us, 33.3 sy, 0.0 ni, 1.0 id, 0.0 wa, 0.7 hi, 0.3 si, 0.0 st
%Cpu2 : 63.7 us, 34.0 sy, 0.0 ni, 1.7 id, 0.0 wa, 0.7 hi, 0.0 si, 0.0 st
%Cpu3 : 62.7 us, 36.0 sy, 0.0 ni, 0.7 id, 0.0 wa, 0.7 hi, 0.0 si, 0.0 st
%Cpu4 : 60.8 us, 36.9 sy, 0.0 ni, 0.3 id, 0.0 wa, 1.7 hi, 0.3 si, 0.0 st
%Cpu5 : 61.3 us, 37.4 sy, 0.0 ni, 0.7 id, 0.0 wa, 0.7 hi, 0.0 si, 0.0 st
%Cpu6 : 60.3 us, 38.7 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.7 hi, 0.3 si, 0.0 st
%Cpu7 : 61.8 us, 37.2 sy, 0.0 ni, 0.3 id, 0.0 wa, 0.7 hi, 0.0 si, 0.0 st
MiB Mem : 15875.9 total, 5501.7 free, 3610.3 used, 7731.2 buff/cache
MiB Swap: 4096.0 total, 4096.0 free, 0.0 used. 12265.5 avail Mem
...
Code of Conduct
- I agree to follow this project's Code of Conduct
fslongjin commented
我也遇到了,尤其是使用gogs镜像Rust的crates-io index的时候,每次同步之后,只要第一次打开网页访问,就会把我所有的CPU核占满。
在e5-2696v3 36c72t的机器上,他一直好像在运行git log,整个过程要持续几十秒钟才会结束