Accions
Històrics i rèpliques amb git¶
Aquesta pàgina és purament un quadern de notes; si no enteneu gaire de què va, cap problema (FerranJorba)
- [http://thread.gmane.org/gmane.comp.version-control.git/70612 I don't want the .git directory next to my code], (http://news.gmane.org/gmane.comp.version%2dcontrol.git, 2008-01-16)
- /mnt/CLARIION/ és un volum muntat via NFS en un Clariion Celerra
- /mnt/VOLUM-I/ és un volum iSCSI SataBeast
11-feb-2008
$ git --version
git version 1.5.5.GIT
$ pwd
/mnt/CLARIION/ddd
$ export GIT_DIR=/mnt/VOLUM-I/1-01/ddd/ddd-docs.git
$ git init
Initialized empty Git repository in /mnt/VOLUM-I/1-01/ddd/ddd-docs.git
$ git add pub/ariel/ariel_a1951m1n21.info
fatal: This operation must be run in a work tree
$ export GIT_WORK_TREE=$PWD
$ git add pub/ariel/ariel_a1951m1n21.info
$ git status
# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached <file>..." to unstage)
#
# new file: pub/ariel/ariel_a1951m1n21.info
#
$ time git commit -m "Initial commit with a sample journal (Ariel)"
$ set | grep GIT >git.README
$ cat git.README
GIT_DIR=/mnt/VOLUM-I/1-01/ddd/ddd-docs.git
GIT_WORK_TREE=/mnt/CLARIION/ddd
$ du -hs uab
15G uab
$ du -hs pub
60G pub
$ time git add uab
2 h (aprox).
$ time git commit -m "Add uab/"
[...]
create mode 100644 uab/pubmat/02141493v49n2p351.png
create mode 100644 uab/pubmat/02141493v49n2p363.info
create mode 100644 uab/pubmat/02141493v49n2p363.pdf
create mode 100644 uab/pubmat/02141493v49n2p363.png
[...]
real 7m56.954s
user 0m18.609s
sys 0m41.211s
$ time git add pub/
[...]
error: open("pub/guies/2008-09/prova/sedQPO0P4"): Permission denied
fatal: unable to index file pub/guies/2008-09/prova/sedQPO0P4
real 38m51.920s
user 24m32.840s
sys 2m36.362s
$ rm -rf pub/guies/2008-09/prova/
$ time git add pub
error: readlink("pub/redes-vell/html-vol8/cover.png"): No such file or directory
fatal: unable to index file pub/redes-vell/html-vol8/cover.png
real 127m4.635s
user 82m19.817s
sys 7m31.012s
$ ls -l pub/redes-vell/html-vol8/cover.png
lrwxrwxrwx 1 ddd users 64 Dec 2 16:47 pub/redes-vell/html-vol8/cover.png -> an?lisis de redes sociales mediante diagramas estructurales.png
$ rm pub/redes-vell/html-vol8/cover.png
$ time git add pub
real 92m41.896s
user 47m43.651s
sys 3m33.265s
$ time git commit -m "Add pub/ (60 GB)"
Created commit e8fbc22: Add pub/ (60 GB)
[...]
create mode 100644 pub/virolet/a1926m5d22n229.pdf
create mode 100644 pub/virolet/a1926m5d22n229.png
create mode 100644 pub/virolet/a1926m5d29n230.info
create mode 100644 pub/virolet/a1926m5d29n230.pdf
create mode 100644 pub/virolet/a1926m5d29n230.png
[...]
real 9m34.080s
user 0m32.898s
sys 0m31.926s
$ date; time git fsck; date
Fri Feb 13 13:10:25 CET 2009
dangling blob b80060892154649dd815882397faf4ca2138bf9e
dangling blob e80c002edbca7759b239885502cc456215c652bc
dangling blob 560e586176aba8d733c52b6f7389aa9619203cf7
dangling blob e214983717f3b2bdf78abf2ceb5d3ba9957fc342
[...]
dangling blob 4ba69f45849c3d0b71cdaebc5af15d11039781fc
dangling blob 8bbaff6754c0248c9617777c832b67b0b84c68af
dangling blob f7e90f9b31478fdff6f85ca479b134c092644000
dangling blob 0bf747922da7539ed0b7e384ef28601ecc5ebbd1
real 121m52.941s
user 42m25.515s
sys 3m24.445s
Fri Feb 13 15:12:18 CET 2009
$ date; time git count-objects; date
Mon Feb 16 09:27:59 CET 2009
143692 objects, 71828560 kilobytes
real 2m2.457s
user 0m0.088s
sys 0m1.700s
Mon Feb 16 09:30:02 CET 2009
$ du -hs
69G .
$ date; time git gc; du -hs; date
Mon Feb 16 09:33:07 CET 2009
Counting objects: 143557, done.
Compressing objects: 100% (141209/141209), done.
Writing objects: 100% (143557/143557), done.
Total 143557 (delta 44795), reused 0 (delta 0)
Removing duplicate objects: 100% (256/256), done.
real 688m22.913s
user 522m33.703s
sys 23m16.447s
68G .
Mon Feb 16 21:01:31 CET 2009
$ du -hs
68G .
$ date; time git fsck; date
Tue Feb 17 09:09:52 CET 2009
dangling blob b80060892154649dd815882397faf4ca2138bf9e
dangling blob e80c002edbca7759b239885502cc456215c652bc
dangling blob 560e586176aba8d733c52b6f7389aa9619203cf7
[...]
dangling blob 4ba69f45849c3d0b71cdaebc5af15d11039781fc
dangling blob 8bbaff6754c0248c9617777c832b67b0b84c68af
dangling blob f7e90f9b31478fdff6f85ca479b134c092644000
dangling blob 0bf747922da7539ed0b7e384ef28601ecc5ebbd1
real 0m2.886s
user 0m1.064s
sys 0m0.080s
Tue Feb 17 09:09:55 CET 2009
$ time git status
[...]
# uab/procur/2008-09/p28041a2008-09g12mTiCAT.pdf
# uab/procur/2008-09/p28041a2008-09g12mTiCAT.png
# uab/procur/2008-09/p28058a2007-08mTiCAT.info
# uab/procur/2008-09/p28058a2007-08mTiCAT.pdf
# uab/procur/2008-09/p28058a2007-08mTiCAT.png
no changes added to commit (use "git add" and/or "git commit -a")
real 1m20.441s
user 0m22.765s
sys 0m6.644s
$ date; time git gc; du -hs; date
Tue Feb 17 09:26:00 CET 2009
Counting objects: 143557, done.
Counting objects: 143557, done.
Compressing objects: 100% (96414/96414), done.
Writing objects: 100% (143557/143557), done.
Total 143557 (delta 44795), reused 143557 (delta 44795)
real 95m31.468s
user 37m18.860s
sys 9m47.377s
68G .
Tue Feb 17 11:01:32 CET 2009
$ time git fsck
[...]
fc
dangling blob 8bbaff6754c0248c9617777c832b67b0b84c68af
dangling blob f7e90f9b31478fdff6f85ca479b134c092644000
dangling blob 0bf747922da7539ed0b7e384ef28601ecc5ebbd1
real 0m1.527s
user 0m1.036s
sys 0m0.076s
$ time git prune
real 0m2.794s
user 0m1.004s
sys 0m0.076s
Rendiment amb git (antic)¶
ddd@morera:/mnt/VOLUM-I/2-10/marca$ time git init-db defaulting to local storage area real 0m0.104s user 0m0.000s sys 0m0.004s ddd@morera:/mnt/VOLUM-I/2-10/marca$ time git add . real 2071m11.567s user 1699m21.444s sys 78m3.685s ddd@morera:/mnt/VOLUM-I/2-10/marca$ time git commit *** Environment problem: *** Your [[[[name]]]] cannot be determined from your system services (gecos). *** You would need to set GIT_AUTHOR_NAME and GIT_COMMITTER_NAME *** environment variables; otherwise you won't be able to perform *** certain operations because of "empty ident" errors. *** Alternatively, you can use user.[[[[name]]]] configuration variable. fatal: empty ident <ddd@morera.uab.es> not allowed real 0m8.884s user 0m1.016s sys 0m0.724s ddd@morera:/mnt/VOLUM-I/2-10/marca$ export GIT_AUTHOR_NAME=Ferran.Jorba@uab.cat ddd@morera:/mnt/VOLUM-I/2-10/marca$ export GIT_COMMITTER_NAME=Ferran.Jorba@uab.cat ddd@morera:/mnt/VOLUM-I/2-10/marca$ time git commit [...] [Surt l'editor amb un text com ara aquest: # Please enter the commit message for your changes. # (Comment lines starting with '#' will not be included) # # Initial commit # # Updated but not checked in: # (will commit) # # new file: BCHG-Marca-1/Ariel/Correccions/07_08_1846_003_004.info # new file: BCHG-Marca-1/Ariel/Correccions/07_08_1846_003_004.pdf # new file: BCHG-Marca-1/Ariel/Correccions/07_08_1947_011.info # new file: BCHG-Marca-1/Ariel/Correccions/07_08_1947_011.pdf # new file: BCHG-Marca-1/Ariel/Correccions/11_12_1946_007_008.info # new file: BCHG-Marca-1/Ariel/Correccions/11_12_1946_007_008.pdf # new file: BCHG-Marca-1/Ariel/Correccions/11_12_1947_013.info # new file: BCHG-Marca-1/Ariel/Correccions/11_12_1947_013.pdf # new file: BCHG-Marca-1/Ariel/Pdf/01_1951_021.info ... Hi afegeixo a dalt de tot: Primer commit amb Git, i surto] Committing initial tree 2479889df3287fba828a48c12cf0b81fa1e08fbd real 1m25.382s user 0m1.800s sys 0m1.616s
En resum:
- 505 GB en 34 hores
- 15 GB per hora
- 1 GB en 4 minuts
- Git crea el directori .git (ocult) i ocupa 357.6 GB (un 70% del tamany original). És a dir, que gestionar-ho amb git representa un overhead del 70% en espai de disc.
Proves de git amb git i linux-kernel¶
ddd@morera:/mnt/VOLUM-I/2-10/proves-git/git$ time git clone git://git.kernel.org/pub/scm/git/git.git remote: Counting objects: 72402, done. remote: Compressing objects: 100% (19633/19633), done. Indexing 72402 objects. remote: Total 72402 (delta 51879), reused 71831 (delta 51441) 100% (72402/72402) done Resolving 51879 deltas. 100% (51879/51879) done Checking files out... 100% (1246/1246) done real 0m28.992s user 0m22.529s sys 0m1.068s ddd@morera:/mnt/VOLUM-I/2-10/proves-git/linux-kernel$ time git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git remote: Counting objects: 723252, done. remote: Compressing objects: 100% (128603/128603), done. Indexing 723252 objects. remote: Total 723252 (delta 600335), reused 716266 (delta 593654) 100% (723252/723252) done Resolving 600335 deltas. 100% (600335/600335) done Checking files out... 100% (23787/23787) done real 5m11.887s user 3m54.487s sys 0m12.673s
Rendiment amb mercurial¶
ddd@morera:/mnt/VOLUM-I/2-09/marca$ time hg init real 0m6.770s user 0m0.156s sys 0m0.032s $ time hg commit nothing changed real 0m3.921s user 0m1.296s sys 0m0.592s $ time hg add [...] pdf-repaginats/La nova revista/1928/a1928m08n20.pdf: files over 10MB may cause memory and performance problems (use 'hg revert pdf-repaginats/La nova revista/1928/a1928m08n20.pdf' to unadd the file) pdf-repaginats/La nova revista/1928/a1928m09n21.pdf: files over 10MB may cause memory and performance problems (use 'hg revert pdf-repaginats/La nova revista/1928/a1928m09n21.pdf' to unadd the file) [...] pdf-repaginats/La Esfera/1916/Num 143_setembre.pdf: files over 10MB may cause memory and performance problems (use 'hg revert pdf-repaginats/La Esfera/1916/Num 143_setembre.pdf' to unadd the file) pdf-repaginats/La Esfera/1916/Num 144_setembre.pdf: files over 10MB may cause memory and performance problems (use 'hg revert pdf-repaginats/La Esfera/1916/Num 144_setembre.pdf' to unadd the file) [...] pdf-repaginats/Vic/1936/1936.pdf: files over 10MB may cause memory and performance problems (use 'hg revert pdf-repaginats/Vic/1936/1936.pdf' to unadd the file) real 0m7.309s user 0m3.580s sys 0m0.928s $ time hg commit [...] [Surt l'editor amb un text com ara aquest: HG: user: ddd@morera.uab.es HG: branch default HG: changed BCHG-Marca-1/Ariel/Correccions/07_08_1846_003_004.info HG: changed BCHG-Marca-1/Ariel/Correccions/07_08_1846_003_004.pdf HG: changed BCHG-Marca-1/Ariel/Correccions/07_08_1947_011.info HG: changed BCHG-Marca-1/Ariel/Correccions/07_08_1947_011.pdf HG: changed BCHG-Marca-1/Ariel/Correccions/11_12_1946_007_008.info HG: changed BCHG-Marca-1/Ariel/Correccions/11_12_1946_007_008.pdf HG: changed BCHG-Marca-1/Ariel/Correccions/11_12_1947_013.info HG: changed BCHG-Marca-1/Ariel/Correccions/11_12_1947_013.pdf ... Hi afegeixo a dalt de tot: Primer commit amb Mercurial, i surto] real 2517m29.572s user 1811m55.538s sys 205m16.658s
En resum:
- 505 GB en 41 hores (quasi tot en el commit; però no sé quan em es va obrir l'editor)
- x GB per hora
- 1 GB en x minuts
- Mercurial crea el directori .hg (ocult) i ocupa 362.6 GB (un 71% del tamany original). És a dir, que gestionar-ho amb Mercurial representa un overhead del 71% en espai de disc.
Actualitzat per fa aproximadament 17 anys · 0 revisions