亚马逊EC2的传输率很低

我有一个关于亚马逊EC2传输速率的问题。 基本上我正在评估转向亚马逊堆栈的服务,但是我们希望首先将其与当前的设置进行基准比较。 我的设置非常简单,我只有一个大的EC2实例运行访问一个小的RDS实例,两者都位于欧盟西部区域。 在EC2实例上,我正在运行股票apacheconfiguration文件,而在我当前的服务器上,我正在运行修改后的apacheconfiguration文件。 这意味着我期待更less的并发连接,但我期望传输速率是相似的。

我正在运行的基准testing是没有什么是沼泽标准ab(apache基准testing)

ab -n 100 -c 10 http://www.example.com/

EC2上的设置导致以下结果:

ab -n 100 -c 10 http://www.example.com/ This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking www.website.com (be patient).....done Server Software: Apache/2.2.14 Server Hostname: www.example.com Server Port: 80 Document Path: / Document Length: 99051 bytes Concurrency Level: 10 Time taken for tests: 17.872 seconds Complete requests: 100 Failed requests: 97 (Connect: 0, Receive: 0, Length: 97, Exceptions: 0) Write errors: 0 Total transferred: 9940632 bytes HTML transferred: 9898332 bytes Requests per second: 5.60 [#/sec] (mean) Time per request: 1787.165 [ms] (mean) Time per request: 178.716 [ms] (mean, across all concurrent requests) Transfer rate: 543.19 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 22 29 11.9 26 87 Processing: 717 1740 689.6 1530 3744 Waiting: 586 1475 619.3 1302 3112 Total: 739 1769 688.7 1561 3770 Percentage of the requests served within a certain time (ms) 50% 1561 66% 1713 75% 1892 80% 1975 90% 3300 95% 3674 98% 3674 99% 3770 100% 3770 (longest request) 

而我的服务器回应这个:

 ab -n 100 -c 10 http://www.example.com/ This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking www.example.com (be patient).....done Server Software: Apache Server Hostname: www.example.com Server Port: 80 Document Path: / Document Length: 116922 bytes Concurrency Level: 10 Time taken for tests: 9.024 seconds Complete requests: 100 Failed requests: 95 (Connect: 0, Receive: 0, Length: 95, Exceptions: 0) Write errors: 0 Total transferred: 11731386 bytes HTML transferred: 11693186 bytes Requests per second: 11.08 [#/sec] (mean) Time per request: 902.427 [ms] (mean) Time per request: 90.243 [ms] (mean, across all concurrent requests) Transfer rate: 1269.51 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 15 21 9.5 17 52 Processing: 311 840 663.6 482 2987 Waiting: 188 362 416.1 216 1607 Total: 338 861 661.8 501 3003 Percentage of the requests served within a certain time (ms) 50% 501 66% 909 75% 1063 80% 1292 90% 2130 95% 2366 98% 2912 99% 3003 100% 3003 (longest request) 

有谁正在经历这些低传输率? EC2实例是否正常? 我可能做错了什么?

如果您需要更多的信息,请让我知道。

感谢你的帮助。

example.com主办PHP / Rails?

老实说,我比较了EC2和Rackspace(RS)Cloud产品,结果非常相似(在AB中使用的stock wordpress index.php页面)

我的结论和研究表明,EC2的瓶颈 – 即使在高CPU实例上,也是CPU或“计算单位”。 默认主题上最简单的wordpress index.php在相同的操作系统/堆栈上比RS的要求/秒要less40倍。 说实话,来自RS的10美元/月的cloudserver性能超过了160美元,或者是EC2实例 – 这很可能是因为RS在更新的基础架构上,每个云服务器都可以直接访问现代CPU。 我的猜测是,EC2只是运行较旧的硬件和/或在您的代码和处理它之间有更多的移动部件/层。

EC2与任何云服务一样稳定,深思熟虑,可能比所有的云服务都要好,但是除非你可以投入大量资金,否则它不是一个可以提高性能的地方,在这一点上你可能会得到更多的是一个专门的产品,甚至可乐。

Reddit(在alexa的前100个站点)和其他hightraffic站点主持EC2 – 所以不要误解我的意思,这是可以做到的。 caching和负载平衡与高CPUnetworking节点集群应该做的伎俩。 所有即时通讯是 – 如果你是一个寻找一个单一的机器为了服务php的目的体面的performance,你可能会更适合其他地方…

如果你没有超过2次/秒或216,000次/天,那么这个事情可能就不是问题了,你可以/应该从亚马逊堆栈的稳定性和function中受益。