June 8th, 2010

Linode 360 VPS BenchMark

  昨天帮实验室买了个Linode 360的VPS,梦寐以求哇,迫不及待的去折腾。选在了加州的fremont机房,北京网通的ping值大概在210ms左右,很极品的速度了,ssh上去交互只有一点点地小卡。装的CentOS 5.5,然后配了几个shell账号,通过he.net提供的tunnel broker增加了IPv6的支持,最后装了个启用passenger-ruby模块支持的nginx。明天继续折腾。

  下班前顺便跑了一下Unix Bench 5.1.2,硬件配置上是一颗Intel Xeon L5520 2.27GHz四核的CPU, 8M Cache, Xen虚拟化,360M RAM,16GB Hard Drive。结果如下。

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.2)

   System: li165-73: GNU/Linux
   OS: GNU/Linux -- 2.6.32.12-linode25 -- #1 SMP Wed Apr 28 19:25:11 UTC 2010
   Machine: i686 (i386)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Xeon(R) CPU L5520 @ 2.27GHz (4533.5 bogomips)
          Hyper-Threading, MMX, Physical Address Ext
   CPU 1: Intel(R) Xeon(R) CPU L5520 @ 2.27GHz (4533.5 bogomips)
          Hyper-Threading, MMX, Physical Address Ext
   CPU 2: Intel(R) Xeon(R) CPU L5520 @ 2.27GHz (4533.5 bogomips)
          Hyper-Threading, MMX, Physical Address Ext
   CPU 3: Intel(R) Xeon(R) CPU L5520 @ 2.27GHz (4533.5 bogomips)
          Hyper-Threading, MMX, Physical Address Ext
   18:35:04 up 1 day,  2:19,  1 user,  load average: 0.00, 0.00, 0.00; runlevel 3

------------------------------------------------------------------------
Benchmark Run: 二  6月 08 2010 18:35:04 - 19:03:21
4 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables        9671772.5 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     1914.6 MWIPS (10.5 s, 7 samples)
Execl Throughput                               1259.3 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        302168.6 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           77339.6 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        880748.9 KBps  (30.0 s, 2 samples)
Pipe Throughput                              425294.5 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  22283.7 lps   (10.0 s, 7 samples)
Process Creation                               2188.1 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   3003.2 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    846.0 lpm   (60.0 s, 2 samples)
System Call Overhead                         437322.7 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0    9671772.5    828.8
Double-Precision Whetstone                       55.0       1914.6    348.1
Execl Throughput                                 43.0       1259.3    292.9
File Copy 1024 bufsize 2000 maxblocks          3960.0     302168.6    763.1
File Copy 256 bufsize 500 maxblocks            1655.0      77339.6    467.3
File Copy 4096 bufsize 8000 maxblocks          5800.0     880748.9   1518.5
Pipe Throughput                               12440.0     425294.5    341.9
Pipe-based Context Switching                   4000.0      22283.7     55.7
Process Creation                                126.0       2188.1    173.7
Shell Scripts (1 concurrent)                     42.4       3003.2    708.3
Shell Scripts (8 concurrent)                      6.0        846.0   1410.0
System Call Overhead                          15000.0     437322.7    291.5
                                                                   ========
System Benchmarks Index Score                                         433.5

------------------------------------------------------------------------
Benchmark Run: 二  6月 08 2010 19:03:21 - 19:31:52
4 CPUs in system; running 4 parallel copies of tests

Dhrystone 2 using register variables       34776757.0 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     7017.4 MWIPS (10.3 s, 7 samples)
Execl Throughput                               4465.6 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        279935.4 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           73559.9 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        993067.5 KBps  (30.0 s, 2 samples)
Pipe Throughput                             1545852.2 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 153438.0 lps   (10.0 s, 7 samples)
Process Creation                               4991.3 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   6503.9 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    985.1 lpm   (60.1 s, 2 samples)
System Call Overhead                        1479565.4 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   34776757.0   2980.0
Double-Precision Whetstone                       55.0       7017.4   1275.9
Execl Throughput                                 43.0       4465.6   1038.5
File Copy 1024 bufsize 2000 maxblocks          3960.0     279935.4    706.9
File Copy 256 bufsize 500 maxblocks            1655.0      73559.9    444.5
File Copy 4096 bufsize 8000 maxblocks          5800.0     993067.5   1712.2
Pipe Throughput                               12440.0    1545852.2   1242.6
Pipe-based Context Switching                   4000.0     153438.0    383.6
Process Creation                                126.0       4991.3    396.1
Shell Scripts (1 concurrent)                     42.4       6503.9   1533.9
Shell Scripts (8 concurrent)                      6.0        985.1   1641.9
System Call Overhead                          15000.0    1479565.4    986.4
                                                                   ========
System Benchmarks Index Score                                         999.7

Tags: , ,

July 6th, 2009

Linux中ADSL通过6to4自动穿隧连入IPv6

  前两天捣鼓了一个USB ADSL在VMWare虚拟机中Linux系统中的安装配置和拨号方法。目前青岛网通这里,如果是在Windows环境下,拨号后能够自动获取6to4自动穿隧方式的2002开头的IPv6地址,Linux下的获取需要手动配置一下,并不是很复杂。

  如果是Windows系统,那么通过ipconfig可以得到类似如下的信息。

C:\Documents and Settings\Administrator>ipconfig
Windows IP Configuration
 
