Chinaunix首页 | 论坛 | 博客
  • 博客访问: 186292
  • 博文数量: 51
  • 博客积分: 689
  • 博客等级: 上士
  • 技术积分: 525
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-03 13:05
文章分类

全部博文(51)

文章存档

2014年(1)

2013年(2)

2012年(7)

2011年(11)

2010年(30)

分类:

2010-08-03 17:21:48

Tuning CentOS 5.x x64 for iSCSI Performance

In order to get the best performance from CentOS and the iSCSI deployment we recommend the following tweaks. These tweaks will give you the best performance for your iSCSI deployments. The network configuration can be used with NFS as is. Click to read more...

Add the following to your /etc/sysctl.conf:

net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_syncookies = 1
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_moderate_rcvbuf = 1
net.core.netdev_max_backlog = 2500



Run the following to modify the TX queue of the ethernet adapters:


ifconfig eth1 txqueuelen 1000
(Only do this for 1GB links)


Modify the MTU on the ethernet adapters:

Add the following line to the IF configuration files: (located at /etc/sysconfig-network-scripts/ifcfg-eth*)


MTU=9000


Add the following to your ietd.conf (iSCSI configuation files):

InitialR2T No
ImmediateData Yes
xMaxRecvDataSegmentLength 262144


iSCSI ietd.conf Optimizations

If you have a hardware RAID controller for the data set you will be exporting via iSCSI you can use the configuration called 'blockio'. This setting will allow the RAID card to do all the caching and buffering that it needs. If you are using Software RAID or 'fake' RAID you should use the type 'fileio' this will allow the iSCSI service to use the processor and built in RAM to do caching and buffering.


The next important setting is the IOmode (this setting is ignored with Blockio and only effective in fileIO); if you set this to WB you will have data loss in the event of a power outage that does not allow the iSCSI service to gracefully terminate and flush the cache. USE WITH CAUTION.



Here is a sample ietd.conf LUN definition:

Lun 1 Type=blockio,Path=/dev/ESX_VG1/esx_iscsi_1,IOMode=wb,ScsiId=1,ScsiSN=1



You notice the use of Volume Groups here, this is to allow snapshots of the LUN (but more on that in a later posting).

Bookmark/Search this post with:
阅读(1137) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~