You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|Accepted values:|legacy\|inotify\| poll \| system |
3
+
|Accepted values:|auto\|legacy\| poll\| inotify\| system |
4
4
|Default: | legacy |
5
5
6
-
*Description:* This option is available in version 4.9 and higher and its value controls how {{ site.product.short_name }} will follow file changes.\
7
-
The default `legacy` mode preserves the pre-4.9 version file follow-mode behavior of {{ site.product.short_name }}, which is based on the value of follow-freq().\
8
-
The `poll` value forces {{ site.product.short_name }} to poll for file changes at the interval specified by the monitor-freq() option, even if a more efficient method (such as `inotify` or `kqueue`) is available.\
9
-
If `inotify` is selected and supported by the platform, {{ site.product.short_name }} uses it to detect changes in source files. This is the most efficient and least resource-consuming option available on Linux for regular files.\
10
-
The `system` value will use system poll methods (via ivykis) like `port-timer``port``dev_poll``epoll-timerfd``epoll``kqueue``ppoll``poll` and `uring`.
6
+
*Description:* This option is available in version 4.9 and higher and its value controls how {{ site.product.short_name }} will follow file changes.
7
+
8
+
- The `auto` mode, available {{ site.product.short_name }} version 4.11 and above, automatically selects the best available method on the given platform, see The auto file follow method for more details.
9
+
- The default `legacy` mode preserves the pre-4.9 version file follow-mode behavior of {{ site.product.short_name }}, which is based on the value of follow-freq().
10
+
- The `poll` value forces {{ site.product.short_name }} to poll for file changes at the interval specified by the monitor-freq() option, even if a more efficient method (such as `inotify` or `kqueue`) is available.
11
+
- If `inotify` is selected and supported by the platform, {{ site.product.short_name }} uses it to detect changes in source files. This is the most efficient and least resource-consuming option available on Linux for regular files.
12
+
- The `system` value uses system poll methods (via ivykis), such as `port-timer`, `port`, `dev_poll`, `epoll-timerfd`, `epoll`, `kqueue`, `ppoll`, `poll`, and `uring`. This is the most efficient and least resource-consuming option available for regular files on BSD-based systems like FreeBSD and macOS, where, by default, it automatically selects `kqueue`.
11
13
12
14
**NOTE:** Using `inotify` also requires setting monitor-method() to `inotify`.
13
15
{: .notice--info}
14
16
17
+
**NOTE:** The `uring` system poll method is an experimental feature and requires a version of {{ site.product.short_name }} built with the internal ivykis version (configure options `-DIVYKIS_SOURCE=internal` for CMake and `--with-ivykis=internal` for Autotools), as the default upstream version currently has no such support.
18
+
{: .notice--info}
19
+
15
20
{% include doc/admin-guide/warnings/file-source-follow-warning.md %}
Copy file name to clipboardExpand all lines: doc/_admin-guide/060_Sources/021_Wildcard-file/001_File_following.md
+32-7Lines changed: 32 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,9 +22,9 @@ Detecting file content changes involves more factors that can affect resource us
22
22
The first method is automatically selected in pre-4.9 version of {{ site.product.short_name }} if the follow-freq() option has a value greater than 0, or in version 4.9 or higher if follow-method() `legacy` or `poll` selected. It works like the directory monitoring `poll` monitor-method() and uses an (ivykis) timer with the frequency of follow-freq(). It tries to detect changes in the file content (as well as state, file deletion, and moves) each time the timer fires.\
23
23
Similar to directory change monitoring, this process can be resource-intensive, so you should find the proper setting to balance performance, resource usage, and fault tolerance (such as avoiding log message loss).
24
24
25
-
The second method is activated in pre-4.9 versions of {{ site.product.short_name }} if the follow-freq() option is set to 0, or in version 4.9 and higher if follow-method() is set to inotifyor system.\
25
+
The second method is activated in pre-4.9 versions of {{ site.product.short_name }} if the follow-freq() option is set to 0, or in version 4.9 and higher if follow-method() is set to `inotify`, `system`or (on version 4.11 and higher) `auto`.\
26
26
If inotify is available on the system and selected in both follow-method() and monitor-method(), it will be used, resulting in significantly lower resource usage (especially on Linux). This option is accessible only on version 4.9 or later.\
27
-
Otherwise, {{ site.product.short_name }} uses ivykis polling methods, which sometimes resemble the polling method used for directory change watching described above (with its associated performance penalties), but can also operate similarly to the kqueue version (offering seamless performance).
27
+
Otherwise, {{ site.product.short_name }} uses ivykis polling methods, which sometimes resemble the polling method used for directory change watching described above (with its associated performance penalties), but can also operate similarly to the `kqueue` version (offering seamless performance).
28
28
29
29
The following table shows which method is selected in different cases.
30
30
@@ -34,7 +34,7 @@ The following table shows which method is selected in different cases.
@@ -195,8 +203,12 @@ The following table shows which method is selected in different cases.
195
203
</tr>
196
204
</table>
197
205
198
-
**NOTE:** As you can see, the best-performing option on Linux is the `inotify from ivykis directory monitor` method, which requires inotify kernel support, monitor-method() set to `inotify` or `auto` and follow-method() set to `inotify`.
199
-
{: .notice--info}
206
+
(*) - `inotify` is ignored and `system` is used instead if any of the `IV_SELECT_POLL_METHOD` or the `IV_EXCLUDE_POLL_METHOD` environment variables are set, see the notation explanation below for more details.
207
+
208
+
**NOTE:** As you can see, the best-performing option on\
209
+
\- Linux is the `inotify from ivykis directory monitor` method, which requires inotify kernel support, monitor-method() set to `inotify` or `auto` and follow-method() set to `inotify` or `auto`\
210
+
\- BSD based systems like FreeBSD and macOS is `kqueue`, which requires follow-method() set to `system` or `auto`
211
+
{: .notice--info}
200
212
201
213
A bit more detail about the notation in the platform columns and what they really mean:
202
214
@@ -206,10 +218,23 @@ The method appears in `IV_SELECT_POLL_METHOD` will be forced at startup if avail
206
218
Methods enumerated in `IV_EXCLUDE_POLL_METHOD` will be excluded from the ivykis initialization flow, and the next available (and not excluded) one will be used. The strings that can be used in `IV_EXCLUDE_POLL_METHOD` are `port-timer port dev_poll epoll-timerfd epoll kqueue ppoll poll uring` in the same order as in the table.\
207
219
e.g., on Linux you should use `IV_EXCLUDE_POLL_METHOD="epoll-timerfd epoll"` to force the usage of the `ppoll` method, as `port-timer port dev_poll` are not available, and `epoll-timerfd epoll` are not working currently. However, note that all the options marked as `works, but always signals readability` (like `ppoll`, `poll`, etc.) are far from optimal, unlike on BSD-based systems like macOS, where the default `kqueue` is a perfect option to use.
208
220
221
+
**NOTE:**`IV_SELECT_POLL_METHOD` is available only if {{ site.product.short_name }} built with the internal ivykis version (configure options `-DIVYKIS_SOURCE=internal` for CMake and `--with-ivykis=internal` for Autotools), as the default upstream version currently has no such support.
222
+
{: .notice--info}
223
+
209
224
`works` - Means it has been tested and works seamlessly (based on our tests).
210
225
211
226
`works best` - Means it has been tested and functions seamlessly, delivering the best performance on the given platform (based on our tests).
212
227
213
228
`works, but always signals readability` - Means that the method is available on the given platform, but it is primarily designed for sockets, pipes, and similar uses, not for regular files. For regular files, it is always triggered (because regular files are always readable), behaving similarly to the `poll` method of directory monitoring with all of its disadvantages. Moreover, it could lead to even higher resource consumption (mainly CPU load) because follow-freq() does not control the frequency of the triggered internal file checks, which could occur hundreds or thousands of times per second.
214
229
215
-
`does not work` - Means that the method is available on the given platform but currently does not work as expected for various reasons.
230
+
`does not work` - Means that the method is available on the given platform but currently does not work as expected for various reasons.
231
+
232
+
### The auto file follow method
233
+
234
+
From {{ site.product.short_name }} version 4.11 and higher, a new follow-method() option, `auto`, has been added. In this automatic mode, {{ site.product.short_name }} uses the following sequence to decide which method to use:
235
+
236
+
- the `inotify` method is used automatically if the system supports it (and none of the `IV_SELECT_POLL_METHOD` or `IV_EXCLUDE_POLL_METHOD` environment variables are set); otherwise
237
+
- the best available (or the `IV_SELECT_POLL_METHOD` or `IV_EXCLUDE_POLL_METHOD` forced) `system` (ivykis) poll of the platform is used; if none is available,
238
+
- the old `poll` method is used
239
+
240
+
Unfortunately, for backward compatibility reasons, the new `auto` option could not become the default for follow-method(), but for new configurations, we recommend using monitor-method("auto") and follow-method("auto") to achieve the best available performance on the given platform.
Copy file name to clipboardExpand all lines: doc/_admin-guide/060_Sources/175_syslog-otlp/000_otlp_source_options.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,7 +107,7 @@ destination {
107
107
108
108
## ebpf()
109
109
110
-
Available in syslog-ng OSE 4.2 and later versions.
110
+
Available in {{ site.product.short_name }} 4.2 and later versions.
111
111
112
112
If this option is not used, the kernel chooses the receive socket for a specific UDP randomly based on the source IP/port of the sender. It is possible to customize this algorithm using the Extended Berkeley Packet Filter (eBPF) plugin. The `ebpf()` option changes the `SO_REUSEPORT` algorithm of the kernel, to place messages randomly into one of the UDP sockets. The decision which UDP socket buffer a datagram is placed is made for every datagram, and not once for every stream. This results in the percet load-balancing of messages across the set of UDP sockets. While this resolves the imbalance between the sockets and results in perfect load balancing, the order of messages from the same sender is lost, which is the drawback of increased throughput.
0 commit comments