Sources per chunk

From MLDonkey
Jump to: navigation, search

Sets how many sources MLdonkey will try to use to download each chunk.

\"The exact algorithm is a bit complex, and can be found in donkeyOneFile.ml, in find_client_block.

If mldonkey is connected to a source that has both

  1. a chunk that is being downloaded from less than max_sources_per_chunk sources
  2. and another that is not being downloaded

it will use that source to download parts of the first chunk, like the other sources.

max_sources_per_chunk = 1 is the default behavior of mldonkey (try to use each source to download a different chunk), with higher values mldonkey will try harder to finishing partially downloaded chunks. \" %%%

 Pango, in Forums&fileviewtopic&t=188

max_sources_per_chunk = 1 would have been the best choice if sources sent a full chunk at a time, but it seems that eMule is not currently doing this. This is debated between eMule devs, so it may be fixed in near future.

Remark: max_sources_per_chunk > 1 is not as effective as it should be because I forgot to remove some code when I implemented it. If you really want to experiment with this setting, apply this patch first :

--- donkey/donkeyOneFile.ml	22 Jan 2003 23:28:33 -0000	1.22
+++ donkey/donkeyOneFile.ml	24 Jan 2003 10:48:11 -0000
@@ -673,7 +673,7 @@
               if c.client_chunks.(j) &&
                 (match file.file_chunks.(j) with
                     AbsentVerified -> true
-                  || PartialVerified b when b.block_nclients = 0 -> true
+                  || PartialVerified b -> true
                   || _ -> false
                 ) then
                 check_file_block c file j !!sources_per_chunk
@@ -685,7 +685,7 @@
               if c.client_chunks.(j) &&
                 (match file.file_chunks.(j) with
                     AbsentTemp -> true
-                  || PartialTemp b when b.block_nclients = 0 -> true
+                  || PartialTemp b -> true
                   || _ -> false
                 ) then
                 check_file_block c file j  !!sources_per_chunk

(Also available here: [1])

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox