Globalhardlimit
(7 intermediate revisions by 5 users not shown) | |||
Line 5: | Line 5: | ||
== Background == | == Background == | ||
− | Every source you have for a file must be requeried every 29 minutes (59 minutes max) other peer will consider you not any more on the network (timeout). However this querying costs overhead and computer are limited in the amount of connection it can make per second(limits in the tcp/ip stack of windows and/or routers on the way). Also | + | Every source you have for a file must be requeried every 29 minutes (59 minutes max) other peer will consider you not any more on the network (timeout). However this querying costs overhead and computer are limited in the amount of connection it can make per second(limits in the tcp/ip stack of windows and/or routers on the way). Also a little bit of memory for each source you download must be kept. eMule does this efficiently, but still there is an upper limit of the amount of sources you can keep track of. Without global hardlimit the limit of sources is defined per file. With global hardlimit a total limit of number of sources is set instead per file. |
This way you don't have to pause files to download a lot of files, you will just get less sources per files. This way rare files are started sooner, but well distributed files might take a bit longer to download. Also it might help stability of your download. | This way you don't have to pause files to download a lot of files, you will just get less sources per files. This way rare files are started sooner, but well distributed files might take a bit longer to download. Also it might help stability of your download. | ||
Line 18: | Line 18: | ||
A more precise description how the system works: | A more precise description how the system works: | ||
− | + | I'll start on startup. Since the global source count is 0 here all files are initialized at 100. Every 50 seconds from that time on the main function will be run. If the source count (global) is too low we keep on increasing all files hardlimit. The limit per file will be increased like this: | |
IncrValue = ([GHL value] - [Global source count]) / [number of files]) | IncrValue = ([GHL value] - [Global source count]) / [number of files]) | ||
Line 26: | Line 26: | ||
HL + IncrValue | HL + IncrValue | ||
− | As soon as we reach the lower tollerance border (95% GHL) we enable the passive mode and set a passive HL. | + | As soon as we reach the lower tollerance border (95% GHL) we enable the passive mode and set a passive HL. The passive HL means we calculate a new IncrValue like this: |
IncrValue = ([105% GHL value] - [Global source count]) / [number of files]) | IncrValue = ([105% GHL value] - [Global source count]) / [number of files]) | ||
− | This InrcValue is added to every files source count for the new | + | This InrcValue is added to every files source count for the new HL. We basicly give the HL some tollerance to work properly. Anyhow we will not exceed the GHL. |
− | In case we did exceed the GHL we disable the passive mode, which basicly only checks if everything's allright every 5 minutes, change back to the 50 sec cycle and keep on setting every files HL to the source count value. Since source dropping starts when the source count exceeds 80% of the HL we can be sure one FQ or NNS source is dropped every 40 sec. This way we do not waste any sources at all but it's kinda slow, though. We could drop other "good" sources | + | In case we did exceed the GHL we disable the passive mode, which basicly only checks if everything's allright every 5 minutes, change back to the 50 sec cycle and keep on setting every files HL to the source count value. Since source dropping starts when the source count exceeds 80% of the HL we can be sure one FQ or NNS source is dropped every 40 sec. This way we do not waste any sources at all but it's kinda slow, though. We could drop other "good" sources too, but this would either (probably) waste really good sources (like QR: 5) or be really complex (in order to decide what's good and what's not). |
− | The value is initialized in the wizard | + | The value is initialized in the wizard. |
− | In the network wizard where you set your upload/download speed a value for the global hard limit is | + | In the network wizard where you set your upload/download speed a value for the global hard limit is initialized based on your upload speed. Don't set values below 1000, it is not tuned for this. A value of 4000-5000 will fit many people. Do not set a very high value. |
− | [[ | + | With GHL, you'll get maximum 1000 sources per file and 8000 sources global. |
+ | |||
+ | [[Category:Features]][[Category:StulleMule features]][[Category:MorphXT features]] |
Latest revision as of 09:05, 24 November 2010
Usually you set in the connection tab a max/sources per file. With this global limit you set a global limit for all files. If you download 20 popular files and the GHL=4000 then each file will get about 200 sources. If 10 files complete then each files gets 400 sources.
Basicly you only need to enable the system, set a value and forget about most things related to hardlimit and source count.
Background
Every source you have for a file must be requeried every 29 minutes (59 minutes max) other peer will consider you not any more on the network (timeout). However this querying costs overhead and computer are limited in the amount of connection it can make per second(limits in the tcp/ip stack of windows and/or routers on the way). Also a little bit of memory for each source you download must be kept. eMule does this efficiently, but still there is an upper limit of the amount of sources you can keep track of. Without global hardlimit the limit of sources is defined per file. With global hardlimit a total limit of number of sources is set instead per file.
This way you don't have to pause files to download a lot of files, you will just get less sources per files. This way rare files are started sooner, but well distributed files might take a bit longer to download. Also it might help stability of your download.
Global hard limit
The StulleMule mod offers a more customized system. Not using the option "Use GHL for all files" you may enable or disable the GHL for every file in the SivkaFileSettings dialog. You may choose if GHL should be activated or not for every new file by default (like SivkaFileSettings default).
A more precise description how the system works:
I'll start on startup. Since the global source count is 0 here all files are initialized at 100. Every 50 seconds from that time on the main function will be run. If the source count (global) is too low we keep on increasing all files hardlimit. The limit per file will be increased like this:
IncrValue = ([GHL value] - [Global source count]) / [number of files])
The global HL incr will never exceed 5% of the GHL value. So we check if the InrcValue is > [5% of the GHL] / [number of files] and set the last calculation as the new value if needed. Then we move on and set the new HL for all files like this:
HL + IncrValue
As soon as we reach the lower tollerance border (95% GHL) we enable the passive mode and set a passive HL. The passive HL means we calculate a new IncrValue like this:
IncrValue = ([105% GHL value] - [Global source count]) / [number of files])
This InrcValue is added to every files source count for the new HL. We basicly give the HL some tollerance to work properly. Anyhow we will not exceed the GHL.
In case we did exceed the GHL we disable the passive mode, which basicly only checks if everything's allright every 5 minutes, change back to the 50 sec cycle and keep on setting every files HL to the source count value. Since source dropping starts when the source count exceeds 80% of the HL we can be sure one FQ or NNS source is dropped every 40 sec. This way we do not waste any sources at all but it's kinda slow, though. We could drop other "good" sources too, but this would either (probably) waste really good sources (like QR: 5) or be really complex (in order to decide what's good and what's not).
The value is initialized in the wizard.
In the network wizard where you set your upload/download speed a value for the global hard limit is initialized based on your upload speed. Don't set values below 1000, it is not tuned for this. A value of 4000-5000 will fit many people. Do not set a very high value.
With GHL, you'll get maximum 1000 sources per file and 8000 sources global.