summaryrefslogtreecommitdiff
path: root/docs/docbook/smbdotconf/tuning/writecachesize.xml
blob: 8b5fbe66bda53dff587aed99c6067ffb939007fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<samba:parameter name="write cache size"
                 context="S"
                 xmlns:samba="http://samba.org/common">
<listitem>
    <para>If this integer parameter is set to non-zero value,
    Samba will create an in-memory cache for each oplocked file 
    (it does <emphasis>not</emphasis> do this for 
    non-oplocked files). All writes that the client does not request 
    to be flushed directly to disk will be stored in this cache if possible. 
    The cache is flushed onto disk when a write comes in whose offset 
    would not fit into the cache or when the file is closed by the client. 
    Reads for the file are also served from this cache if the data is stored 
    within it.</para>

    <para>This cache allows Samba to batch client writes into a more 
    efficient write size for RAID disks (i.e. writes may be tuned to 
    be the RAID stripe size) and can improve performance on systems 
    where the disk subsystem is a bottleneck but there is free 
    memory for userspace programs.</para>

    <para>The integer parameter specifies the size of this cache 
    (per oplocked file) in bytes.</para>

    <para>Default: <command moreinfo="none">write cache size = 0</command></para>

    <para>Example: <command moreinfo="none">write cache size = 262144</command></para>

    <para>for a 256k cache size per file.</para>
</listitem>
</samba:parameter>