[Box Backup] Box-Backup slow: 0.1 MiB/sec

Ben Summers boxbackup@fluffy.co.uk
Thu, 10 Aug 2006 13:25:26 +0100

On 9 Aug 2006, at 18:13, Felix E. Klee wrote:

> At Wed, 9 Aug 2006 17:23:33 +0200,
> Baltasar Cevc wrote:
>> Try to check whether the IO on the machine is the problem. My old
>> backup server (which is a machine with about 2 GHz) had serious
>> trouble with the whole bunch of tiny files bbstored writes.
> Thanks for the hint.  I may indeed try that out.  However, first I'd
> like to know whether it's possible to disable encryption of the
> transmission channel and, if so, how.

It's not possible.

> Also, I'd like to know why the
> transmission channel is encrypted: After all, the backups  
> themselves are
> encrypted.  So, additional encryption seems to be superfluous,  
> something
> for the paranoid.

The protocol around the backups isn't encrypted. Using SSL gives you

* Strong authentication

* Protection from man-in-the-middle attacks

* And obscures the stuff being transmitted, reducing the information  
available to an eavesdropper to just quantity and timing.

The cost is a bit of public key crypto at the beginning of each  
session, which would need to be done anyway for authentication, and  
symmetric crypto for all data during the session. The latter is not  
very processor intensive, and certainly shouldn't take up 95% of CPU  

When doing a new backup, bbstored is mostly doing symmetric  
decryption and writing stuff to disc, and bbackupd is reading stuff  
from disc, encrypting it, then encrypting it again for transmission.  
Both should be limited by I/O not CPU.

When diffs are transmitted later, bbackupd will do the heavy lifting  
on the CPU, and bbstored will be doing a load of I/O to reassemble  
the file.

When doing lots of small files, the protocol is a bit inefficient as  
it has to wait for a round-trip after each file is sent, but I can't  
see this resulting in such a low transfer rate.