<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://test.amule.szerverem.hu/w/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://test.amule.szerverem.hu/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=24.177.251.35</id>
		<title>AMule Project FAQ - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://test.amule.szerverem.hu/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=24.177.251.35"/>
		<link rel="alternate" type="text/html" href="http://test.amule.szerverem.hu/wiki/Special:Contributions/24.177.251.35"/>
		<updated>2026-04-05T16:54:35Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.23.3</generator>

	<entry>
		<id>http://test.amule.szerverem.hu/wiki/FAQ_network</id>
		<title>FAQ network</title>
		<link rel="alternate" type="text/html" href="http://test.amule.szerverem.hu/wiki/FAQ_network"/>
				<updated>2005-09-12T14:50:24Z</updated>
		
		<summary type="html">&lt;p&gt;24.177.251.35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Network speed: what you should know before asking questions =&lt;br /&gt;
 by Froenchenko Leonid, lfroen@gmail.com&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
== Preface ==&lt;br /&gt;
The purpose of this document is to clarify different issues regarding network &lt;br /&gt;
speed that pop up from time to time in the [[aMule]] [[forum]]. Generally speaking, there are several reasons for questions about &amp;quot;[[FAQ_ed2k|aMule network]]&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
* The speed reported by [[aMule]] doesn't match your provider's given rate&lt;br /&gt;
* Poor performance of [[aMule]] itself or another network application on the same computer&lt;br /&gt;
* The key factors influencing network performance while [[aMule]] is running&lt;br /&gt;
&lt;br /&gt;
The intended audience for this document is users who want to get a better understanding of network functionality in general and in particular its implications for [[aMule]] functionality.&lt;br /&gt;
&lt;br /&gt;
This page, however, is not to be seen as comprehensive general purpose &amp;quot;[[FAQ_ed2k|Network FAQ]]&amp;quot;. If you were expecting something else, you might be interested in the [[aMule is slow|aMule is slow FAQ]].&lt;br /&gt;
 &lt;br /&gt;
