|
7 | 7 |
|
8 | 8 | For extra safety, use a tmpfs or ramfs:
|
9 | 9 |
|
10 |
| - ulimit -Sv 500000 |
11 |
| - sudo umount tmp && \ |
12 |
| - sudo mount -t tmpfs -o size=1g tmpfs tmp && \ |
13 |
| - sudo chown $USER:$USER tmp && |
14 |
| - ./imagine-all-the-people.py |
| 10 | +``` |
| 11 | +ulimit -Sv 500000 |
| 12 | +mkdir -p tmp |
| 13 | +sudo umount tmp |
| 14 | +sudo mount -t tmpfs -o size=3g tmpfs tmp |
| 15 | +sudo chown $USER:$USER tmp |
| 16 | +cd tmp |
| 17 | +../many-commits.py |
| 18 | +``` |
15 | 19 |
|
16 | 20 | The tags can be used to push by parts to GitHub, which does not accept 1M at once:
|
17 | 21 |
|
18 |
| - remote='[email protected]:cirosantilli/test-many-commits-1m.git' |
19 |
| - for i in `seq 10 10 100`; do |
20 |
| - git --git-dir=tmp/repo.tmp/.git push -f "$remote" "$i:master" |
21 |
| - done |
22 |
| - # TODO for some reason I needed this afterwards. |
23 |
| - git --git-dir=tmp/repo.tmp/.git push "$remote" 'master' |
| 22 | +``` |
| 23 | +remote='[email protected]:cirosantilli/test-many-commits-1m.git' |
| 24 | +for i in `seq 10 10 100`; do |
| 25 | + git --git-dir=tmp/repo.tmp/.git push -f "$remote" "$i:master" |
| 26 | +done |
| 27 | +# TODO for some reason I needed this afterwards. |
| 28 | +git --git-dir=tmp/repo.tmp/.git push "$remote" 'master' |
| 29 | +``` |
24 | 30 | """
|
25 | 31 |
|
26 | 32 | import datetime
|
|
30 | 36 |
|
31 | 37 | import util
|
32 | 38 |
|
33 |
| - |
| 39 | +email = b'' |
34 | 40 | name = b''
|
35 | 41 |
|
36 | 42 | util.init()
|
37 | 43 |
|
| 44 | +# https://stackoverflow.com/questions/9905257/git-push-fatal-unable-to-create-thread-resource-temporarily-unavailable |
| 45 | +subprocess.run(['git', 'config', '--local', 'pack.windowMemory', '50m']) |
| 46 | +subprocess.run(['git', 'config', '--local', 'pack.packSizeLimit', '50m']) |
| 47 | +subprocess.run(['git', 'config', '--local', 'pack.threads', '1']) |
| 48 | + |
38 | 49 | tree = util.create_tree_with_one_file()
|
39 | 50 | commit = None
|
40 | 51 | if len(sys.argv) > 1:
|
|
59 | 70 | print(datetime.datetime.now())
|
60 | 71 | # Lose objects are too large and blow up the tmpfs.
|
61 | 72 | # Does clean packets, but the calculation takes more and more memory,
|
62 |
| - # and slows down and blows up at the end. TODO which subcommand blows up eactly?. |
| 73 | + # and slows down and blows up at the end. TODO which subcommand blows up exactly?. |
63 | 74 | #subprocess.check_output(['git', 'gc'])
|
64 | 75 | subprocess.check_output(['git', 'repack'])
|
65 | 76 | subprocess.check_output(['git', 'prune-packed'])
|
|
0 commit comments