Editing Faster end game

From EMule Wiki
Jump to: navigation, search

Warning: The database has been locked for maintenance, so you will not be able to save your edits right now. You may wish to cut-n-paste the text into a text file and save it for later.

The administrator who locked it offered this explanation: site maintenance

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 16: Line 16:
  
 
An earlier implementation included "dropping" of sources that are too slow in order to allow faster clients to take over. Dropping sources is not always a good idea since sources that are slow now might become fast sources after a while (e.g. if you're on a trickle slot).
 
An earlier implementation included "dropping" of sources that are too slow in order to allow faster clients to take over. Dropping sources is not always a good idea since sources that are slow now might become fast sources after a while (e.g. if you're on a trickle slot).
 
=== Netfinity's Explanation ===
 
'''Phase 1: Block request sizes'''
 
 
*1. Estimate the time to completion.
 
time_to_complete = bytes_left_to_download / datarate_all_sources
 
 
*2. Estimate the number of bytes to request so that source doesn't complete later than 10 seconds after the estimated file completion.
 
bytes_to_request = source_datarate / (time_to_complete + 10)
 
 
*3. Split the request in three to fill the OP_PARTREQ, but round numbers to nearest  10kB.
 
 
'''Phase 2: Put the source on hold if it can't request enought bytes, without breaking the completion estimate'''
 
 
This means that if calculation in phase 1 returned less than 10kB then the source is put on hold for 20 seconds, then it's dropped if no new blocks becomes available. Note this is only done when the source has sent all the pieces we requested. This is done in case the other sources fails or the part is corrupt, then we can recontinue download with this source.
 
 
'''Phase 3: Dropping slow sources'''
 
 
This phase is only entered if a fast source can't allocate any more blocks. Here we drop in the middle of a transaction, thus data will be lost.
 
 
*1. Find the slowest source that is slower than 1kB/s and would break the completion estimate.
 
The calculations is basicaly the same as in phase 1.
 
 
*2. Cancel the download and free all allocated blocks
 
This causes data loss (upto ~20kB), as there is likely to be incomplete packets transfer. You have to take much care when doing this!
 
 
 
NOTE! My actual algorithm is much more complex, but this is the primary basics. Also, I always keep my request within the 180kB AICH block bounds in hope to handle curruption better.
 
 
/netfinity
 
 
This text has taken from http://forum.emule-project.net/index.php?showtopic=92937&view=findpost&p=662988
 
  
 
== Dazzle's Faster Endgame ==
 
== Dazzle's Faster Endgame ==

Please note that all contributions to EMule Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see EMule Wiki:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)
Personal tools