doc:os:freebsd:samba:performance
Различия
Показаны различия между двумя версиями страницы.
| Следующая версия | Предыдущая версия | ||
| doc:os:freebsd:samba:performance [d.m.Y H:i] – создано dbehterev | doc:os:freebsd:samba:performance [d.m.Y H:i] (текущий) – Статус обсуждения изменён dbehterev | ||
|---|---|---|---|
| Строка 1: | Строка 1: | ||
| + | ====== Ускоряем работу samba по сети ====== | ||
| + | Рассмотрим, | ||
| + | |||
| + | Рассматриваемая среда: | ||
| + | - ОС: 8.2-PRERELEASE FreeBSD amd64 SMP | ||
| + | - HP microserver, | ||
| + | - CPU: AMD Athlon(tm) II Neo N36L Dual-Core Processor | ||
| + | - RAM: 1Гб | ||
| + | - NIC: HP NC107i PCIe Gigabit Server Adapter | ||
| + | |||
| + | ===== Порядок действий ===== | ||
| + | |||
| + | **1.** Собираем/ | ||
| + | |||
| + | **2.** В / | ||
| + | < | ||
| + | aio_load=" | ||
| + | </ | ||
| + | **3.** В / | ||
| + | < | ||
| + | kern.ipc.maxsockbuf=16777216 | ||
| + | kern.ipc.maxsockets=204800 | ||
| + | kern.ipc.nmbclusters=32768 | ||
| + | kern.ipc.somaxconn=32768 | ||
| + | kern.maxfiles=256000 | ||
| + | kern.maxfilesperproc=32768 | ||
| + | kern.maxvnodes=800000 | ||
| + | net.inet.tcp.delayed_ack=0 | ||
| + | net.inet.tcp.inflight.enable=0 | ||
| + | net.inet.tcp.path_mtu_discovery=0 | ||
| + | net.inet.tcp.recvbuf_auto=1 | ||
| + | net.inet.tcp.recvbuf_inc=524288 | ||
| + | net.inet.tcp.recvbuf_max=16777216 | ||
| + | net.inet.tcp.recvspace=65536 | ||
| + | net.inet.tcp.rfc1323=1 | ||
| + | net.inet.tcp.sendbuf_auto=1 | ||
| + | net.inet.tcp.sendbuf_inc=524288 | ||
| + | net.inet.tcp.sendspace=131072 | ||
| + | net.inet.udp.maxdgram=57344 | ||
| + | net.inet.tcp.recvspace=131072 | ||
| + | net.local.stream.recvspace=65536 | ||
| + | net.local.stream.sendspace=65535 | ||
| + | net.inet.tcp.sendbuf_max=16777216 | ||
| + | net.inet.tcp.mssdflt=1460 | ||
| + | </ | ||
| + | **4.** В / | ||
| + | < | ||
| + | socket options=SO_RCVBUF=131072 SO_SNDBUF=131072 TCP_NODELAY | ||
| + | #socket options = SO_RCVBUF=65536 SO_SNDBUF=65536 | ||
| + | #socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE | ||
| + | #socket options=TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8192 SO_SNDBUF=8192 | ||
| + | min receivefile size=16384 | ||
| + | use sendfile=true | ||
| + | ##aio read size = 16384 | ||
| + | ##aio read size = 65536 | ||
| + | aio write size = 16384 | ||
| + | #aio write size = 65536 | ||
| + | aio write behind = true | ||
| + | </ | ||
| + | Закоментировал параметры, | ||
| + | |||
| + | **5.** Перегружаемся. Копируем/ | ||
| + | |||
| + | **6.** Настройки smb.conf: | ||
| + | < | ||
| + | [global] | ||
| + | |||
| + | smb ports = 445 139 | ||
| + | |||
| + | workgroup = WORKGROUP | ||
| + | netbios name = NAS | ||
| + | |||
| + | security = share | ||
| + | hosts allow = 192.168.1. | ||
| + | |||
| + | log file = / | ||
| + | max log size = 5000 | ||
| + | |||
| + | local master = yes | ||
| + | os level = 65 | ||
| + | domain master = yes | ||
| + | preferred master = yes | ||
| + | wins support = yes | ||
| + | dns proxy = no | ||
| + | |||
| + | dos charset = cp1251 | ||
| + | unix charset = cp1251 | ||
| + | #unix charset = UTF-8 | ||
| + | display charset = cp1251 | ||
| + | |||
| + | store dos attributes = yes | ||
| + | |||
| + | nt acl support = yes | ||
| + | inherit acls = yes | ||
| + | map acl inherit = yes | ||
| + | |||
| + | # BDS for improve performance | ||
| + | socket options=SO_RCVBUF=131072 SO_SNDBUF=131072 TCP_NODELAY | ||
| + | #socket options = SO_RCVBUF=65536 SO_SNDBUF=65536 | ||
| + | #socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE | ||
| + | #socket options=TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8192 SO_SNDBUF=8192 | ||
| + | min receivefile size=16384 | ||
| + | use sendfile=true | ||
| + | ##aio read size = 16384 | ||
| + | ##aio read size = 65536 | ||
| + | aio write size = 16384 | ||
| + | #aio write size = 65536 | ||
| + | aio write behind = true | ||
| + | |||
| + | # | ||
| + | |||
| + | [install] | ||
| + | path = / | ||
| + | public = yes | ||
| + | writable = yes | ||
| + | printable = no | ||
| + | guest ok = yes | ||
| + | </ | ||
| + | |||
| + | TAG: {{tag> samba FreeBSD}} | ||
| + | |||
| + | ~~DISCUSSION: | ||
