smbd: Enable async I/O by default
authorVolker Lendecke <vl@samba.org>
Mon, 4 Dec 2017 14:39:10 +0000 (15:39 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 12 Dec 2017 19:37:08 +0000 (20:37 +0100)
We've had this code in for long enough that we should enable it by default.
Modern clients do overlapping I/O, we should utilize that if possible.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
docs-xml/smbdotconf/tuning/aioreadsize.xml
docs-xml/smbdotconf/tuning/aiowritesize.xml
lib/param/loadparm.c
source3/param/loadparm.c

index c6028b8..4785d2a 100644 (file)
@@ -13,7 +13,7 @@
   <related>aio write size</related>
 </description>
 
-<value type="default">0</value>
-<value type="example">1<comment>Always do reads asynchronously
+<value type="default">1</value>
+<value type="example">0<comment>Always do reads synchronously
   </comment></value>
 </samba:parameter>
index 8f42284..1d649fe 100644 (file)
@@ -18,7 +18,7 @@
   <related>aio read size</related>
 </description>
 
-<value type="default">0</value>
-<value type="example">1<comment>Always do writes asynchronously
+<value type="default">1</value>
+<value type="example">0<comment>Always do writes synchronously
     </comment></value>
 </samba:parameter>
index 73b7901..508fa5a 100644 (file)
@@ -2590,6 +2590,8 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
        lp_ctx->sDefault->force_create_mode = 0000;
        lp_ctx->sDefault->directory_mask = 0755;
        lp_ctx->sDefault->force_directory_mode = 0000;
+       lp_ctx->sDefault->aio_read_size = 1;
+       lp_ctx->sDefault->aio_write_size = 1;
 
        DEBUG(3, ("Initialising global parameters\n"));
 
index 01c022e..a34b3db 100644 (file)
@@ -238,8 +238,8 @@ static const struct loadparm_service _sDefault =
        .acl_group_control = false,
        .acl_allow_execute_always = false,
        .allocation_roundup_size = SMB_ROUNDUP_ALLOCATION_SIZE,
-       .aio_read_size = 0,
-       .aio_write_size = 0,
+       .aio_read_size = 1,
+       .aio_write_size = 1,
        .map_readonly = MAP_READONLY_YES,
        .directory_name_cache_size = 100,
        .smb_encrypt = SMB_SIGNING_DEFAULT,