-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
260a269
commit eee1549
Showing
1 changed file
with
24 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,20 +7,26 @@ | |
For extra safety, use a tmpfs or ramfs: | ||
ulimit -Sv 500000 | ||
sudo umount tmp && \ | ||
sudo mount -t tmpfs -o size=1g tmpfs tmp && \ | ||
sudo chown $USER:$USER tmp && | ||
./imagine-all-the-people.py | ||
``` | ||
ulimit -Sv 500000 | ||
mkdir -p tmp | ||
sudo umount tmp | ||
sudo mount -t tmpfs -o size=3g tmpfs tmp | ||
sudo chown $USER:$USER tmp | ||
cd tmp | ||
../many-commits.py | ||
``` | ||
The tags can be used to push by parts to GitHub, which does not accept 1M at once: | ||
remote='[email protected]:cirosantilli/test-many-commits-1m.git' | ||
for i in `seq 10 10 100`; do | ||
git --git-dir=tmp/repo.tmp/.git push -f "$remote" "$i:master" | ||
done | ||
# TODO for some reason I needed this afterwards. | ||
git --git-dir=tmp/repo.tmp/.git push "$remote" 'master' | ||
``` | ||
remote='[email protected]:cirosantilli/test-many-commits-1m.git' | ||
for i in `seq 10 10 100`; do | ||
git --git-dir=tmp/repo.tmp/.git push -f "$remote" "$i:master" | ||
done | ||
# TODO for some reason I needed this afterwards. | ||
git --git-dir=tmp/repo.tmp/.git push "$remote" 'master' | ||
``` | ||
""" | ||
|
||
import datetime | ||
|
@@ -30,11 +36,16 @@ | |
|
||
import util | ||
|
||
email = b'[email protected]' | ||
email = b'' | ||
name = b'' | ||
|
||
util.init() | ||
|
||
# https://stackoverflow.com/questions/9905257/git-push-fatal-unable-to-create-thread-resource-temporarily-unavailable | ||
subprocess.run(['git', 'config', '--local', 'pack.windowMemory', '50m']) | ||
subprocess.run(['git', 'config', '--local', 'pack.packSizeLimit', '50m']) | ||
subprocess.run(['git', 'config', '--local', 'pack.threads', '1']) | ||
|
||
tree = util.create_tree_with_one_file() | ||
commit = None | ||
if len(sys.argv) > 1: | ||
|
@@ -59,7 +70,7 @@ | |
print(datetime.datetime.now()) | ||
# Lose objects are too large and blow up the tmpfs. | ||
# Does clean packets, but the calculation takes more and more memory, | ||
# and slows down and blows up at the end. TODO which subcommand blows up eactly?. | ||
# and slows down and blows up at the end. TODO which subcommand blows up exactly?. | ||
#subprocess.check_output(['git', 'gc']) | ||
subprocess.check_output(['git', 'repack']) | ||
subprocess.check_output(['git', 'prune-packed']) | ||
|