[BitTorrent] BT2 & hash trees - leaf size benchmarked

Olaf van der Spek OvdSpek at LIACS.NL
Tue Jul 27 10:27:34 EDT 2004

Elliott Mitchell wrote:
> So, two wildly different results. Best guess is something in Python is
> killing John's implementation. I'd thought it might be the creation and

Don't forget that John's test is a synthetic benchmark that ignores the 

>>From: "Olaf van der Spek" <OvdSpek at LIACS.NL>
>>So in the worst case (1 vs 16 kb) you'd be 'wasting' less than 17 s, spread
>>over the entire download time?
>>Suppose you're indeed downloading one gb in two hour (almost 150 kb/s), then
>>CPU usage would be 0.2 % higher on average.
>>Is that a huge overhead?
> 17 seconds of processor time. Might end up lengthening the download time
> by 30 seconds (due to spreading out consumption over time). Quite a bit
> worse if partial results aren't cached. File verification on startup will
> be longer.

What's 30 s on a > 4 gb download?
And file verification is rare due to fast resume. And it's not something 
the user has to wait for.

And I redid the tests and also watched 'wall' time. The CPU time matched 
the previous test (182 and 192 s), but the wall time of the first test 
was 240 s, while that of the second test was only 207 s.

I think the cause is that the first test uses reads of 256 kb and the 
second test uses reads of 1 kb. The small reads probably allow for 
better overlapping of reading and computing, thus actually decreasing 
the wall time it takes.

> Still, I can't take issue with the above statement. The lowest level
> block size won't make that big a deal in download time. I stick by my
> question asking whether it is worthwhile to bother with verification at
> the 4K level. (do dialup folks really ask for blocks that small?)

It's not, it should be done at 16 k. But that's another issue and it 
doesn't mean the base segment size should be 16 k too, it should still 
be 1 k.

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!

Yahoo! Groups Links

<*> To visit your group on the web, go to:

<*> To unsubscribe from this group, send an email to:
    BitTorrent-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:

More information about the BitTorrent mailing list