作者归档:John

几只VPS的Unix Benchmark跑分结果

最近在选择vps上折腾的很惨,还遇到莫名其妙的数据丢失,幸好有backup,只丢失了不到3天的数据,今天有点时间,就把自己能控制的5只vps拖出来遛遛,跑了下分。

unix benchmark download here: http://members.dslextreme.com/users/andylee/unixbench-4.1.0-wht.tar.gz

排名不分先后- –

1.PhotonVps的 warp.5, Xen,128内存,2G/150G,equal share CPU*2,5.96 USD/M

BYTE UNIX Benchmarks (Version 4.1-wht.2)
System — Linux xx 2.6.18-164.10.1.el5xen #1 SMP Thu Jan 7 20:28:30 EST 2010 x86_64 x86_64 x86_64 GNU/Linux
/dev/sda1              2064208   1402560    556792  72% /

Start Benchmark Run: Wed Dec  8 17:09:26 CST 2010
17:09:26 up 18:28,  1 user,  load average: 0.76, 0.38, 0.15

End Benchmark Run: Wed Dec  8 17:20:11 CST 2010
17:20:12 up 18:39,  1 user,  load average: 15.18, 6.62, 2.98

INDEX VALUES
TEST                                        BASELINE     RESULT      INDEX

Dhrystone 2 using register variables        376783.7 11209023.1      297.5
Double-Precision Whetstone                      83.1     1232.6      148.3
Execl Throughput                               188.3     2877.5      152.8
File Copy 1024 bufsize 2000 maxblocks         2672.0    71659.0      268.2
File Copy 256 bufsize 500 maxblocks           1077.0    20144.0      187.0
File Read 4096 bufsize 8000 maxblocks        15382.0   646709.0      420.4
Pipe Throughput                             111814.6   418053.8       37.4
Pipe-based Context Switching                 15448.6   135425.6       87.7
Process Creation                               569.3     6445.8      113.2
Shell Scripts (8 concurrent)                    44.8      807.1      180.2
System Call Overhead                        114433.5   487160.8       42.6
=========
FINAL SCORE                                                     140.0

2.AlienVPS的UFO1,OpenVZ,256内存,25G/250G,633.352Mhz CPU*4,4USD/M
BYTE UNIX Benchmarks (Version 4.1-wht.2)
System — Linux xxxx 2.6.18-194.26.1.el5.028stab070.14 #1 SMP Thu Nov 18 16:34:01 MSK 2010 i686 i686 i386 GNU/Linux
/dev/simfs            26214400    826760  25387640   4% /

Start Benchmark Run: Wed Dec  8 12:09:39 MSK 2010
12:09:39 up 17:59,  1 user,  load average: 0.31, 0.17, 0.06

End Benchmark Run: Wed Dec  8 12:23:33 MSK 2010
12:23:33 up 18:13,  1 user,  load average: 11.43, 5.49, 2.73

INDEX VALUES
TEST                                        BASELINE     RESULT      INDEX

Dhrystone 2 using register variables        376783.7  4801749.6      127.4
Double-Precision Whetstone                      83.1     1265.4      152.3
Execl Throughput                               188.3     3901.9      207.2
File Copy 1024 bufsize 2000 maxblocks         2672.0   110789.0      414.6
File Copy 256 bufsize 500 maxblocks           1077.0    57634.0      535.1
File Read 4096 bufsize 8000 maxblocks        15382.0   864323.0      561.9
Pipe-based Context Switching                 15448.6   230704.3      149.3
Pipe Throughput                             111814.6   745289.8       66.7
Process Creation                               569.3    11623.7      204.2
Shell Scripts (8 concurrent)                    44.8      566.3      126.4
System Call Overhead                        114433.5   617815.2       54.0
=========
FINAL SCORE                                                     181.3

3.PhotonVPS的WARP 2,XEN,1024内存,50G/900G,equal share CPU*8,26USD/M

BYTE UNIX Benchmarks (Version 4.1-wht.2)
System — Linux xxxxxx 2.6.18-194.11.3.el5xen #1 SMP Mon Aug 30 16:55:32                                                                                                             EDT 2010 x86_64 GNU/Linux
/dev/sda1             51606140   2336820  46647880   5% /

Start Benchmark Run: Wed Dec  8 17:14:26 CST 2010
17:14:26 up 21:14,  4 users,  load average: 0.08, 0.02, 0.01

End Benchmark Run: Wed Dec  8 17:24:46 CST 2010
17:24:46 up 21:25,  4 users,  load average: 15.14, 6.49, 2.84

