Reputation: 41935
I have 8 instances on ap-northeast-1a. Types are t3a.medium, t2.small and c5d.large. I also have a t2.small in the ap-northeast-1d availibility zone.
Any internet connection reaching those instances is really slow.
For example, if I try to scp
a file, I get download speeds of around 20KB/s, then it slowly goes down to about 10kb/s. My local machine is in France.
scp my_user@production_server:/home/my_user/big_file .
big_file 192KB 12.7KB/s 02:19 ETA
The ssh connection is really unresponsive too. For example, the output of htop
takes a few seconds to display.
Some of the 8 instances have elastic ip, some don't. One is in a different availability zone. For all of them, I get the slow download speed. One interesting fact is that upload is fast. I get speeds between 1 and 2 MB/s.
scp big_file my_user@production_server:/home/my_user
big_file 49% 3360KB 1.2MB/s 00:02 ETA
I also tried changing local internet connection to a 4g hotspot, and the behavior is the same. I'm thinking the issue is related to network activity going out of the datacenter.
I am not a network expert, how can I troubleshoot this further?
Edit
I tried running this:
traceroute <my-server-ip>
It gives the following output:
[first 13 lines look normal]
14 * * *
15 * * *
16 * * *
17 * 52.95.31.31 (52.95.31.31) 248.392 ms
52.95.31.59 (52.95.31.59) 247.997 ms
18 52.95.31.165 (52.95.31.165) 249.730 ms 262.213 ms
52.95.31.179 (52.95.31.179) 248.495 ms
19 * 52.95.31.208 (52.95.31.208) 246.955 ms *
20 52.95.31.130 (52.95.31.130) 249.471 ms 248.195 ms 250.721 ms
21 52.95.30.216 (52.95.30.216) 249.071 ms
52.95.30.220 (52.95.30.220) 247.704 ms 247.702 ms
22 * * *
23 * * *
24 * * *
25 * * *
26 * * *
27 * * *
28 * * *
29 * * *
30 * * *
31 * * *
32 * * *
33 * * *
34 * * *
35 * * *
36 * * *
37 * * *
38 * * *
39 * * *
40 * * *
41 * * *
42 * * *
43 * * *
44 * * *
45 * * *
46 * * *
47 * * *
48 * * *
49 * * *
50 * * *
51 * * *
52 * * *
53 * * *
54 * * *
55 * * *
56 * * *
57 * * *
58 * * *
59 * * *
60 * * *
61 * * *
62 * * *
63 * * *
64 * * *
I didn't truncate the end or kill it while running, it ends like this.
Upvotes: 5
Views: 14087
Reputation: 270039
The only network bandwidth limitation in AWS is related to the Instance Type of the EC2 instance.
The general rule is that smaller instances have less bandwidth. This is because the network capacity assigned to the Host computer is split between the instances running on that Host. If a Host is running many small instances, each are assigned a smaller amount of bandwidth.
This can be seen when launching an EC2 instance. The Network Performance is shown as:
t3a.medium
: Up to 5 Gigabitt2.small
: Low to Moderatec5d.large
: Up to 10 GigabitTherefore, please note that results can vary based on Instance Type.
However, the real problems are likely to be due to your remote location, accessing a Tokyo server from France. This traffic goes across the Internet, with many hops and little control.
You could attempt to use the AWS Global Accelerator that diverts traffic to use the global Amazon network. That would remove a lot of the network variability.
Upvotes: 4