2010-10-15 05:29:13 +00:00
|
|
|
============================================
|
|
|
|
Performance costs for some common operations
|
|
|
|
============================================
|
|
|
|
|
|
|
|
1. `Publishing an A-byte immutable file`_
|
|
|
|
2. `Publishing an A-byte mutable file`_
|
|
|
|
3. `Downloading B bytes of an A-byte immutable file`_
|
|
|
|
4. `Downloading B bytes of an A-byte mutable file`_
|
|
|
|
5. `Modifying B bytes of an A-byte mutable file`_
|
|
|
|
6. `Inserting/Removing B bytes in an A-byte mutable file`_
|
|
|
|
7. `Adding an entry to an A-entry directory`_
|
|
|
|
8. `Listing an A entry directory`_
|
2012-06-23 23:13:38 +00:00
|
|
|
9. `Checking an A-byte file`_
|
|
|
|
10. `Verifying an A-byte file (immutable)`_
|
2010-10-15 05:29:13 +00:00
|
|
|
11. `Repairing an A-byte file (mutable or immutable)`_
|
|
|
|
|
2011-01-04 06:54:55 +00:00
|
|
|
``K`` indicates the number of shares required to reconstruct the file
|
|
|
|
(default: 3)
|
|
|
|
|
|
|
|
``N`` indicates the total number of shares produced (default: 10)
|
|
|
|
|
|
|
|
``S`` indicates the segment size (default: 128 KiB)
|
|
|
|
|
|
|
|
``A`` indicates the number of bytes in a file
|
|
|
|
|
2012-06-23 23:13:38 +00:00
|
|
|
``B`` indicates the number of bytes of a file that are being read or
|
2011-01-04 06:54:55 +00:00
|
|
|
written
|
|
|
|
|
|
|
|
``G`` indicates the number of storage servers on your grid
|
|
|
|
|
2012-05-13 21:07:39 +00:00
|
|
|
Most of these cost estimates may have a further constant multiplier: when a
|
|
|
|
formula says ``N/K*S``, the cost may actually be ``2*N/K*S`` or ``3*N/K*S``.
|
|
|
|
Also note that all references to mutable files are for SDMF-formatted files;
|
|
|
|
this document has not yet been updated to describe the MDMF format.
|
|
|
|
|
2010-10-15 05:29:13 +00:00
|
|
|
Publishing an ``A``-byte immutable file
|
|
|
|
=======================================
|
|
|
|
|
2011-01-04 06:54:55 +00:00
|
|
|
when the file is already uploaded
|
|
|
|
---------------------------------
|
|
|
|
|
|
|
|
If the file is already uploaded with the exact same contents, same
|
|
|
|
erasure coding parameters (K, N), and same added convergence secret,
|
|
|
|
then it reads the whole file from disk one time while hashing it to
|
|
|
|
compute the storage index, then contacts about N servers to ask each
|
|
|
|
one to store a share. All of the servers reply that they already have
|
|
|
|
a copy of that share, and the upload is done.
|
|
|
|
|
|
|
|
disk: A
|
|
|
|
|
|
|
|
cpu: ~A
|
|
|
|
|
|
|
|
network: ~N
|
|
|
|
|
2011-05-08 12:42:28 +00:00
|
|
|
memory footprint: S
|
2011-01-04 06:54:55 +00:00
|
|
|
|
|
|
|
when the file is not already uploaded
|
|
|
|
-------------------------------------
|
|
|
|
|
|
|
|
If the file is not already uploaded with the exact same contents, same
|
|
|
|
erasure coding parameters (K, N), and same added convergence secret,
|
|
|
|
then it reads the whole file from disk one time while hashing it to
|
|
|
|
compute the storage index, then contacts about N servers to ask each
|
|
|
|
one to store a share. Then it uploads each share to a storage server.
|
|
|
|
|
|
|
|
disk: 2*A
|
|
|
|
|
|
|
|
cpu: 2*~A
|
2010-10-15 05:29:13 +00:00
|
|
|
|
2011-05-08 12:42:28 +00:00
|
|
|
network: N/K*A
|
2010-10-15 05:29:13 +00:00
|
|
|
|
2011-01-04 06:54:55 +00:00
|
|
|
memory footprint: N/K*S
|
2010-10-15 05:29:13 +00:00
|
|
|
|
|
|
|
Publishing an ``A``-byte mutable file
|
|
|
|
=====================================
|
|
|
|
|
2011-05-08 12:42:28 +00:00
|
|
|
cpu: ~A + a large constant for RSA keypair generation
|
|
|
|
|
2010-10-15 05:29:13 +00:00
|
|
|
network: A
|
|
|
|
|
2011-01-04 06:54:55 +00:00
|
|
|
memory footprint: N/K*A
|
2010-10-15 05:29:13 +00:00
|
|
|
|
|
|
|
notes: Tahoe-LAFS generates a new RSA keypair for each mutable file that it
|
|
|
|
publishes to a grid. This takes up to 1 or 2 seconds on a typical desktop PC.
|
|
|
|
|
|
|
|
Part of the process of encrypting, encoding, and uploading a mutable file to a
|
|
|
|
Tahoe-LAFS grid requires that the entire file be in memory at once. For larger
|
|
|
|
files, this may cause Tahoe-LAFS to have an unacceptably large memory footprint
|
|
|
|
(at least when uploading a mutable file).
|
|
|
|
|
|
|
|
Downloading ``B`` bytes of an ``A``-byte immutable file
|
|
|
|
=======================================================
|
|
|
|
|
2011-05-08 12:42:28 +00:00
|
|
|
cpu: ~B
|
2010-10-15 05:29:13 +00:00
|
|
|
|
2011-05-08 12:42:28 +00:00
|
|
|
network: B
|
2010-10-15 05:29:13 +00:00
|
|
|
|
2011-01-04 06:54:55 +00:00
|
|
|
notes: When Tahoe-LAFS 1.8.0 or later is asked to read an arbitrary
|
|
|
|
range of an immutable file, only the S-byte segments that overlap the
|
2010-10-15 05:29:13 +00:00
|
|
|
requested range will be downloaded.
|
|
|
|
|
|
|
|
(Earlier versions would download from the beginning of the file up
|
|
|
|
until the end of the requested range, and then continue to download
|
|
|
|
the rest of the file even after the request was satisfied.)
|
|
|
|
|
|
|
|
Downloading ``B`` bytes of an ``A``-byte mutable file
|
|
|
|
=====================================================
|
|
|
|
|
2011-05-08 12:42:28 +00:00
|
|
|
cpu: ~A
|
|
|
|
|
2010-10-15 05:29:13 +00:00
|
|
|
network: A
|
|
|
|
|
|
|
|
memory footprint: A
|
|
|
|
|
|
|
|
notes: As currently implemented, mutable files must be downloaded in
|
|
|
|
their entirety before any part of them can be read. We are
|
|
|
|
exploring fixes for this; see ticket #393 for more information.
|
|
|
|
|
|
|
|
Modifying ``B`` bytes of an ``A``-byte mutable file
|
|
|
|
===================================================
|
|
|
|
|
2011-05-08 12:42:28 +00:00
|
|
|
cpu: ~A
|
|
|
|
|
2010-10-15 05:29:13 +00:00
|
|
|
network: A
|
|
|
|
|
2011-01-04 06:54:55 +00:00
|
|
|
memory footprint: N/K*A
|
2010-10-15 05:29:13 +00:00
|
|
|
|
|
|
|
notes: If you upload a changed version of a mutable file that you
|
|
|
|
earlier put onto your grid with, say, 'tahoe put --mutable',
|
|
|
|
Tahoe-LAFS will replace the old file with the new file on the
|
|
|
|
grid, rather than attempting to modify only those portions of the
|
|
|
|
file that have changed. Modifying a file in this manner is
|
|
|
|
essentially uploading the file over again, except that it re-uses
|
|
|
|
the existing RSA keypair instead of generating a new one.
|
|
|
|
|
|
|
|
Inserting/Removing ``B`` bytes in an ``A``-byte mutable file
|
|
|
|
============================================================
|
|
|
|
|
2011-05-08 12:42:28 +00:00
|
|
|
cpu: ~A
|
|
|
|
|
2010-10-15 05:29:13 +00:00
|
|
|
network: A
|
|
|
|
|
2011-01-04 06:54:55 +00:00
|
|
|
memory footprint: N/K*A
|
2010-10-15 05:29:13 +00:00
|
|
|
|
|
|
|
notes: Modifying any part of a mutable file in Tahoe-LAFS requires that
|
|
|
|
the entire file be downloaded, modified, held in memory while it is
|
|
|
|
encrypted and encoded, and then re-uploaded. A future version of the
|
|
|
|
mutable file layout ("LDMF") may provide efficient inserts and
|
|
|
|
deletes. Note that this sort of modification is mostly used internally
|
|
|
|
for directories, and isn't something that the WUI, CLI, or other
|
|
|
|
interfaces will do -- instead, they will simply overwrite the file to
|
|
|
|
be modified, as described in "Modifying B bytes of an A-byte mutable
|
|
|
|
file".
|
|
|
|
|
|
|
|
Adding an entry to an ``A``-entry directory
|
|
|
|
===========================================
|
|
|
|
|
2011-05-08 12:42:28 +00:00
|
|
|
cpu: ~A
|
|
|
|
|
2011-01-04 06:54:55 +00:00
|
|
|
network: ~A
|
2010-10-15 05:29:13 +00:00
|
|
|
|
2011-05-08 12:42:28 +00:00
|
|
|
memory footprint: N/K*~A
|
2010-10-15 05:29:13 +00:00
|
|
|
|
|
|
|
notes: In Tahoe-LAFS, directories are implemented as specialized mutable
|
|
|
|
files. So adding an entry to a directory is essentially adding B
|
|
|
|
(actually, 300-330) bytes somewhere in an existing mutable file.
|
|
|
|
|
|
|
|
Listing an ``A`` entry directory
|
|
|
|
================================
|
|
|
|
|
2011-05-08 12:42:28 +00:00
|
|
|
cpu: ~A
|
|
|
|
|
2011-01-04 06:54:55 +00:00
|
|
|
network: ~A
|
2010-10-15 05:29:13 +00:00
|
|
|
|
2011-05-08 12:42:28 +00:00
|
|
|
memory footprint: N/K*~A
|
2010-10-15 05:29:13 +00:00
|
|
|
|
|
|
|
notes: Listing a directory requires that the mutable file storing the
|
|
|
|
directory be downloaded from the grid. So listing an A entry
|
|
|
|
directory requires downloading a (roughly) 330 * A byte mutable
|
|
|
|
file, since each directory entry is about 300-330 bytes in size.
|
|
|
|
|
2012-06-23 23:13:38 +00:00
|
|
|
Checking an ``A``-byte file
|
|
|
|
===========================
|
2010-10-15 05:29:13 +00:00
|
|
|
|
2011-05-08 12:42:28 +00:00
|
|
|
cpu: ~G
|
|
|
|
|
|
|
|
network: ~G
|
2010-10-15 05:29:13 +00:00
|
|
|
|
|
|
|
memory footprint: negligible
|
|
|
|
|
|
|
|
notes: To check a file, Tahoe-LAFS queries all the servers that it knows
|
|
|
|
about. Note that neither of these values directly depend on the size
|
|
|
|
of the file. This is relatively inexpensive, compared to the verify
|
|
|
|
and repair operations.
|
|
|
|
|
2012-06-23 23:13:38 +00:00
|
|
|
Verifying an A-byte file (immutable)
|
|
|
|
====================================
|
2010-10-15 05:29:13 +00:00
|
|
|
|
2011-05-08 12:42:28 +00:00
|
|
|
cpu: ~N/K*A
|
|
|
|
|
2011-01-04 06:54:55 +00:00
|
|
|
network: N/K*A
|
2010-10-15 05:29:13 +00:00
|
|
|
|
2011-01-04 06:54:55 +00:00
|
|
|
memory footprint: N/K*S
|
2010-10-15 05:29:13 +00:00
|
|
|
|
|
|
|
notes: To verify a file, Tahoe-LAFS downloads all of the ciphertext
|
2011-05-08 12:42:28 +00:00
|
|
|
shares that were originally uploaded to the grid and integrity checks
|
2012-06-23 23:13:38 +00:00
|
|
|
them. This is (for grids with good redundancy) more expensive than
|
|
|
|
downloading an A-byte file, since only a fraction of these shares would
|
|
|
|
be necessary to recover the file.
|
|
|
|
|
|
|
|
Verifying an A-byte file (mutable)
|
|
|
|
==================================
|
|
|
|
|
|
|
|
cpu: ~N/K*A
|
|
|
|
|
|
|
|
network: N/K*A
|
|
|
|
|
|
|
|
memory footprint: N/K*A
|
|
|
|
|
|
|
|
notes: To verify a file, Tahoe-LAFS downloads all of the ciphertext
|
|
|
|
shares that were originally uploaded to the grid and integrity checks
|
|
|
|
them. This is (for grids with good redundancy) more expensive than
|
|
|
|
downloading an A-byte file, since only a fraction of these shares would
|
|
|
|
be necessary to recover the file.
|
2010-10-15 05:29:13 +00:00
|
|
|
|
|
|
|
Repairing an ``A``-byte file (mutable or immutable)
|
|
|
|
===================================================
|
|
|
|
|
2011-05-08 12:42:28 +00:00
|
|
|
cpu: variable, between ~A and ~N/K*A
|
|
|
|
|
|
|
|
network: variable; between A and N/K*A
|
2010-10-15 05:29:13 +00:00
|
|
|
|
2012-05-13 21:07:39 +00:00
|
|
|
memory footprint (immutable): (1+N/K)*S
|
|
|
|
(SDMF mutable): (1+N/K)*A
|
2010-10-15 05:29:13 +00:00
|
|
|
|
2011-05-08 12:42:28 +00:00
|
|
|
notes: To repair a file, Tahoe-LAFS downloads the file, and
|
|
|
|
generates/uploads missing shares in the same way as when it initially
|
|
|
|
uploads the file. So, depending on how many shares are missing, this
|
|
|
|
can cost as little as a download or as much as a download followed by
|
|
|
|
a full upload.
|
2012-05-13 21:07:39 +00:00
|
|
|
|
|
|
|
Since SDMF files have only one segment, which must be processed in its
|
|
|
|
entirety, repair requires a full-file download followed by a full-file
|
|
|
|
upload.
|