aMule Forum
English => Feature requests => Topic started by: nubtumbler on October 05, 2005, 12:26:03 AM
-
The problem:
When aMule is closed and rerun seconds later all sources are lost and must be found again. This is a pain to users and also puts unnecessary load on servers.
A possible solution:
On exit, save all (or many) source IP's along with a timestamp. On startup, compare the timestamp with the current time. If the difference is something reasonable, like less than 30 seconds, all of the sources are loaded and used. If the difference is too large ignore the saved source IP's.
There is currently an option to save 5 sources on rare files with less than 20 sources so it seems that much of the machinery is already there.
-
I don't know what you do, but I for myself don't restart it more than once a day. The sources return within 5 minutes. But saving many sources of many parts would just cause to double the time of a shutdown.
-
and for also well spreaded file this would not make sence since like vollstrecker said it takes 1-2min and the sources are back
for rare files the saving is already done, if a file has less then (I think) 50 sources, 5sources are automatically saved at exit.
stefanero
-
Originally posted by Vollstrecker
I don't know what you do, but I for myself don't restart it more than once a day. The sources return within 5 minutes. But saving many sources of many parts would just cause to double the time of a shutdown.
Suppose you store one timestamp (8 bytes) and 100 source IPs (4 bytes) for each download. You'd only be writing 408 additional bytes per download. Even at 200 downloads that's only around 80K. I can't see how an 80K write would double the shutdown time.
Not everyone is able to start amule up in the morning and close it when they shut the machine down at night. Some users must restart amule every hour or two. It's not as unusual as you might think. Consider a guy with a laptop who has to close up and move to a different lecture hall every 1.5 hours.
-
If you can use amule in a lecture, you are a very happy guy. All institutes I know have proxys that allow only port http and https traffic. Sometimes pop and smtp, but they don't nat anything.
And if you have a notebook, you don't have to shutdown. These things are designed to run from Accu, so you can carry it to the lecture or mensa or toilette without shutting down the whole thing. Maybe you have to use cabled mediums, but when my ISP disconnects after 24 hours, the sources come back much faster than starting amule, so I don't see any need of this "feature".
Btw. a timestamp has usually saved data and time like 200510091106 for now, and that is much more than 4 byte, it is 12 Byte. And a source has usually save IP and port of the source, either with dots 84.171.66.85:4662 which has 17 Byte, or with 0's like 0841710660854662 which has 16 Byte. Both are much more than you say. Sure you could zip them, but I don't think that that saves much.
In both case I come for 100 source to 1712 Byte, or 1812 Byte. For 200 downloads that is 342400 Byte (334,375 KB) and 362400Bbyte (353,90625 KB). My Temp-folder is mounted over a samba share on a 100MBit/s LAN, that would mean I have to wait 2,7 or 3,4 seconds longer for a shutdown. And I didn't calculate the Ethernet Overhead.
-
Actually saving a source is just 6 bytes (4 for the ip and 2 for the port)
-
werner@Werner1:~$ du --human-readable --byte test
18 test
werner@Werner1:~$ cat test
84.171.66.85:4662
werner@Werner1:~$
-
... we dont' store that on plain text, you know.
-
How then? Even converting to hex wouldn't save that much.
-
An ip is 4 bytes. Each number is one byte. And a port is two bytes - 0 to 65535.