notice
June 17th, 2010  | Categories: Uncategorized  | Tags:

因为服务器资源等原因,我的blog搬家到了zysno1.wordpress.com。后面新的内容,都会在那里发布

Popularity: 5% [?]

April 14th, 2010  | Categories: Linux  | Tags:

查找ssh通道失效原因的方法:

1,首先查看~/.ssh/authorized_keys文件的内容以及权限。应该包括登录机的public key。而且权限应该是600,700也行。但是不能给非owner开放写权限。

2, 然后查看/var/log/messages

通常里面会有ssh通道失效相关的信息,比如bad ownership of directory之类的信息。 也有时是没有的。。我就碰到过多次。

3,如果前几步没找到线索。开始检查用户的~,以及~/.ssh,以及/home几个目录的权限,如果sshd_config开启了 StrictModes,这些目录是不可以给非owner开放写权限的。形如drwxrwxrw-这样的权限是错误的。

4, 这个时候还不行,用debug模式吧。ssh -vvv username@hostname。不过通常这种方法都没啥用。我自己还真没用这种方法解决过通道问题。也许是我比较土。

Popularity: 5% [?]

April 7th, 2010  | Categories: Linux, 工作笔记  | Tags:
  • 方法1:

        在grub中增加maxcpus参数

         maxcpus = number of cpus

  • 方法2:

         直接禁用指定的CPU/CPU core

         echo 0 >>/sys/devices/system/cpu/cpuN/online

         如果需要enable一个CPU/CPU core

         只要echo 1 >>/sys/devices/system/cpu/cpuN/online

         N为对应的CPU ID

Popularity: 5% [?]

April 1st, 2010  | Categories: Uncategorized  | Tags:

查看cpu:

sar -u

查看I/O:

sar -b

查看内存使用情况:

sar -r

查看网卡流量统计:

sar -n EDEV

Popularity: 2% [?]

March 21st, 2010  | Categories: Linux, 工作笔记  | Tags:

今天做了一个LVM device和Raw device的I/O性能比较测试:

通过hdparm来测试两种模式的read性能

root@r02j08048 # hdparm -t /dev/mapper/VolGroup-Vol1

/dev/mapper/VolGroup-Vol1:
 Timing buffered disk reads:  326 MB in  3.01 seconds = 108.33 MB/sec

root@r02j08048 # hdparm -t /dev/sdd1

/dev/sdd1:
 Timing buffered disk reads:  330 MB in  3.01 seconds = 109.73 MB/sec

从测试结果看,两种模式的读性能差别不大。

再使用dd来测试

root@r02j08048 # time dd if=/dev/sdb1 of=/dev/zero bs=8k count=300000
300000+0 records in
300000+0 records out
2457600000 bytes (2.5 GB) copied, 0.527933 seconds, 4.7 GB/s

real    0m0.530s
user    0m0.063s
sys    0m0.467s
root@r02j08048 # time dd if=/dev/mapper/VolGroup-Vol1 of=/dev/zero bs=8k count=300000

300000+0 records in
300000+0 records out
2457600000 bytes (2.5 GB) copied, 21.7508 seconds, 113 MB/s

real    0m21.752s
user    0m0.067s
sys    0m2.115s

用dd测出来的数据相差非常大,lvm的read性能和普通的硬盘分区相差非常大。

Popularity: 3% [?]

March 21st, 2010  | Categories: Linux  | Tags:

RHEL默认的systcl参数,在网络延时增大的跨机房/广域网环境下,需要调整。

默认的sysctl参数情况下,TCP Stream速度只能达到352M。


[root@gate19 ~]# ./netperf -H 10.249.66.31 -p 9000

TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.249.66.31 (10.249.66.31) port 0 AF_INET

Recv   Send    Send

Socket Socket  Message  Elapsed

Size   Size    Size     Time     Throughput

bytes  bytes   bytes    secs.    10^6bits/sec

 

 87380  16384  16384    10.00     352.45

可以调整sysctl的下列几个参数:

net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
# increase Linux autotuning TCP buffer limits
# min, default, and max number of bytes to use
# set max to at least 4MB, or higher if you use very high BDP paths
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216

同时增加the size of the interface queue

ifconfig eth0 txqueuelen 1000

经过上述调整后,


[root@als_sa1 ~]# /tmp/netperf/bin/netperf -H 10.249.68.47 -p 12865

TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.249.68.47 (10.249.68.47) port 0 AF_INET

Recv   Send   Send                         

Socket Socket  Message Elapsed             

Size   Size   Size     Time     Throughput 

bytes  bytes   bytes   secs.    10^6bits/sec 

87380  65536  65536    10.01     835.87  

提高到了835M,接近了941M的网卡性能上限。

 

参考Link:

http://www.psc.edu/networking/projects/tcptune/

http://shlang.com/writing/tcp-perf.html

Popularity: 10% [?]

March 21st, 2010  | Categories: Uncategorized  | Tags:
1. dag wieers
 
2. elrepo
 
3. EPEL

Popularity: 2% [?]

February 6th, 2010  | Categories: Uncategorized  | Tags:
  • CPU性能测试

测试CPU的性能,主要是测试它的运算能力,包括整形,浮点计算。主要的主流测试工具,包括linpack,nbench等

一般业界都使用linpack来进行测试。在测试中,根据被测试服务器的CPU类型,选择对应的linpack程序。比如xeon64,就使用 xlinpack_xeon64来进行测试。这里使用的linpack工具,是intel提供的。用intel自己的编译器编译的,针对Intel的 CPU进行了优化

在不熟悉linpack的前提下,可以使用默认自带的lininput_xeon64测试脚本。慢慢熟悉后,可以根据测试对象自己来定制测试脚本

测试方法:

解压缩Linpack软件包

export OMP_NUM_THREADS=16(这个是测试并发的线程数,一般设置成CPU个数,或者是个数的两倍, 如果不指定,默认是CPU个数)

./xlinpack_xeon64 lininput_xeon64

然后记录测试结果中的GFlops.也可以直接使用runme_xeon64这个测试脚本,结果会保存在lin_xeon64.txt这个文件中。

  • 内存带宽测试:

         stream是用来测试内存带宽的

  • netperf:

  • iometer:

Popularity: 2% [?]

January 26th, 2010  | Categories: Uncategorized  | Tags:
  • 机器插内存情况

dmidecode |grep -P -A 5  "Memory\s+Device"|grep Size:|grep -v Range

  • 机器最大支持内存

dmidecode |grep -P "Maximum\s+Capacity"

Popularity: 1% [?]

January 21st, 2010  | Categories: Uncategorized  | Tags:

 自己写nagios插件来做监控,需要遵守nagios plugin的返回值规范。

 

 ok                0
 warning     1
 critical         2
 unknown    3

Popularity: 1% [?]

Top