Linux 版 (精华区)

发信人: tcpip (干打雷,不下雨), 信区: Linux
标  题: 提高Samba的速度
发信站: 哈工大紫丁香 (Thu Jun 17 04:36:18 1999), 转信

昨天把Samba升级到了2.0,觉得速度好像比从前慢。

测试了一下,同一个文件通过samba比通过ftp差不多

慢了一倍。不知道究竟哪里出了问题,于是看了一下

samba的文档,就是speed.txt了。改了几个参数,现在差不多了。

该文挡在http://us1.samba.org/samba/ftp/docs/textdocs/Speed.txt

可以找到。

我主要用的是(都是加在global setting里)

oplocks = False

Samba的解释是:With some oplock types the client may even cache file open/c

loseoperations. This can give enormous performance benefits.

   socket options = TCP_NODELAY

这个好像是缺省,或者是在smb.conf里有介绍,去掉注释就行了

The socket option TCP_NODELAY is the one that seems to make the

biggest single difference for most networks. Many people report that

adding "socket options = TCP_NODELAY" doubles the read performance of

a Samba drive. The best explanation I have seen for this is that the

Microsoft TCP/IP stack is slow in sending tcp ACKs.

另外还有几个参数,不过不是很重要:

   debug level = 0

不写log,如果需要log就不必了。

   syslog = 0

   syslog only = yes

   read size = 32768

硬盘速度跟网络速度调节,大概32K差不多了,大于64K就不必了。

总之呢,仔细看一下samba的文档,不需要的功能都不用,跟网络,

硬盘有关的参数都适当调整就是了。


--
☆ 来源:.哈工大紫丁香 bbs.hit.edu.cn.[FROM: bin@mtlab.hit.edu.cn]
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:9.935毫秒