Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign uptelegraf logparser too slow #3539
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Can you try setting the interval and flush_interval to "10s"? |
danielnelson
added
the
need more info
label
Dec 6, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
kingluo
Dec 6, 2017
I change the interval and flush_interval to "1s" (10s is slower).
And I found I set a wrong option:
from_beginning = true
It should be false.
But the collection is still slow, at least 3 mins.
kingluo
commented
Dec 6, 2017
|
I change the interval and flush_interval to "1s" (10s is slower). And I found I set a wrong option:
It should be But the collection is still slow, at least 3 mins. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
danielnelson
Dec 6, 2017
Contributor
Please try with 10s, this will introduce more latency but may help with throughput. 3 mins is not too long, does it fall further behind the longer it runs?
|
Please try with 10s, this will introduce more latency but may help with throughput. 3 mins is not too long, does it fall further behind the longer it runs? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
kingluo
Dec 6, 2017
Please try with 10s, this will introduce more latency but may help with throughput. 3 mins is not too long,
I tried, but it's slower!
does it fall further behind the longer it runs?
yes.
kingluo
commented
Dec 6, 2017
I tried, but it's slower!
yes. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
danielnelson
Dec 6, 2017
Contributor
Can you try replacing the kafka output with a file output and check if logparser still falls behind?
|
Can you try replacing the |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
kingluo
commented
Dec 7, 2017
|
Of course, I tried |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
How many logfile lines are generated per minute? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
kingluo
Dec 8, 2017
About 2000 lines per sec.
FYI, I try filebeat, and no delay there, although as known, filebeat is only a log shipper without grok scan.
But (near-)real-time is important for log collection. I could do grok or regexp scan at the backend.
Does anyone do some benchmark on telegraf with similar config to my case?
kingluo
commented
Dec 8, 2017
•
|
About 2000 lines per sec. FYI, I try filebeat, and no delay there, although as known, filebeat is only a log shipper without grok scan. Does anyone do some benchmark on telegraf with similar config to my case? |
danielnelson
added
performance
area/logparser
and removed
need more info
labels
Dec 11, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
agnivade
Dec 19, 2017
Contributor
@kingluo - It looks like you are using a custom pattern. Can you post a few examples of your log line ? I would like to give this a shot.
|
@kingluo - It looks like you are using a custom pattern. Can you post a few examples of your log line ? I would like to give this a shot. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jberry-suse
Jun 6, 2018
Can confirm, only able to parse at max 1000 entries per second. Easy to reproduce just create/copy apache access log with 100,000 entries and watch how slow it is parsed. With even a single threaded from scratch regex parsing I can achieve at least a million entries per second.
No need for custom log format, use standard format. Based on CPU usage one core is utilized and does not seem to be running at 100% almost as if telelgraf is throttling itself.
jberry-suse
commented
Jun 6, 2018
|
Can confirm, only able to parse at max 1000 entries per second. Easy to reproduce just create/copy apache access log with 100,000 entries and watch how slow it is parsed. With even a single threaded from scratch regex parsing I can achieve at least a million entries per second. No need for custom log format, use standard format. Based on CPU usage one core is utilized and does not seem to be running at 100% almost as if telelgraf is throttling itself. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jberry-suse
commented
Jun 20, 2018
|
I ended up writing a simple tool which achieves ~500,000/s per core. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
russorat
commented
Jul 16, 2018
|
kingluo commentedDec 5, 2017
Bug report
I use telegraf to collect nginx logs to kafka. But it's too slow, the kafka hosts are in the same data center with the telegraf host, but it has one to two hours delay according to the log timestamp!
Relevant telegraf.conf:
System info:
telegraf 1.4.5, centos 6.5