Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

Название темы: скорость работы самбы
Показать сообщение отдельно

Ночной странник


Contributor


Сообщения: 4050
Благодарности: 83

Профиль | Сайт | Отправить PM | Цитировать


Цитата:
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 - помогло, но скорость работы действительнго упала.

-------
можно практически все, но просто мы это еще не знаем.
главный враг програмиста это копипастинг
За хорошее сообщение не забываем нажимать ссылочку "Полезное сообщение"!


Отправлено: 15:06, 11-02-2007 | #10

Название темы: скорость работы самбы