INDEX VALUES
TEST                                        BASELINE     RESULT      INDEX

Dhrystone 2 using register variables        376783.7 16047095.6      425.9
Double-Precision Whetstone                      83.1     1227.7      147.7
Execl Throughput                               188.3     4436.1      235.6
File Copy 1024 bufsize 2000 maxblocks         2672.0   142113.0      531.9
File Copy 256 bufsize 500 maxblocks           1077.0    41767.0      387.8
File Read 4096 bufsize 8000 maxblocks        15382.0  1397184.0      908.3
Pipe Throughput                             111814.6  1011631.5       90.5
Pipe-based Context Switching                 15448.6   248391.6      160.8
Process Creation                               569.3    12219.2      214.6
Shell Scripts (8 concurrent)                    44.8     2136.9      477.0
System Call Overhead                        114433.5   965631.9       84.4
=========
FINAL SCORE                                                     258.8

4.TP的某VPS,未知架构,1024内存,60G/xxG,equal share CPU*8,50USD/M左右

跑分过程中掉线一次,restart再次掉线,第三次成功

BYTE UNIX Benchmarks (Version 4.1-wht.2)
System — Linux xxxxxxxxx 2.6.18-194.17.4.el5 #1 SMP Mon O                                                                                                            ct 25 15:51:07 EDT 2010 i686 i686 i386 GNU/Linux
/dev/hda3             59871508   2880884  53909124   6% /

Start Benchmark Run: Wed Dec  8 04:43:33 CST 2010
04:43:33 up 10 days,  1:38,  2 users,  load average: 0.83, 0.31, 0.75

End Benchmark Run: Wed Dec  8 04:54:18 CST 2010
04:54:18 up 10 days,  1:49,  1 user,  load average: 14.49, 6.31, 3.17

INDEX VALUES
TEST                                        BASELINE     RESULT      INDEX

Dhrystone 2 using register variables        376783.7 12468250.3      330.9
Double-Precision Whetstone                      83.1     1301.4      156.6
Execl Throughput                               188.3     6711.3      356.4
File Copy 1024 bufsize 2000 maxblocks         2672.0    95072.0      355.8
File Copy 256 bufsize 500 maxblocks           1077.0    36518.0      339.1
File Read 4096 bufsize 8000 maxblocks        15382.0  1170137.0      760.7
Pipe-based Context Switching                 15448.6   366710.1      237.4
Pipe Throughput                             111814.6   982225.3       87.8
Process Creation                               569.3    20016.5      351.6
Shell Scripts (8 concurrent)                    44.8     1408.5      314.4
System Call Overhead                        114433.5  1446043.0      126.4
=========
FINAL SCORE                                                     267.1

5.Amazon的EC2 Micro Instance,XEN,7864内存,50G/900G,equal share 2659.99Mhz *1,1USD/M左右(省省跑可以免费用的,就是到国内的网络太糟糕了)

BYTE UNIX Benchmarks (Version 4.1-wht.2)
System — Linux xxxxxx 2.6.16-xenU #1 SMP Mon May 28 03:41:49 SAST 2007                                                                                                             i686 i686 i386 GNU/Linux
/dev/sda1             10321208   5017136   4779784  52% /

Start Benchmark Run: Wed Dec  8 17:15:46 CST 2010
17:15:46 up 6 days, 19:10,  1 user,  load average: 0.08, 0.02, 0.01

End Benchmark Run: Wed Dec  8 17:37:16 CST 2010
17:37:16 up 6 days, 19:31,  1 user,  load average: 15.04, 7.11, 3.96

INDEX VALUES
TEST                                        BASELINE     RESULT      INDEX

Dhrystone 2 using register variables        376783.7  3913846.7      103.9
Double-Precision Whetstone                      83.1     1502.8      180.8
Execl Throughput                               188.3     1176.4       62.5
File Copy 1024 bufsize 2000 maxblocks         2672.0     2082.0        7.8
File Copy 256 bufsize 500 maxblocks           1077.0    10448.0       97.0
File Read 4096 bufsize 8000 maxblocks        15382.0    10464.0        6.8
Pipe Throughput                             111814.6   365033.6       32.6
Pipe-based Context Switching                 15448.6     3227.7        2.1
Process Creation                               569.3      105.6        1.9
Shell Scripts (8 concurrent)                    44.8       12.0        2.7
System Call Overhead                        114433.5   284563.4       24.9
=========
FINAL SCORE                                                      17.6
(不得不说便宜没好货,贵的不一定好)

