Huge memory consumption during 'git push'
  • MDW
  • Order of the Butterfly
    Order of the Butterfly
    MDW
    Posts: 455 from 2003/7/26
    From: Wroclaw/Poland
    I uses PowerBook G4 with 1GB RAM. If I try to do git push I get low memory message. I added to git global config these options:

    Code:
    [core]
    packedGitLimit = 2m
    packedGitWindowSize = 2m
    [pack]
    windowMemory = 2m
    deltaCacheSize = 1
    packSizeLimit = 2m
    threads = 1
    window = 0
    depth = 1


    I noticed that memory consumtion is lower (no message). Unfortunately I sill can't do git push.
    After git push -v I see in CLI:
    Code:
    Pushing to /Files/MDW/dev/git_test_3_clone/../git_test_3/
    Enumerating objects: 1, done.
    Counting objects: 100% (1/1), done.
    Writing objects: 100% (1/1), 189 bytes | 23.00 KiB/s, done.
    Total 1 (delta 0), reused 0 (delta 0), pack-reused 0


    It taken about 350MB of memory and the operation is not finished.

    Could someone help me? What can I do for use git under MorphOS?
    This is very important for me. I though git for MorphOS is usable. I am a bit disappointed...

    [ Edited by MDW 19.11.2020 - 18:49 ]
  • »18.11.20 - 17:32
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 2996 from 2003/3/5
    From: Canada
    Some extra details about the repo you're trying to push to might help. It certainly does work well for github.
  • »18.11.20 - 18:07
    Profile Visit Website
  • MDW
  • Order of the Butterfly
    Order of the Butterfly
    MDW
    Posts: 455 from 2003/7/26
    From: Wroclaw/Poland
    Quote:

    jacadcaps wrote:
    Some extra details about the repo you're trying to push to might help. It certainly does work well for github.

    Now I am testing MorphOS version of git. I just wanted to check if the git works. I create a repository with random sourcecode (not mine), clone locally on my computer (from one folder to another folder). I create empty commit and try to push it to "remote". It is not huge repository (12MB).
    Do you think cause of the problem is in this repository?
    I will try to use another code.
  • »18.11.20 - 18:21
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 2996 from 2003/3/5
    From: Canada
    Not sure we have ever tested a filesystem 2 filesystem scenario - I certainly haven't.
  • »18.11.20 - 20:00
    Profile Visit Website
  • MDW
  • Order of the Butterfly
    Order of the Butterfly
    MDW
    Posts: 455 from 2003/7/26
    From: Wroclaw/Poland
    Quote:

    jacadcaps wrote:
    Not sure we have ever tested a filesystem 2 filesystem scenario - I certainly haven't.

    I compared the behaviour with git on macOS. In this case behaviour on macOS is a bit different. Git on macOS shows an error-message, git on MorphOS couldn't stop the operation and return allocated memory.
    However I probably not correctly configured this test pseudo-remote 'BARE' repository. 😂 It could be reason of the problem. I will learn more about git, check it and inform you there. 😃

    Memory consumption of the git can be set to lower. It works correctly.
  • »18.11.20 - 21:05
    Profile Visit Website
  • MDW
  • Order of the Butterfly
    Order of the Butterfly
    MDW
    Posts: 455 from 2003/7/26
    From: Wroclaw/Poland
    I have checked repository config again. Unfortunately I don't know why it doesn't work. The same operations on macOS (Catalina) work.

    I add "bare" remote repository to my project local git:
    Code:
    Files:MDW/dev/git_test_3> git remote add origin /Files:MDW/dev/git_test_3_server_repo.git/


    Check if the remote repository is aded:
    Code:
    Files:MDW/dev/git_test_3> git remote
    origin


    Show more details about the origin:
    Code:
    Files:MDW/dev/git_test_3> git remote show origin
    * remote origin
    Fetch URL: /Files:MDW/dev/git_test_3_server_repo.git
    Push URL: /Files:MDW/dev/git_test_3_server_repo.git
    HEAD branch: (unknown)


    Files:MDW/dev/git_test_3/.git/config contains:
    Code:
    [core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
    ignorecase = true
    [diff]
    tool = kompare
    [remote "origin"]
    url = /Files:MDW/dev/git_test_3_server_repo.git/
    fetch = +refs/heads/*:refs/remotes/origin/*


    However if I try to map master to origin (-u):
    Code:
    Files:MDW/dev/git_test_3> git push origin master -u
    Enumerating objects: 323, done.
    Counting objects: 100% (323/323), done.
    Writing objects: 100% (323/323), 3.39 MiB | 1.26 MiB/s, done.
    Total 323 (delta 0), reused 0 (delta 0), pack-reused 0

    the process uses about 350MB and stops.


    I am not sure how the url (Files:MDW/dev/git_test_3_server_repo.git/) should looks.
    If I use "Files:MDW/dev/git_test_3_server_repo.git/" there is error message.
    If I add "/" before the path, no error, remote exists, I see details of the remote. However push freezes (not crash, just stop).


    [ Edited by MDW 19.11.2020 - 14:14 ]
  • »19.11.20 - 12:55
    Profile Visit Website
  • MDW
  • Order of the Butterfly
    Order of the Butterfly
    MDW
    Posts: 455 from 2003/7/26
    From: Wroclaw/Poland
    Quote:

    jacadcaps wrote:
    Some extra details about the repo you're trying to push to might help. It certainly does work well for github.

    You are right. I have just checked - everything works well if I use GitHub.

    It is interesting why the problem occurs if I use a folder on my HDD as "remote" repository. It works on git for macOS.
  • »19.11.20 - 18:48
    Profile Visit Website
  • MDW
  • Order of the Butterfly
    Order of the Butterfly
    MDW
    Posts: 455 from 2003/7/26
    From: Wroclaw/Poland
    Quote:

    MDW wrote:
    Quote:

    jacadcaps wrote:
    Some extra details about the repo you're trying to push to might help. It certainly does work well for github.

    You are right. I have just checked - everything works very well if I use GitHub.

    It is interesting why the problem occurs if I use a folder on my HDD as "remote" repository. It works on git for macOS.
  • »19.11.20 - 20:43
    Profile Visit Website