Bug 1489976
| Summary: | logging-fluentd unable to process more than 1000 messages per second | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Walid A. <wabouham> |
| Component: | Logging | Assignee: | Rich Megginson <rmeggins> |
| Status: | CLOSED ERRATA | QA Contact: | Walid A. <wabouham> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 3.6.1 | CC: | aos-bugs, jcantril, mifiedle, pportant, rmeggins, wabouham |
| Target Milestone: | --- | ||
| Target Release: | 3.6.z | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | aos-scalability-37 | ||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Cause: The fluentd processing pipeline to format journald records (system and container logs) into the viaq data model format was using dozens of embedded ruby evaluations per record.
Consequence: The record processing was very slow, with excessive CPU usage.
Fix: The processing and formatting was moved into dedicated ruby code in the viaq filter plugin.
Result: The record processing is much faster, with less CPU usage.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-10-25 13:06:40 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Walid A.
2017-09-08 21:04:59 UTC
We have a few changes in the 3.6.2 candidate images which should greatly reduce the fluentd cpu usage. primarily: https://github.com/openshift/origin-aggregated-logging/commit/8f9434cca3c9a71fde7f89270699dd050009ae79 which is this code: https://github.com/ViaQ/fluent-plugin-viaq_data_model/tree/master/lib/fluent/plugin koji_builds: https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=596094 repositories: brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/openshift3/logging-fluentd:rhaos-3.6-rhel-7-docker-candidate-57008-20170908214752 brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/openshift3/logging-fluentd:latest brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/openshift3/logging-fluentd:v3.6 brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/openshift3/logging-fluentd:v3.6.173.0.31 brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/openshift3/logging-fluentd:v3.6.173.0.31-3 Update: redeployed the logging stack with v3.6.173.0.32, and seeing a marked improvement in sustainable logging rates from a single pod, almost double, around 750 messages per second with the same journald (storage persistent, RateLimitIntervalSec=0) and fluend ds configuration as before (limits 1 core, 1Gi Mem, 16mb BUFFER_SIZE_LIMIT). Fluend CPU utilization went down from a full core to 68% of a core while systemd-jounrald CPU util remained at a full core when pod was logging at 750 messages per sec. pbench data is added in next private comment I'm not sure if there is any additional journald tuning that can be done, but we should investigate that. If you want to measure the raw, raw fluentd performance reading from the journal, then you could disable fluentd and let a large journal accumulate. - unlabel nodes - wait for fluentd pods to stop - remove /var/log/journal.pos on each node - set JOURNAL_READ_FROM_HEAD=true in ds/logging-fluentd - wait for journald records to accumulate - label nodes - wait for fluentd pods to start Then you can see how long it takes fluentd to get to the tail of the journal If you want to measure the raw fluentd performance in a very, very controlled environment, controlling exactly the contents of the journal, then you can create your own journal file, something like this: https://github.com/richm/origin-aggregated-logging/blob/new-perf-test/test/performance/fluentd-to-es.sh#L329 That is, create a text file in journalctl -o export format, then feed that into /usr/lib/systemd/systemd-journal-remote to create a binary journald file, then mount that journal into the fluentd pod using a hostPath: oc set volume daemonset/logging-fluentd --add -t hostPath --name testjournal -m /journal --path $datadir then tell fluentd to use that journal: oc set env daemonset/logging-fluentd JOURNAL_SOURCE=/journal/journal JOURNAL_READ_FROM_HEAD=true fixed in fluentd image 3.6.173.0.32 Setting to verified, as stated in comment 4, with fluentd image 3.6.173.0.32 we were able to sustain 750 log messages per sec (1024 bytes message size) logging from a single pod per node/fluentd. Details and pbench data are captured in google doc, please see next private comment. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:3049 |