aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: aMule 2.0.1: Source dropping is very silly  (Read 3003 times)

dummy00001

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 48
aMule 2.0.1: Source dropping is very silly
« on: May 25, 2005, 11:15:49 PM »

I have tried to activate source dropping. And it did /right/: very popular file which have had 500 sources showed quite good activity; but two file which have had 15 sources now have 2-3 left each...

Conclusion. Source dropping IMHO is feature to remove from queue sources which otherwise consume precious space in limited source's list.

If file has MAX sources - 100% of list is busy - it make much sense to /rotate/ sources on list with sources not in list. Let say, file has MAX sources, we receive M new sources - then and only then drop sources which seem to be useless. If file has precisely MAX sources or less - why bother doing anything at all???

This way, source dropping will do what I expected it to do: rotate sources on very popular downloads and do not touch files with not overwhelming sources number.

Additionally, to save CPU cycles, it make sense to buffer new sources for file, and perform source dropping on timer or when the buffer reach maximum. Obviously, we need to keep a black list of dropped sources: for next X hours we need to ignore sources from the black list; after X hours remove source from black list.
Logged

dummy00001

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 48
Re: aMule 2.0.1: Source dropping is very silly
« Reply #1 on: May 25, 2005, 11:18:00 PM »

Hm. Yeah. "Source rotation" is right name for that right feature.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: aMule 2.0.1: Source dropping is very silly
« Reply #2 on: May 26, 2005, 12:05:39 AM »

Why dropping on some files and not on other? Sources dropped are those you don't need (NNP, etc)
Logged

dummy00001

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 48
Re: aMule 2.0.1: Source dropping is very silly
« Reply #3 on: May 26, 2005, 01:01:37 AM »

Hm. If I have only 10 sources for file - I need all info I can get.

Queue Full - can get the place in queue for me.
NNP sources after some time can acquire parts I do need.
Not mentioning that I can receive new sources from all of them - as part of source exchange - especially from NNP.

Well, Okay this thread is degrading again into "poor rare file handling" thing... :-/

Normally QueueFull sources are people who has complete file. NNP - poor fellows like I am who try to get the file too. And source dropping removes them all. And how I'm supposed to make any progress then? :-((( As by source dropping I do not (and will not) have any chances.

IOW, I cannot download in aMule popular and rare files at the same time. For popular file, source rotation is crucial. For rare files blind source dropping is lethal.

...

I have checked the source code. Sorry, my Mac is not powerful enough to compile that stuff. But I think single check will suffice: in CPartFile::CleanUpSources(), check for number of sources and if it is less then 75% of limit (Prefs->Connection->Max sources per file Hard limit) then do nothing.

Untested one line patch (insert as first/second line - depending wether you are C++ or C programmer, respectively -  in CPartFile::CleanUpSources() method):

+   if (this->GetSourceCount() <= (thePrefs::GetMaxSourcePerFile()*3)/4 ) { return; } // do not perform source dropping if there is free space (3/4 == 75%) in source set

Very short one line change. Much shorter then some perl one-liners. You can even spread change to four lines to improve its readability.

Have fun.
Logged