-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance degradation in processing rate since version 0.32 #18819
Comments
Hi @davidgcameron , Thanks for reporting this! Could you share your configuration so that we can attempt to reproduce what you are seeing? I took a quick look through the diff from v0.31.0 to v0.32.2 and the only change that jumped out was #18005. |
I think I've narrowed down the problem to regex parsing. We have a transform which parses a log string into roughly 50 fields using Here's the basic configuration with some details removed: sources/socket_haproxy.toml:
transforms/to_haproxy_log.toml (with the long version of the regex)
sinks/file_haproxy_log.toml
|
Hi @davidgcameron , thanks for helping us narrow that down. Would you be able to provide a sample input event that corresponds to that regex string? To aid in the reproduction and root causing. Thanks |
Sure, here is one example:
|
🤔 Hmm so far I have not been able to reproduce this locally. I tried both the socket source and the file source. In each case I tried v0.31.0, v0.32.0, v0.33.0 , and in all cases 500k of that example log took 22-23 seconds on an M1 Max. I'm wondering if system differences could account for it. What are you running this on? Another possibility is that this particular example event doesn't repro the behavior. Could you confirm that this line on repeat 500k times produces the behavior for you? |
This is the command I used for the socket source:
|
I re-ran the test sending that exact line and it gave the same result. I'm generating the data with a simple python script which creates the strings and sends them to the Vector socket. I'm testing on a Dell laptop (8 core i7, 16GB RAM), but we first noticed the issue when upgrading Vector on a production server and there was suddenly a huge increase in CPU consumption and some delays in our data pipeline. This server is a high-end Xeon Gold server with 96 cores and 384GB RAM. |
I wanted to note that Vector v0.32.0 includes #17874, which bumps the Now, given that, I'm not sure how to improve the performance for this particular use case. That would require further digging. cc @fuchsnj. I know you have some more experience with the regex crate. Does anything pop to mind here? |
Closing since unfortunately I don't think there is anything we can do here. This appears to be due to the regex crate bump. |
A note for the community
Problem
We use Vector to insert HAProxy logs into a ClickHouse database (kafka source to clickhouse sink). Since version 0.32 we have seen a significant performance degradation in the insert rate as well as increase in CPU consumption.
To collect some numbers we ran local tests of the same pipeline with a socket source and clickhouse sink and we see a big difference in pre-0.32 vs post-0.32 versions:
To eliminate the effect of ClickHouse we repeated the same tests with a file sink. In this case the CPU consumption was fairly constant but we see the same difference in insert time:
Configuration
No response
Version
0.32.2
Debug Output
No response
Example Data
No response
Additional Context
No response
References
No response
The text was updated successfully, but these errors were encountered: