[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnu-arch-users] Speeding up mirroring
From: |
James Blackwell |
Subject: |
[Gnu-arch-users] Speeding up mirroring |
Date: |
Wed, 21 Jan 2004 22:04:42 -0500 |
User-agent: |
Mutt/1.5.5.1+cvs20040105i |
As was previously discussed, archive-mirror could be much faster than it
currently is. In fact, an archive-mirror command on average takes 1-2
minutes and about 2.6 megabytes of bandwidth, even if nothing changes.
So after we all discussed it for awhile, we decided to take the following
plan of attack to shorten mirroring times by performing the following:
The process during commit:
--------------------------
In libarch/commit.c[arch_commit()], right between arch_finish_commit() and
arch_snap_inode_sig(), call arch_update_serial(), which will perform the
following:
1. generate a random id and call it Commit-ID
2. generate a string that contains the date from the commiter's machine
and call it Local-Commit-Date
3. If cat/branch/version/Status is in the archive, delete it.
4. Create cat/branch/version/Status
5. If cat/branch/Last-Modified is in the archive, delete it.
6. Create cat/branch/Status
7. If cat/Last-Modified is in the archive, delete it.
8. Create cat/Status
9. If Last-Modified is in the top level dir of the archive, delete it.
10. Create /Status
The contents of Status in each case will be:
Commit-ID: The commit id from step #2
Local-Commit-Date: The comitter's date from step #3
The process during push-mirror:
----------------------------------
First, open up the local and remote archive
If the /Last-Modified file exists in the local archive, get the Commit-ID
and call it Local-ID.
If the /Last-Modified file exists in remote archive, get the Commit-ID
and call it Remote-ID.
If ( ! Local-ID == Remote-ID)
Repeat the steps for every category
Repeat the steps for every branch
Repeat the steps for every version.
The process during archive-mirror:
----------------------------------
This is the same process as push-mirror, adjusted accordingly.
--
James Blackwell Using I.T. to bring more 570-407-0488
Owner, Inframix business to your business http://inframix.com
GnuPG (ID 06357400) AAE4 8C76 58DA 5902 761D 247A 8A55 DA73 0635 7400
- [Gnu-arch-users] Speeding up mirroring,
James Blackwell <=