High memory usage from “git status -z -u”?












4














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.










share|improve this question






















  • Is it a really large git project?
    – Philip Kirkbride
    Dec 1 '17 at 16:34






  • 2




    What are the full parameters of the git commands? Also, from the git-status manual - "-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.
    – DopeGhoti
    Dec 1 '17 at 16:37










  • @DopeGhoti Just git status -z -u. The problem is that I don't know which process called git status.
    – Qin Heyang
    Dec 2 '17 at 11:24
















4














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.










share|improve this question






















  • Is it a really large git project?
    – Philip Kirkbride
    Dec 1 '17 at 16:34






  • 2




    What are the full parameters of the git commands? Also, from the git-status manual - "-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.
    – DopeGhoti
    Dec 1 '17 at 16:37










  • @DopeGhoti Just git status -z -u. The problem is that I don't know which process called git status.
    – Qin Heyang
    Dec 2 '17 at 11:24














4












4








4







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.










share|improve this question













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.







ubuntu memory git






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 1 '17 at 16:31









Qin HeyangQin Heyang

212




212












  • Is it a really large git project?
    – Philip Kirkbride
    Dec 1 '17 at 16:34






  • 2




    What are the full parameters of the git commands? Also, from the git-status manual - "-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.
    – DopeGhoti
    Dec 1 '17 at 16:37










  • @DopeGhoti Just git status -z -u. The problem is that I don't know which process called git status.
    – Qin Heyang
    Dec 2 '17 at 11:24


















  • Is it a really large git project?
    – Philip Kirkbride
    Dec 1 '17 at 16:34






  • 2




    What are the full parameters of the git commands? Also, from the git-status manual - "-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.
    – DopeGhoti
    Dec 1 '17 at 16:37










  • @DopeGhoti Just git status -z -u. The problem is that I don't know which process called git status.
    – Qin Heyang
    Dec 2 '17 at 11:24
















Is it a really large git project?
– Philip Kirkbride
Dec 1 '17 at 16:34




Is it a really large git project?
– Philip Kirkbride
Dec 1 '17 at 16:34




2




2




What are the full parameters of the git commands? Also, from the git-status manual - "-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.
– DopeGhoti
Dec 1 '17 at 16:37




What are the full parameters of the git commands? Also, from the git-status manual - "-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.
– DopeGhoti
Dec 1 '17 at 16:37












@DopeGhoti Just git status -z -u. The problem is that I don't know which process called git status.
– Qin Heyang
Dec 2 '17 at 11:24




@DopeGhoti Just git status -z -u. The problem is that I don't know which process called git status.
– Qin Heyang
Dec 2 '17 at 11:24










1 Answer
1






active

oldest

votes


















0














@DopeGhoti is correct in the comments. In my case, it turns out to be the problem of Visual Studio Code working on dictionary from mounted network locations. After disable the git in Visual Studio Code, the problem is gone.






share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f408229%2fhigh-memory-usage-from-git-status-z-u%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    @DopeGhoti is correct in the comments. In my case, it turns out to be the problem of Visual Studio Code working on dictionary from mounted network locations. After disable the git in Visual Studio Code, the problem is gone.






    share|improve this answer


























      0














      @DopeGhoti is correct in the comments. In my case, it turns out to be the problem of Visual Studio Code working on dictionary from mounted network locations. After disable the git in Visual Studio Code, the problem is gone.






      share|improve this answer
























        0












        0








        0






        @DopeGhoti is correct in the comments. In my case, it turns out to be the problem of Visual Studio Code working on dictionary from mounted network locations. After disable the git in Visual Studio Code, the problem is gone.






        share|improve this answer












        @DopeGhoti is correct in the comments. In my case, it turns out to be the problem of Visual Studio Code working on dictionary from mounted network locations. After disable the git in Visual Studio Code, the problem is gone.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 22 hours ago









        Qin HeyangQin Heyang

        212




        212






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f408229%2fhigh-memory-usage-from-git-status-z-u%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

            is 'sed' thread safe

            How to make a Squid Proxy server?