PPP adapter AccessRunner DSL:
   Connection-specific DNS Suffix  . :
   IP Address. . . . . . . . . . . . : 123.235.169.32
   Subnet Mask . . . . . . . . . . . : 255.255.255.255
   Default Gateway . . . . . . . . . : 123.235.169.32
 
Tunnel adapter 6to4 Tunneling Pseudo-Interface:
   Connection-specific DNS Suffix  . :
   IP Address. . . . . . . . . . . . : 2002:7beb:a920::7beb:a920
   Default Gateway . . . . . . . . . : 2002:c058:6301::c058:6301

  其中IPv6地址中的7beb:a920正好对应动态IPv4的地址123.235.169.32,而IPv6网关地址中的c058:6301对应的是不变的192.88.99.1,这个192.88.99.1是一个特定的6to4中用于任意点传送的中继路由地址。需要做的就是记好这几个地址的规律。

  然后换到Linux中,配置好ADSL,拨号后连入IPv4网,ifconfig查询到新获得的动态IPv4地址,然后按照上面的规律自行将其转换到6to4方式下2002开头的IPv6地址。例如现在得到的是124.135.17.179,对应的6to4地址为2002:7c87:11b3::7c87:11b3。下面将手动添加6to4隧道和中继路由。

[root@leon ~]# ip tunnel add 6to4 mode sit remote any local 124.135.17.179
[root@leon ~]# ip link set dev 6to4 up
[root@leon ~]# ip addr add 2002:7c87:11b3::7c87:11b3/16 dev 6to4
[root@leon ~]# ip -6 route add ::/0 via ::192.88.99.1 dev 6to4 metric 1026

  添加完后通过ifconfig可以看到新多出的网卡6to4,同时ping6一下ipv6.google.com已经可以正常的显示结果。

[root@leon ~]# ifconfig
6to4      Link encap:IPv6-in-IPv4
          inet6 addr: 2002:7c87:11b3::7c87:11b3/16 Scope:Global
          inet6 addr: ::124.135.17.179/128 Scope:Compat
          UP RUNNING NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
 
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:560 (560.0 b)  TX bytes:560 (560.0 b)
 
nas0      Link encap:Ethernet  HWaddr 00:08:5C:14:C0:FB
          inet6 addr: fe80::208:5cff:fe14:c0fb/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:275 errors:0 dropped:0 overruns:0 frame:0
          TX packets:281 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:23972 (23.4 KiB)  TX bytes:19561 (19.1 KiB)
 
ppp0      Link encap:Point-to-Point Protocol
          inet addr:124.135.17.179  P-t-P:124.135.17.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:236 errors:0 dropped:0 overruns:0 frame:0
          TX packets:236 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:20202 (19.7 KiB)  TX bytes:9883 (9.6 KiB)
[root@leon ~]# ping6 -c 4 ipv6.google.com
PING ipv6.google.com(tx-in-x68.google.com) 56 data bytes
64 bytes from tx-in-x68.google.com: icmp_seq=1 ttl=58 time=384 ms
64 bytes from tx-in-x68.google.com: icmp_seq=2 ttl=58 time=385 ms
64 bytes from tx-in-x68.google.com: icmp_seq=3 ttl=58 time=387 ms
64 bytes from tx-in-x68.google.com: icmp_seq=4 ttl=58 time=390 ms
 
--- ipv6.google.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3396ms
rtt min/avg/max/mdev = 384.629/386.821/390.147/2.146 ms

  总结配置过程,首先观察windows下6to4方式IPv4地址与IPv6地址的对应关系及其中继路由地址,然后在Linux中添加隧道,设置6to4网卡,添加IPv6地址和中继路由,最后测试成功。

  延伸阅读:http://en.wikipedia.org/wiki/6to4http://en.wikipedia.org/wiki/IPv6

Tags: , , , ,

September 14th, 2008

IPv6 Is Comming

学校网络中心给宿舍教育网开通了IPv6的服务,现在正在测试中,不得不说,真的很欣喜。

目前使用的原理是通过配置ISATAP隧道来实现将IPv6的包封装再IPv4中,还有一种办法是6to4,似乎用得不多。

一个字,屡试不爽!

1.目前本人感觉最爽的一点:借“IPv6之机”无限流量访问外网

因为教育网本身是限制了国外访问流量的,实验室里倒是都有国际流量,可是宿舍里就不行了。开了IPv6之后,通过6Bone提供的一个只针对IPv6的http代理服务器(不要问我服务器地址是多少,自己去找,只要你真心有志想用,不可能找不到。当然前提是你必须已经能够正常使用IPv6)。关于6Bone,是一个IPv6的官方实验组织。另外还有一个也是只针对IPv6的http代理.sixxs.org,简单用了一下,速度不如6Bone提供的那个。于是现在,ibm,youtube,wikipedia,debian,sourceforge等等等等,都是可以正常访问的。不要告诉我你将IPv6理解成用来突破GFW的,这么想的人不配使用IPv6。

2.开通了一个学习的途径

IPv6本身就是一项吵了很久的东西,终于见到实践了(尽管还是使用isatap,并非真正完全的IPv6),感觉很多东西都挺陌生。可惜最近忙复习,没空细究。遗憾遗憾。希望有机会好好深究一下。


Read the rest of this entry »

Tags: , ,