From 6b4cca8b27f4c1ce25327c4789f87f63751d931a Mon Sep 17 00:00:00 2001 From: stilez Date: Thu, 8 Mar 2018 23:41:06 +0000 Subject: [PATCH] Update per discussion on samba mailing list --- docs-xml/manpages/vfs_aio_pthread.8.xml | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/docs-xml/manpages/vfs_aio_pthread.8.xml b/docs-xml/manpages/vfs_aio_pthread.8.xml index 69a83468bff..3ed95ea93cf 100644 --- a/docs-xml/manpages/vfs_aio_pthread.8.xml +++ b/docs-xml/manpages/vfs_aio_pthread.8.xml @@ -41,25 +41,28 @@ descriptor which essentially makes Posix AIO useless on systems using the glibc implementation. - To work around all these limitations, the aio_pthread module - was written. It uses a pthread pool instead of the - internal Posix AIO interface to allow read and write calls - to be process asynchronously. A pthread pool is created - which expands dynamically by creating new threads as work is - given to it to a maximum of 100 threads per smbd process. - To change this limit see the "aio num threads" parameter - below. New threads are not created if idle threads are - available when a new read or write request is received, - the new work is given to an existing idle thread. Threads - terminate themselves if idle for one second. + + To work around all these limitations, the aio_pthread module uses a + pthread pool instead of the internal Posix AIO interface. This allows read + and write calls to be process asynchronously and more efficiently. The + pthread pool expands dynamically by creating new threads as work is + given to it. A maximum of 100 threads per smbd process is set by default; + this limit can be changed using the aio max threads + or aio_threads:aio num threads parameter. If idle + threads are available when a new read or write request is received, the + new work is given to an existing idle thread and a new thread is not + created. Threads terminate if idle for one second. - Note that the smb.conf parameters aio read size - and aio write size must also be set appropriately - for this module to be active. + Note that the smb.conf parameters aio read size and + aio write size must also be set appropriately for this + module to be active. Historically a value of 1024 was suggested for each, to work + around a bug in MacOS SMB2 that prevented symlinks from being written. As async + writes are now always handled correctly, the only reasonable values are currently + 0 (no async I/O) and 1 (always do async I/O). - + This module MUST be listed last in any module stack as the Samba VFS pread/pwrite interface is not thread-safe. This module makes direct pread and pwrite system calls and does