访问Samba共享的文件慢的问题

解决:


1: [global]

socket options = IPTOS_LOWDELAY TCP_NODELAY SO_RCVBUF=16384 SO_SNDBUF=16384


2:在 smb.conf �e添加下面的�Z句就可以解�Qsmb ports = 139  (加入访问速度快)我是这样解决的


3:


修改 /opt/etc/samba/smb.conf,加入


[global]


read size = 512

socket options = TCP_NODELAY SO_KEEPALIVE SO_RCVBUF=512 SO_SNDBUF=512 IPTOS_LOWDELAY

getwd cache = yes


follow symlinks = no

wide links = no


read raw = yes

write raw = yes


large readwrite = yes

getwd cache = yes

strict locking = no

fake oplocks = yes

oplocks = no


4:关闭防火墙和selinux


5. hosts和/etc/sysconfig/network    


主机名保持一致


注意检查。发现了一下自己的服务器配置,两个文件的主机名不一样,hosts中的主机名是默认的.


[root@server ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=redhat


[root@server ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain localhost
::1       localhost6.localdomain6 localhost6


将hosts文件中的主机名也改成和network中的主机名一样(如下)


[root@server ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
#127.0.0.1       localhost.localdomain localhost
127.0.0.1        redhat
::1       localhost6.localdomain6 localhost6


你可能感兴趣的:(samba)