Войти

Показать полную графическую версию : скорость работы самбы


Vlad Drakula
01-02-2007, 12:34
поставил я на один комп самбу, настроил, создал сетевой диск, подключил к винде.
поставил я на это сетевой диск игру.
по началу все было хорошо, но вот когда у меня линукс стоит не залогиненый наблюдаются сильные лаги (ресурсы игра загружает как то медленно)
не знаю с этил ли это связано?

ruslandh
01-02-2007, 21:22
Трудно сказать - как минимум, надо посмотреть top на сервере.

Vlad Drakula
04-02-2007, 12:38
заглянул в TOP понял что как то памяти маловато, сделал апгрейд до 512 (больше материнка не держит)
+ обновил сетевые карты, теперь сокрость работы примерно 125мбит (неньше было порядка 70мбит)

Vlad Drakula
05-02-2007, 00:35
все что я делал раньше не помогло,
помогло только залогинивание под иксами.

в итоге скорость работы позрасла с 125мбит до 160-170 мбит

Envel
06-02-2007, 16:01
# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/speed.html
# for details
# You may want to add the following on a Linux system:
# SO_RCVBUF=8192 SO_SNDBUF=8192
socket options = TCP_NODELAY

Vlad Drakula
09-02-2007, 10:49
Envel
пробовал не помогло...

после длительных нублюдейний обнаружил что иногла поток данных прерывается и на достаточно длинное время, при это в процессах на обоих машинах проде ничего не обычного не происходит... от чего это может быть?

ruslandh
10-02-2007, 03:35
Vlad Drakula
А не пробовали обновить самбу, или в рассылке самбы поспрашивать (самый правильный путь - там много пользователей самбы и помимо этого в ней участвуют и разработчики самбы :) )

Vlad Drakula
10-02-2007, 12:37
ruslandh
самбду вроде обновлял, в рассылке не спрашивал.

Vlad Drakula
10-02-2007, 20:04
после дительных тестов отловил следующую ошибку в логах:


[2007/02/10 19:59:39, 1] smbd/service.c:make_connection_snum(693)
192.168.0.124 (192.168.0.124) connect to service files initially as user nobody (uid=65534, gid=65534) (pid 4943)
[2007/02/10 20:00:15, 0] smbd/oplock.c:oplock_timeout_handler(366)
Oplock break failed for file games/Russobit-M/Fallen Lords - Condemnation/data/geometry/Characters/ILA/is-A4EDP.tmp -- replying anyway
[2007/02/10 20:00:25, 1] smbd/service.c:close_cnum(890)
192.168.0.124 (192.168.0.124) closed connection to service files

как ее исправить?

Vlad Drakula
11-02-2007, 15:06
File Locking

By default, Samba supports two types of file locking. These are share modes and opportunistic locks, or oplocks.

Share modes support the standard DOS/Windows file open sharing requests of DENY_DOS, DENY_ALL, DENY_READ, DENY_WRITE, DENY_NONE, and DENY_FCB.

Under versions of UNIX that support shared memory (most versions of UNIX), share modes support is implemented using shared memory, which is very fast. If your version of UNIX does not support shared memory, share modes support is implemented using lock files, which can be very slow.

You most likely never have to turn share modes off, but in the event that you do, they can be turned off on a per-share basis with the following command:

share modes = no

Oplocks are a performance enhancement introduced with Windows NT Server. They allow clients to cache many file operations as long as that client is the only one accessing a particular file. When another client opens the same file, the server has to send an oplock break to the client with the oplock, which forces that client to stop local caching.

When clients can obtain oplocks, performance enhancements of 30% or more are possible, because clients can do aggressive caching on file operations (including caching opens and closes and possibly reordering some operations).

With Samba, oplocks are enabled by default. In some cases, client programs fail to operate properly in the presence of oplocks, so you might want to switch them off. They can be switched off for individual shares with the oplocks command:

oplocks = false

They can also be switched off for individual files with the veto oplock files parameter:

veto oplocks files = /*.mbx/

To complete the picture, SGI's Irix 6.5.2f now has kernel-level oplock support, and Linux and FreeBSD might have it soon as well. Samba can detect the presence of kernel oplocks and use them if available. This allows oplocks to be broken whenever a local UNIX process or an NFS operation access a file that smbd has locked, thus providing more complete data consistency between SMB, NFS, and local file accesses.

Although you should never need to touch the parameter, kernel oplocks can be switched off with

kernel oplocks = off


oplocks = false - помогло, но скорость работы действительнго упала.




© OSzone.net 2001-2012