Fluentd: reduce CPU and I/O consumption

Disable the additional watch timer (enable_watch_timer).
Setting this parameter to false will significantly reduce CPU and I/O
consumption when tailing a large number of files on systems with inotify
support.

Change-Id: Ib432e6cdece01dbb94b3d2f3d7fbdd04b81d25fa
This commit is contained in:
Bertrand Lallau 2017-09-07 22:19:39 +02:00
parent 8103b90325
commit 498dab2437
5 changed files with 5 additions and 0 deletions

View File

@ -51,4 +51,5 @@
time_key Timestamp time_key Timestamp
time_format %F %T.%L time_format %F %T.%L
ignore_repeated_permission_error true ignore_repeated_permission_error true
enable_watch_timer false
</source> </source>

View File

@ -8,4 +8,5 @@
format_firstline /^\d{6}/ format_firstline /^\d{6}/
format1 /^(?<time>\d{6} \d{1,2}:\d{1,2}:\d{1,2}) \[(?<severity_label>\S+)\] (?<Payload>.*)/ format1 /^(?<time>\d{6} \d{1,2}:\d{1,2}:\d{1,2}) \[(?<severity_label>\S+)\] (?<Payload>.*)/
time_format %y%m%d %k:%M:%S time_format %y%m%d %k:%M:%S
enable_watch_timer false
</source> </source>

View File

@ -8,4 +8,5 @@
format_firstline /^\s*$/ format_firstline /^\s*$/
format1 /^=(?<log_level>\w+) REPORT==== (?<Times>[^ ]+) ===\n/ format1 /^=(?<log_level>\w+) REPORT==== (?<Times>[^ ]+) ===\n/
format2 /^(?<Payload>.*)/ format2 /^(?<Payload>.*)/
enable_watch_timer false
</source> </source>

View File

@ -6,4 +6,5 @@
pos_file /var/run/{{ fluentd_dir }}/kolla-openstack-wsgi.pos pos_file /var/run/{{ fluentd_dir }}/kolla-openstack-wsgi.pos
tag kolla.* tag kolla.*
format /^(?<message>.*)$/ format /^(?<message>.*)$/
enable_watch_timer false
</source> </source>

View File

@ -7,4 +7,5 @@
format /^(?<Timestamp>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3}\+\d{4}): (?<Pid>\d+): (?<log_level>\S+) : (?<Payload>.*)?$/ format /^(?<Timestamp>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3}\+\d{4}): (?<Pid>\d+): (?<log_level>\S+) : (?<Payload>.*)?$/
time_key Timestamp time_key Timestamp
time_format %F %T.%L%z time_format %F %T.%L%z
enable_watch_timer false
</source> </source>