I am running Ubuntu 16.04. Recently I often find one or two "git status -z -u" process that each takes more than 5GB of memory. So I try to figure out what's going wrong. pstree gives me some output like this:
systemd──lightdm──lightdm──upstart──2*[git]
Apparently upstart started these git processes. So I try to list all jobs of upstart
$ initctl list
indicator-application start/running, process 2364
unicast-local-avahi stop/waiting
update-notifier-crash stop/waiting
upstart-udev-bridge start/running, process 1773
update-notifier-hp-firmware stop/waiting
xsession-init stop/waiting
dbus start/running, process 1774
no-pinentry-gnome3 stop/waiting
update-notifier-cds stop/waiting
gnome-keyring-ssh stop/waiting
gnome-session (Unity) start/running, process 2007
ssh-agent stop/waiting
unity7 start/running, process 2132
upstart-dbus-session-bridge start/running, process 1812
gpg-agent start/running
indicator-messages start/running, process 2343
logrotate stop/waiting
indicator-bluetooth start/running, process 2344
unity-panel-service start/running, process 2009
hud start/running, process 1969
im-config start/running
unity-gtk-module stop/waiting
session-migration stop/waiting
upstart-dbus-system-bridge start/running, process 1811
at-spi2-registryd start/running, process 1999
indicator-power start/running, process 2345
update-notifier-release stop/waiting
indicator-datetime start/running, process 2346
indicator-keyboard start/running, process 2347
unity-settings-daemon start/running, process 1971
indicator-sound start/running, process 2348
upstart-file-bridge start/running, process 1817
bamfdaemon start/running, process 1828
gnome-keyring stop/waiting
window-stack-bridge start/running, process 1786
indicator-printers start/running, process 2349
re-exec stop/waiting
upstart-event-bridge stop/waiting
unity-panel-service-lockscreen stop/waiting
indicator-session start/running, process 2350
and also
$ initctl status
unity7 start/running, process 2132
I didn't see anything that related to these git processes. Can anyone give me some hints of what's going wrong and how should I locate my problem? Thanks.
gitcommands? Also, from thegit-statusmanual - "-u[...] Because it takes extra work to find untracked files in the filesystem, this mode may take some time in a large working tree". If these are being run on a large directory tree or on a tree with unexpected mounts to other filesystems, that might be why they are taking unexpectedly large piles of time and resources.git status -z -u. The problem is that I don't know which process calledgit status.