我有一个 256 片虚拟机切片主机通过 ssh 响应按键通常非常慢。输入“ls”可能需要长达 3 秒钟的时间。
据我所知,我的虚拟机似乎没有那么多资源负担。所以我猜问题要么是我与虚拟机的网络连接,要么是物理硬件上的其他虚拟机影响了我的服务器。我该如何确定问题的原因是什么?
我的虚拟机的统计信息:
$ uptime
08:44:47 up 98 days, 6:25, 1 user, load average: 0.00, 0.00, 0.00
$ free -m
total used free shared buffers cached
Mem: 268 251 16 0 6 48
-/+ buffers/cache: 197 70
Swap: 511 14 497
$ top
top - 08:45:32 up 98 days, 6:25, 1 user, load average: 0.07, 0.02, 0.00
Tasks: 82 total, 1 running, 81 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 274540k total, 257688k used, 16852k free, 6436k buffers
Swap: 524280k total, 15320k used, 508960k free, 49532k cached
这是从我的本地机器到虚拟机的跟踪路由:
Hop Hostname IP Time 1 Time 2
1 my_pc.local 192.168.1.107 0.114ms
1 router.local 192.168.1.1 1.887ms
1 router.local 192.168.1.1 1.287ms
2 no reply *
3 no reply *
4 be-51-ar01.needham.ma.boston.comcast.net 68.85.162.157 533.341ms
5 pos-2-3-0-0-cr01.newyork.ny.ibone.comcast.net 68.86.90.57 422.463ms
6 pos-0-12-0-0-cr01.ashburn.va.ibone.comcast.net 68.86.85.29 598.607ms
7 pos-1-8-0-0-cr01.atlanta.ga.ibone.comcast.net 68.86.87.90 998.950ms
8 pos-1-12-0-0-cr01.dallas.tx.ibone.comcast.net 68.86.85.157 1014.316ms
8 pos-1-12-0-0-cr01.dallas.tx.ibone.comcast.net 68.86.85.157 479.281ms
9 pos-0-2-0-0-pe01.1950stemmons.tx.ibone.comcast.net 68.86.86.150 963.164ms
10 rackspace-bbr.dfw1.comcast.net 75.149.230.242 619.255ms
11 core7-bbr1-vlan3007.dfw1.rackspace.net 174.143.123.118 359.844ms
12 98.129.84.173 98.129.84.173 343.851ms
13 my_slice 174.143.xxx.xxx 5082.621ms
然后从我的本地机器 ping 虚拟机:
Bytes Source Seq Time Units
64 174.143.xxx.xxx 1 71.4 ms
64 174.143.xxx.xxx 2 73.3 ms
64 174.143.xxx.xxx 3 70.0 ms
64 174.143.xxx.xxx 4 72.3 ms
64 174.143.xxx.xxx 5 69.7 ms
Time minimum: 69.70 ms
Time average: 71.35 ms
Time maximum: 73.30 ms
Packets transmitted: 5
Packets received: 5
Successful packets: 100%
答案1
虚拟机出现问题,从 traceroute 中可以看到,它在最后一跳(即虚拟机的虚拟网络)上花费了 6 秒。
要么是客户操作系统的软件问题(CPU 锁定太紧,无法及时响应),要么是主机的问题(资源不足,无法在适当的响应时间内虚拟化网络?)。我建议联系 linode 支持,他们相当不错。
答案2
听起来像是网络问题。怎么办ping my_slice
?