Skip to content
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

[inputs.sqlserver] ServerProperties expensive - can it safely be excluded? #5132

Closed
leepfrog-ger opened this issue Dec 11, 2018 · 9 comments
Closed
Labels
area/sqlserver performance problems with decreased performance or enhancements that improve performance
Milestone

Comments

@leepfrog-ger
Copy link

I've started to test with the sqlserver inputs plugin. It seems to work nicely but I was concerned about the possible performance impact on the SQL server that is being monitored.

Therefore I took a look at the SQL profiler to see how long the queries generated by the plugin actually take. It was immediatly obvious that the sqlServerPropertiesV2 query was the most "expensive" one in terms of execution duration. It took between 500 and 2000ms to complete, even though it just returns a dozen of fields (which would not be relevant for my use case given the "cost").

I am however not sure if other data or processes within the plugin depend on it as it is not listed in the list of metric queries that can be excluded. I've tried to exclude it on a test system by using exclude_query = [ 'ServerProperties' ] and this seems to work fine (as in: data is still coming in), I am however not sure if it could cause trouble down the line?

@m82labs tagging you because I've seen you've done a lot of work in that plugin (thanks for that!)

Thanks!

@m82labs
Copy link
Contributor

m82labs commented Dec 11, 2018 via email

@m82labs
Copy link
Contributor

m82labs commented Dec 11, 2018

I have a local copy running with some changes to help this. I am letting it run for a bit and then I should be able to put in a PR.

@m82labs m82labs mentioned this issue Dec 11, 2018
3 tasks
@leepfrog
Copy link

@leepfrog-ger :)

@m82labs
Copy link
Contributor

m82labs commented Dec 11, 2018

(ノಠ益ಠ)ノ彡┻━┻

@leepfrog-ger
Copy link
Author

@leepfrog whaaaat!

@m82labs wow that was fast. I do not have a go build environment but I'll try the nightly once this is merged.
For now are you aware of any compliations when the ServerProperties module is disabled with the exclude_query = [ 'ServerProperties' ] configuration (apart from the server properties metrics missing)?

@danielnelson
Copy link
Contributor

Closed by #5135

@danielnelson danielnelson added this to the 1.9.2 milestone Dec 13, 2018
@danielnelson danielnelson added performance problems with decreased performance or enhancements that improve performance area/sqlserver labels Dec 13, 2018
@m82labs
Copy link
Contributor

m82labs commented Dec 13, 2018

@leepfrog-ger no complications, as you said, you just won't get that data.

@leepfrog-ger
Copy link
Author

Just tested with the most recent nightly build. The values have greatly improved, even on a server that is being hammered the average duration is in the ballpak of 120ms.

Thanks again for the patch and the great input module

@m82labs
Copy link
Contributor

m82labs commented Dec 20, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sqlserver performance problems with decreased performance or enhancements that improve performance
Projects
None yet
Development

No branches or pull requests

4 participants