== Network speed - how much is it? ==&lt;br /&gt;
When talking about network speed, people use the unit &amp;quot;bps&amp;quot; which means &lt;br /&gt;
&amp;quot;bits per second&amp;quot;. The reason that a ''bit'' is used rather than a ''byte'' is pretty much historical, but also has an engineering motivation behind it. &lt;br /&gt;
&lt;br /&gt;
This motivation comes from the fact that not all networks in the world transfer their traffic in bytes.&lt;br /&gt;
&lt;br /&gt;
There is a convention to use a capital &amp;quot;B&amp;quot; in &amp;quot;Bps&amp;quot; when speed is marked &lt;br /&gt;
in &amp;quot;bytes per second&amp;quot;. However, this convention is not widely accepted. In particular, organizations like the [http://www.ietf.org/ IETF] and [http://www.ieee.org/ IEEE] stick to the original &amp;quot;bps&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Prefixes ==&lt;br /&gt;
Since their invention, networks have made a lot of progress. Today we have networks that transfer thousands of millions of bits per second. For measuring these speeds the prefixes ''&amp;quot;kilo&amp;quot;'', ''&amp;quot;mega&amp;quot;'', ''&amp;quot;giga&amp;quot;'', ''&amp;quot;tera&amp;quot;'' etc. are used. &lt;br /&gt;
&lt;br /&gt;
It is a &amp;lt;u&amp;gt;common mistake&amp;lt;/u&amp;gt; to think that values with those prefixes are the same as in computer science, i.e. powers of 2. The truth is that, for historical reasons, prefixes in networking have a decimal base, and not a binary one.&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;2&amp;quot; border=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot; title=&amp;quot;Table 1&amp;quot;&lt;br /&gt;
| valign=&amp;quot;middle&amp;quot; title=&amp;quot;Table 1&amp;quot; align=&amp;quot;center&amp;quot; bgcolor=&amp;quot;#33ff33&amp;quot; | Prefix&lt;br /&gt;
| valign=&amp;quot;middle&amp;quot; align=&amp;quot;center&amp;quot; bgcolor=&amp;quot;#33ff33&amp;quot; | meaning in computers&lt;br /&gt;
| valign=&amp;quot;middle&amp;quot; title=&amp;quot;Table 1&amp;quot; align=&amp;quot;center&amp;quot; bgcolor=&amp;quot;#33ff33&amp;quot; | meaning in networks&lt;br /&gt;
| valign=&amp;quot;middle&amp;quot; align=&amp;quot;center&amp;quot; bgcolor=&amp;quot;#33ff33&amp;quot; | difference, %%&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | k (kilo)&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | 2^10 = 1024&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | 10^3 = 1000&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | 2%&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | M (mega)&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | 2^20 = 1,048,576&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | 10^6 = 1,000,000&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | 5%&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | G (giga)&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | 2^30 = 1,073,741,624&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | 10^9 = 1,000,000,000&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | 7%&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | T (tera)&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | 2^40 = 1,099,511,627,776&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | 10^12 = 1,000,000,000,000&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | 9%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As you can see from the table above the error in calculation is about 5% when the prefix is incorrectly interpreted. Please note that the speed your provider quotes you is the &amp;quot;speed in network units&amp;quot;, i.e. calculated on a decimal basis.&lt;br /&gt;
&lt;br /&gt;
For example when your provider tells you that your link is &amp;quot;ADSL 256/128&amp;quot; you &lt;br /&gt;
should understand that they mean 256000/128000 bps (bits). Which means, that the speed of your connection is 32000/16000 bps (bytes).&lt;br /&gt;
&lt;br /&gt;
== Protocol overhead - what is it about? ==&lt;br /&gt;
When [[aMule]] is running, it constantly &amp;quot;talks&amp;quot; with other [[client]]s and [[server]]s. &lt;br /&gt;
This data exchange is needed to identify itself, request information about &lt;br /&gt;
available [[FAQ_eD2k-Kademlia#What_is_a_source?|source]]s and [[file]]s, to perform [[search]]es and so on. &lt;br /&gt;
&lt;br /&gt;
Since this information has no direct use to the user itself, it is called &amp;quot;overhead&amp;quot; i.e. an inevitable addition to the data you actually want to [[upload]] or [[download]]. &lt;br /&gt;
&lt;br /&gt;
[[aMule]] calls this &amp;quot;''connection overhead''&amp;quot;. However the number that [[aMule]] presents includes only the size of the actual data that [[aMule]] itself sends to the network stack. Later, this data is sent out on the network with even more overhead - that of the network protocols.&lt;br /&gt;
How much is it? - let's see that in the next section.&lt;br /&gt;
&lt;br /&gt;
== Network overhead ==&lt;br /&gt;
First of all - we're talking about the [[IPv4]] network. Once upon a time, there &lt;br /&gt;
was only one type of [[IP]] network. Now there are two - [[IPv4|IP version 4]], the old we all know; and [[IPv6|IP version 6]] - the new protocol made to fix the limitations of [[IPv4]].&lt;br /&gt;
&lt;br /&gt;
[[FAQ ed2k|ED2K protocol]] by design, is unable to talk over [[IPv6]] network, so users who have it (in Japan and China for example) will not be able to connect &amp;quot;as is&amp;quot;. Using [[IPv4]] means, that each packet ([http://www.ietf.org/rfc/rfc793.txt TCP], [http://www.ietf.org/rfc/rfc768.txt UDP], [http://www.ietf.org/rfc/rfc792.txt ICMP]) will have an [[IPv4]] header.&lt;br /&gt;
&lt;br /&gt;
The minimum size of this header is 20 bytes. The header can have optional parts (each of 4 bytes) and that is up to your provider - for example, mine adds an optional [dword].&lt;br /&gt;
&lt;br /&gt;
When talking to other clients and servers on [[FAQ ed2k|ed2k network]], [[aMule]] uses the widely known [http://www.ietf.org/rfc/rfc793.txt TCP] protocol. [http://www.ietf.org/rfc/rfc768.txt UDP] is also used, but on a much smaller scale. As the reader might know, [http://www.ietf.org/rfc/rfc793.txt TCP] is a reliable protocol, i.e. it guarantees that data which is sent from one side will arrive on the other or an error will be reported.&lt;br /&gt;
&lt;br /&gt;
In order to achieve this, [http://www.ietf.org/rfc/rfc793.txt TCP] sends its own data in addition to the actual &amp;quot;payload&amp;quot; data being transfered. This data includes [http://www.ietf.org/rfc/rfc793.txt TCP] client initial negotiation, checksums, sequence numbers and acknowledgments. All of this is in the ''[http://www.ietf.org/rfc/rfc793.txt TCP] header'' which is added to each packet sent. The size of this header is a minimum of 20 bytes.&lt;br /&gt;
&lt;br /&gt;
While being only a small overhead for a large bulk transfer, it can take significant part of bandwidth when small amounts of data are being exchanged. &amp;lt;u&amp;gt;This is exactly what happens on [[FAQ_ed2k#What_is_a_source?|source]] discovery part of [[aMule]]&amp;lt;/u&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Our [[client]] is trying to establish a connection and negotiate with a large number of other [[client]]s. Doing this, [[aMule]] opens new [http://www.ietf.org/rfc/rfc793.txt TCP] connections &amp;lt;u&amp;gt;''all the time''&amp;lt;/u&amp;gt;. The amount of connections opened is controlled by the ''&amp;quot;Maximum number of connections in 5 seconds&amp;quot;'' setting in the preferences. &lt;br /&gt;
&lt;br /&gt;
A typical number is about 100. Each [http://www.ietf.org/rfc/rfc793.txt TCP] connection results in at least 3 packets traveling the net - one is a SYN packet, i.e. connection request, and one an ACK or a RST when the connection is accepted or refused, and SYN+ACK to establish the session. &lt;br /&gt;
&lt;br /&gt;
There's more overhead of [http://www.ietf.org/rfc/rfc1034.txt DNS] queries when an address is resolved, retries when a host doesn't reply and so on.&lt;br /&gt;
 &lt;br /&gt;
=== At low level ===&lt;br /&gt;
After passing [http://www.ietf.org/rfc/rfc793.txt TCP] and [[IP]] layers packets go down to the network interface driver. What kind of driver this is depends on the way your computer is connected to the internet. For simplicity sake we will assume that this computer is connected to the ISP directly, i.e. you have no LAN (or switch or router) between. &lt;br /&gt;
&lt;br /&gt;
Common setups that I'm aware of:&lt;br /&gt;
 &lt;br /&gt;
* Analog modem, connected to telephone line (ISDN modem falls in this category too).&lt;br /&gt;
* Cable modem, connected through ethernet, ISP gives you an [[IP]] address through [http://www.ietf.org/rfc/rfc2131.txt DHCP].&lt;br /&gt;
* Cable modem, connected through ethernet, ISP requires you to configure PPPoE or PPTP tunnel.&lt;br /&gt;
* ADSL modem, connected through ethernet. You must have a PPPoE or PPTP tunnel&lt;br /&gt;
* Variation of above - modem connected to PC by USB.&lt;br /&gt;
 &lt;br /&gt;
In each of the above setups there are different protocols in use, and different headers are added to transmitted packets. But there's one important thing to note: &amp;lt;u&amp;gt;''ethernet frames traveling between cable/ADSL modem and PC, and don't reach the ISP''&amp;lt;/u&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
And consequently they are not counted in rate calculations. [http://www.ietf.org/rfc/rfc2516.txt PPPoE] and &lt;br /&gt;
[http://www.ietf.org/rfc/rfc2637.txt PPTP] headers, on the contrary &amp;lt;u&amp;gt;''do reach the ISP''&amp;lt;/u&amp;gt;. I obviously have no idea whether or not your particular provider chooses to include them in their rate calculations. For this reason I will exclude those headers from my calculations. &lt;br /&gt;
&lt;br /&gt;
If you think that your ISP includes it, add 4 bytes to the size of each packet.&lt;br /&gt;
 &lt;br /&gt;
=== Example ===&lt;br /&gt;
Let's see how much network overhead we have on a typical network. Our connection is a cable modem connected via an ethernet link to a PC directly (no router between them). &lt;br /&gt;
&lt;br /&gt;
In this setup we have [[IPv4]] packets sent over ethernet. &lt;br /&gt;
&lt;br /&gt;
Lets say we have 10 new connections opened each second, and all are being accepted (successfully established [http://www.ietf.org/rfc/rfc793.txt TCP] session). This alone sums up to (I'm counting data going up - from my computer to the net):&lt;br /&gt;
&lt;br /&gt;
''10 connection * 2 packets * (20 bytes of TCP + 20 bytes of [[IPv4]]) = 800 bytes of overhead.''&lt;br /&gt;
&lt;br /&gt;
This means that we are starting with 1.16*8 Kbps of &amp;quot;''invisible&amp;quot;''&lt;br /&gt;
overhead caused by the very way the network works. Now, let's assume that&lt;br /&gt;
after each connection is established our amule sends something to the other side and waits to receive an answer.&lt;br /&gt;
&lt;br /&gt;
''Total of 800 bytes + 800 bytes = 1600 bytes per second = 6400 bps = 6.4 Kbps''&lt;br /&gt;
&lt;br /&gt;
What we have here is 6.4 Kbps of network overhead alone. Taking into account &lt;br /&gt;
that amule has other data to send (uploads) and it is not the only network &lt;br /&gt;
application running we will have the following picture: &lt;br /&gt;
&lt;br /&gt;
Most likely the link to your provider is not that fast. [[aMule]] will &amp;lt;u&amp;gt;''try''&amp;lt;/u&amp;gt; to open 10 connections per second and will &amp;lt;u&amp;gt;''try''&amp;lt;/u&amp;gt; to upload on the specified speed. &lt;br /&gt;
&lt;br /&gt;
Your operating system will share all available bandwidth between those and between [[aMule]] and other network applications (browser for example). Actual results will vary depending on specific OS settings.&lt;br /&gt;
&lt;br /&gt;
== ACK bottleneck ==&lt;br /&gt;
In all calculations above there was one assumption - zero download. But downloading is what amule was built for. So let's examine how the overhead &lt;br /&gt;
above affects your downloading speed. The answer is in [http://www.ietf.org/rfc/rfc793.txt TCP] protocol. &lt;br /&gt;
&lt;br /&gt;
When [http://www.ietf.org/rfc/rfc793.txt TCP] is sending data, it requires that the other side acknowledge the reception. So if client A is sending data to [[client]] B by [http://www.ietf.org/rfc/rfc793.txt TCP], B has to send a special ACK packets to A which tells B &amp;quot;ok, I got it&amp;quot;. If, however, A doesn't receive the ACK packets in time, he will assume that either packet is lost. &lt;br /&gt;
&lt;br /&gt;
So, without going deeply into [http://www.ietf.org/rfc/rfc793.txt TCP] specification: &amp;lt;u&amp;gt;''if B fails to send ACK to A, as a result A will transmit slower''&amp;lt;/u&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Now let's see the situation in [[aMule]]. We saw in the previous chapter, that the uplink stream is congested by connection requests and uploads. As a result, there's a good chance that ACK packets for a file we are downloading &amp;lt;u&amp;gt;''will not be sent on time''&amp;lt;/u&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The remote party will notice this and slow down. This is one more reason why the upstream should better not be too congested.&lt;br /&gt;
 &lt;br /&gt;
== Is there anything I can do? ==&lt;br /&gt;
OK, now that you understood why your network is so slow while [[aMule]] is &lt;br /&gt;
running you will maybe look for a way to fix this. The answer in 2 words: &amp;quot;rate limit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first thing you should do is to assign realistic rate limits in [[aMule]] &lt;br /&gt;
itself. If you have a uplink rate of 128 Kbps don't set [[aMule]]'s [[upload]] limit to 16 (kilobytes per second) just because 128/8 = 16.&lt;br /&gt;
&lt;br /&gt;
A better, but far more complicated solution is to use the QoS and packet scheduling services of your OS. For example, you can give a higher priority to ACK packets to solve the above mentioned &amp;quot;ACK bottleneck&amp;quot; problem. &lt;br /&gt;
&lt;br /&gt;
The QoS topic, however, is beyond the scope of this article.&lt;br /&gt;
&lt;br /&gt;
== Router (switch, home network): is there any difference? ==&lt;br /&gt;
When the cable coming from your ISP is connected to some switching or routing &lt;br /&gt;
device, which in turn is connected to several PC's, bandwidth is shared between &lt;br /&gt;
them. &lt;br /&gt;
&lt;br /&gt;
So, having N computers connected, an ideal device would simply provide &lt;br /&gt;
each one of them with 1/N of the total bandwidth. The situation may vary in real life, and your particular device may have different idea about fairness. &lt;br /&gt;
&lt;br /&gt;
Since you're not going to have the hardware specs of your router chipset the only advice here is &amp;quot;try and see yourself&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Multiple links ==&lt;br /&gt;
Until now, we talked about computers that are connected to the network through&lt;br /&gt;
single interface. While being most frequent, this is not mandatory. A user&lt;br /&gt;
may choose to connect via 2 (or more links) provided by different ISP's.&lt;br /&gt;
There're 2 reasons for this decision that I know about: link redundancy and&lt;br /&gt;
load balancing.&lt;br /&gt;
&lt;br /&gt;
=== Link redundancy ===&lt;br /&gt;
In a case of link redundancy second link becomes operational when primary&lt;br /&gt;
link fails. This can be done automatically, or by explicit user command.&lt;br /&gt;
When this setup used, [[aMule]] along with other network applications must be&lt;br /&gt;
restarted when links are being switched. This will allow to bind new address,&lt;br /&gt;
reconnect to server and receive new ID. If [[aMule]] is connected via &amp;amp;nbsp;[http://www.ietf.org/rfc/rfc3022.txt NAT]]&lt;br /&gt;
enabled router (it doesn't matter if you have [[FAQ_ed2k#What_is_LowID_and_HighID?|low or high ID]]), and links&lt;br /&gt;
are switched &amp;lt;u&amp;gt;''on the router''&amp;lt;/u&amp;gt;, restart not needed.&lt;br /&gt;
&lt;br /&gt;
=== Load balancing ===&lt;br /&gt;
This is a far more complicated case. Both (all) links are simultaneously active,&lt;br /&gt;
and traffic is being distributed between them. The problem is that [[aMule]]&lt;br /&gt;
binds to &amp;lt;u&amp;gt;''all interfaces on the system''&amp;lt;/u&amp;gt; i.e. 0.0.0.0. But, on [[FAQ ed2k|ed2k]]&lt;br /&gt;
your ID is your [[IP]] address, &amp;lt;u&amp;gt;''and you can not have two''&amp;lt;/u&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
So the problem is that [[aMule]] does not explicitly choose the source&lt;br /&gt;
address for ''&amp;lt;u&amp;gt;outgoing&amp;lt;/u&amp;gt;'' [http://www.ietf.org/rfc/rfc793.txt TCP] connections. Note, that it &amp;lt;u&amp;gt;''doesn't&lt;br /&gt;
matter''&amp;lt;/u&amp;gt; on which interface it listens. This is exactly &amp;lt;u&amp;gt;''opposite''&amp;lt;/u&amp;gt;&lt;br /&gt;
to &amp;lt;u&amp;gt;''server''&amp;lt;/u&amp;gt; applications like FTP or HTTP. When a client&lt;br /&gt;
tries to connect to a server it discovers its IP address by resolving DNS. Resolver&lt;br /&gt;
replies will contain all [[IP]] addresses of the specified host and a client should try them all. The server, in turn, may choose not to listen on&lt;br /&gt;
one of them and thus prevent the client from using this interface. In our case&lt;br /&gt;
[[aMule]] &amp;lt;u&amp;gt;''is a [[client]]''&amp;lt;/u&amp;gt;, and the [[server|ed2k server]] discovers its address from the&lt;br /&gt;
[[FAQ_ed2k#What_is_a_source?|source]] [[IP]] in the connection request. That's where the [[server|ed2k server]] will try to connect.&lt;br /&gt;
If the connection succeeds the client is [[client]] assigned a [[FAQ_ed2k#What_is_LowID_and_HighID?|high ID]], if it doesn't the client gets a Low ID. &lt;br /&gt;
The only solution in this situation (until [[aMule]] will have an ability to&lt;br /&gt;
bind to specific address) is to use [[aMule]] on your &amp;quot;primary&amp;quot; link.&amp;lt;br&amp;gt;&lt;br /&gt;
You can, however, cause [http://www.kernel.org Linux] to send packet through interface of your choice.&lt;br /&gt;
But, most probably they will be dropped by your ISP's router as &amp;quot;spoofed&amp;quot; because the source [[IP]] address doesn't match the address the ISP assigned to that interface.&lt;/div&gt;</summary>
		<author><name>24.177.251.35</name></author>	</entry>

	</feed>