summaryrefslogtreecommitdiffstats
path: root/upstream/archlinux/man8/vfs_preopen.8
blob: 111d58b605d0c12a6c8af770bed10dc0052c565a (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
'\" t
.\"     Title: vfs_preopen
.\"    Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: 05/09/2024
.\"    Manual: System Administration tools
.\"    Source: Samba 4.20.1
.\"  Language: English
.\"
.TH "VFS_PREOPEN" "8" "05/09/2024" "Samba 4\&.20\&.1" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
vfs_preopen \- Hide read latencies for applications reading numbered files
.SH "SYNOPSIS"
.HP \w'\ 'u
vfs objects = preopen
.SH "DESCRIPTION"
.PP
This VFS module is part of the
\fBsamba\fR(7)
suite\&.
.PP
This module assists applications that want to read numbered files in sequence with very strict latency requirements\&. One area where this happens in video streaming applications that want to read one file per frame\&.
.PP
When you use this module, a number of helper processes is started that speculatively open files and read a number of bytes to prime the file system cache, so that later on when the real application\*(Aqs request comes along, no disk access is necessary\&.
.PP
This module is stackable\&.
.SH "OPTIONS"
.PP
preopen:posix\-basic\-regex = BOOL (default: no)
.RS 4
preopen:posix\-basic\-regex = yes
changes the meaning of the
preopen:names
option\&. Further details are described there\&.
.RE
.PP
preopen:names = /pattern1/pattern2/
.RS 4
preopen:names specifies the file name pattern(s) which should trigger the preopen helpers to do their work\&. We assume that the files are numbered incrementally\&. So if your file names are numbered FRAME00000\&.frm FRAME00001\&.frm and so on you would list them as
preopen:names=/FRAME*\&.frm/\&. The default algorithm uses the first (at least 3) digits it finds in order to calculate the name of the next frames\&.
.sp
preopen:posix\-basic\-regex = yes
changes the meaning of the
preopen:names
option\&. It means \*(AqPOSIX Basic Regular Expression\*(Aq strings are used as patterns\&. The key is each pattern requires exactly one \*(Aqsubexpression\*(Aq starting with \*(Aq\e(\*(Aq and ending with \*(Aq\e)\*(Aq in order to specify the position of the digits representing the incrementing frame numbers\&. Given a file names like Movie7599Frame0v1234\&.txt, Movie7599Frame1v1234\&.txt, Movie7599Frame2v1234\&.txt up to Movie7599Frame9v1234\&.txt you can use
preopen:names = /\&.*Frame\e([0\-9]\e)\&.*\e\&.txt/
in order to match just a single digits, this might not be a real world example, but it shows the flexibility that is possible here\&.
.RE
.PP
preopen:num_bytes = BYTES
.RS 4
Specifies the number of bytes the helpers should speculatively read, defaults to 1\&.
.RE
.PP
preopen:helpers = NUM\-PROCS
.RS 4
Number of forked helper processes, defaults to 1\&.
.RE
.PP
preopen:queuelen = NUM\-FILES
.RS 4
Number of files that should be speculatively opened\&. Defaults to the 10 subsequent files\&.
.RE
.PP
preopen:nomatch_log_level = LOGLEVEL
.RS 4
In order to debug or audit the usage of the preopen logic you can use this option to specify at what log level details about filenames not matching any pattern from \*(Aqpreopen:names\*(Aq are logged\&.
.sp
Defaults to the log level 5\&. See also
\fBsmb.conf\fR(5)
in the \*(Aq\m[blue]\fBlog level\fR\m[]\*(Aq section for special handling of the \*(Aqpreopen\*(Aq debug class\&.
.RE
.PP
preopen:match_log_level = LOGLEVEL
.RS 4
In order to debug or audit the usage of the preopen logic you can use this option to specify at what log level details about filenames actually matching a pattern from \*(Aqpreopen:names\*(Aq are logged\&.
.sp
See also \*(Aqpreopen:founddigits_log_level\*(Aq and \*(Aqpreopen:push_log_level\*(Aq\&.
.sp
Defaults to the log level 5\&. See also
\fBsmb.conf\fR(5)
in the \*(Aq\m[blue]\fBlog level\fR\m[]\*(Aq section for special handling of the \*(Aqpreopen\*(Aq debug class\&.
.RE
.PP
preopen:nodigits_log_level = LOGLEVEL
.RS 4
In order to debug or audit problems with the preopen configuration you can use this option to specify at what log level details about filenames actually matching a pattern from \*(Aqpreopen:names\*(Aq, but at the same time don\*(Aqt contain the expected digits, are logged\&. This is typically something the administrator wants to notice and adjust the configuration in order to define more precisely where to find the digits in the filename\&.
.sp
Defaults to the log level 1\&. See also
\fBsmb.conf\fR(5)
in the \*(Aq\m[blue]\fBlog level\fR\m[]\*(Aq section for special handling of the \*(Aqpreopen\*(Aq debug class\&.
.RE
.PP
preopen:founddigits_log_level = LOGLEVEL
.RS 4
In order to debug or audit the usage of the preopen logic you can use this option to specify at what log level details about filenames actually matching a pattern from \*(Aqpreopen:names\*(Aq, and at the same time having valid expected digits, are logged\&. This means enough information is available in order to queue preopens\&.
.sp
Defaults to the log level 3\&. See also
\fBsmb.conf\fR(5)
in the \*(Aq\m[blue]\fBlog level\fR\m[]\*(Aq section for special handling of the \*(Aqpreopen\*(Aq debug class\&.
.RE
.PP
preopen:reset_log_level = LOGLEVEL
.RS 4
If a matching filename belongs to a different pattern from \*(Aqpreopen:names\*(Aq, a different parent directory or differs in a significant way from the last filename that was found before, the module needs to reset it\*(Aqs internal queue state\&. This means that no more preopens will be pushed to helper processes belonging to the former queue state\&. In order to debug or audit such queue resets you can use this option to specify at what log level details are logged\&.
.sp
Defaults to the log level 5\&. See also
\fBsmb.conf\fR(5)
in the \*(Aq\m[blue]\fBlog level\fR\m[]\*(Aq section for special handling of the \*(Aqpreopen\*(Aq debug class\&.
.RE
.PP
preopen:push_log_level = LOGLEVEL
.RS 4
In order to debug or audit the usage of the preopen logic you can use this option to specify at what log level details about filenames actually pushed to preopen helper processes are logged\&. This means they will actually be preopened soon\&.
.sp
Defaults to the log level 3\&. See also
\fBsmb.conf\fR(5)
in the \*(Aq\m[blue]\fBlog level\fR\m[]\*(Aq section for special handling of the \*(Aqpreopen\*(Aq debug class\&.
.RE
.PP
preopen:queue_log_level = LOGLEVEL
.RS 4
In order to debug details about internal queue processing you can use this option to specify at what log level the details are logged\&.
.sp
Defaults to the log level 10\&. See also
\fBsmb.conf\fR(5)
in the \*(Aq\m[blue]\fBlog level\fR\m[]\*(Aq section for special handling of the \*(Aqpreopen\*(Aq debug class\&.
.RE
.SH "VERSION"
.PP
This man page is part of version 4\&.20\&.1 of the Samba suite\&.
.SH "AUTHOR"
.PP
The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&.
.PP
The PREOPEN VFS module was created with contributions from Volker Lendecke and the developers at IBM\&.