本文共 2140 字,大约阅读时间需要 7 分钟。
使用以下命令测试CPU性能:
time echo "scale=5000; 4*a(1)" | bc -l -q Intel(R) Core(TM) i5-2300 CPU @ 2.80GHz cpu MHz : 2884.687 cache size : 6144 KB real 0m22.797s user 0m22.787s sys 0m0.003sIntel(R) Xeon(R) CPU E5345 @ 2.33GHz
cpu MHz : 2327.502 cache size : 4096 KB real 0m34.086s user 0m33.954s sys 0m0.011s Amazon EC2 Small Instance 1 EC2 Compute Unit (1 virtual core with 1 EC2 Compute Unit) One EC2 Compute Unit provides the equivalent CPU capacity of a 1.0-1.2 GHz 2007 Opteron or 2007 Xeon processor. This is also the equivalent to an early-2006 1.7 GHz Xeon processor referenced in our original documentation.Intel(R) Xeon(R) CPU E5507 @ 2.27GHz
cpu MHz : 2266.746 cache size : 4096 KB第一次:
real 1m42.415s user 1m39.924s sys 0m0.546s第二次:
real 1m42.580s user 1m40.164s sys 0m0.471s 总的看来, EC2一个计算单元性能相当于i5-2300 CPU @ 2.80GHz一个core的1/4~1/5, 和官方给的说法差不多。 High-CPU Extra Large Instance 7 GB of memory, 20 EC2 Compute Units (8 virtual cores with 2.5 EC2 Compute Units each), 1690 GB of local instance storage, 64-bit platform Heavy Utilization Reserved: 1 year Term要$2210, 3 year Term要$3400Cluster Compute Quadruple Extra Large Instance
23 GB memory,33.5 EC2 Compute Units (2 x Intel Xeon X5570, quad-core “Nehalem” architecture)--平均4.2 Compute Unit = 1 Xeon X5570 core On-Demand 价格 $1.30 per hour 一年要7000+$ 很贵. Heavy Utilization Reserved: 1 year Term要$4060Cluster Compute Eight Extra Large Instance
60.5 GB memory, 88 EC2 Compute Units (eight-core 2 x Intel Xeon)-- 平均5 Compute Unit = 1 Xeon core $2.40 per hour
用openssl来测试cpu运算能力
命令: openssl speed rsa1024
在Intel(R) Core(TM) i5-2300 CPU @ 2.80GHz的表现如下: 2902 signs/s
sign verify sign/s verify/s rsa 1024 bits 0.000345s 0.000020s 2902.3 50950.2 Amazon EC2 small instance with 1 compute unit and 1.7GMem: 302 signs/sEC2 actively limits CPU to what is assigned to your instance class. Micro instances are the only ones with burstable CPU assignment.
Rackspace cloud doesn't limit CPU, but how much CPU you get will depend on how much CPU the instance sharing your host are using. You will probably see less consistent performance over time.Using an ELB is the best way to offload SSL processing.
转载地址:http://mrzvb.baihongyu.com/