Send Email via Telnet

You do/type this Server responds with
Telnet to hostname on port 25 220 (then identifies itself – possibly with several lines of 220 + text)
HELO your_domain_name or whatever 250 (followed by human readable message)
MAIL FROM:[email protected] (ie, your email address) 250 is syntactically correct (or similar)
RCPT TO:them@someplace_else.com (email address you want to send to) 250 is syntactically correct
DATA Tells you to send data then CRLF period CRLF at end
You type your message then CRLF period CRLF (ie, type a period on a line by itself then hit ENTER) 250
QUIT Signoff message

5分钟完成配置CentOS+Apache+MySQL+PHP5+Webmin+PPTP VPN+Subversion+etc

嗯,今天实在不知道的写什么,就只有把老本拿出来了:自己折腾了N台vps后整理出的快速配置centos的脚本,只要打开terminal一行行的粘进去回车就完事。
正常情况下是可以在5分钟内完成一台新vps的配置的,如果遇到非正常情况。。就。。。。。。
跑poptopd的前提是你的vps是xen架构,否则免谈

#安装epel+rpmforge
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
wget http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt http://quattor.web.lal.in2p3.fr/packages/os/sl520-x86_64/base/RPM-GPG-KEYs/RPM-GPG-KEY-CentOS-5 http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
rpm –import RPM-GPG-KEY.dag.txt
rpm –import RPM-GPG-KEY-CentOS-5
rpm -Uhv rpmforge-release-0.5.1-1.el5.rf.i386.rpm

#更新系统
yum -y update
yum -y upgrade
#install php 5.2+ on centos5
vim /etc/yum.repos.d/CentOS-Testing.repo

[c5-testing]
name=CentOS-5Testing
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
includepkgs=php*

#安装lamp和subversion+其他一些东西
yum -y install perl-Net-SSLeay gcc-c++ patch zlib-devel openssl-devel readline-devel mysql-devel mysql-server httpd-devel apr-devel iptables php-common php-gd php-mcrypt php-pear php-mhash php-mysql php-xml php-mbstring traceroute bind-utils setuptool mod_dav_svn subversion sqlite-devel ntp

#poptopd pptp vpn server
rpm -Uvh http://poptop.sourceforge.net/yum/stable/fc7/pptp-release-current.noarch.rpm
yum -y –enablerepo=poptop-stable install pptpd

vim /etc/pptpd.conf (修改localip、remoteip)
vim /etc/ppp/options (修改ms-dns),
vim /etc/ppp/chap-secrets (创建用户名、密码,指定ip)
vim /etc/sysctl.conf
#修改
net.ipv4.ip_forward = 1
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 内网ip段(eg. 192.168.100.0/24) -j SNAT –to 服务器的任意ip(eg. 1.2.3.4)
/etc/init.d/iptables save
/etc/init.d/iptables restart

#webmin图形化的web管理界面,减少命令行的折腾程度
wget http://prdownloads.sourceforge.net/webadmin/webmin-1.520-1.noarch.rpm
rpm -i webmin-1.520-1.noarch.rpm

#subversion
svnadmin create /path/to/repo
chmod 777 -R /path/to/repo
htpasswd -c /path/to/svn/password username#下面这段丢给httpd.conf

DocumentRoot /path/to/svn/repo
ServerName svn.yourname.com

DAV svn
SVNPath /data/svn
AuthType Basic
AuthName “Subversion”
AuthUserFile /path/to/svn/password
Require valid-user

#大功告成^_^

非常NB的软7层交换机-haproxy在centos上最简化配置

yum -y install haproxy
vim /etc/haproxy/haproxy.cfg
#    use_backend static          if url_static  #注释掉这一行
server  app1 你的服务器真实ip:端口 check  #修改这一行
删掉其余两行server app1

保存退出完事
然后service haproxy start

自己hosts后就可以感受一下了,对于动态内容加速效果还是很明显的,支持非常强大的配置,等有空研究清楚了继续贴配置

之前搞错了- -haproxy主要是作为load balancer用,部署在最前端,后面一般是个squid群,squid之后才是应用服务器,应用服务器后面可以再来一层数据库服务器,这样的架构抗负载能力是非常强悍的。

目前我这个烂博客已经实现squid+apache+mysql分布在3台服务器,其中一台跑在xeex的网络后面作为前端,另外两个在Amazon的ec2上。估计是没必要考虑引入haproxy的了- –