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

Investigate performance of anonymous usage statistics requests #2008

Closed
sairam opened this issue Dec 16, 2019 · 7 comments
Closed

Investigate performance of anonymous usage statistics requests #2008

sairam opened this issue Dec 16, 2019 · 7 comments
Labels
bug Something isn't working

Comments

@sairam
Copy link

sairam commented Dec 16, 2019

Describe the bug

Telemetry data is being sent to fishtownanalytics.sinter-collect.com on dbt run. The speed of dbt run improved to 17 sec from 111sec (~2min) for about when the domain was blackholed (pointing to 127.0.0.1)

Expected behavior

When disabled telemetry:

Finished running 100 view models, 2 table models in 16.80s.

When enabled telemetry:

Finished running 100 view models, 2 table models in 111.62s.

Each request to the telemetry server is taking about 1second. For 100 view models, its adding additional 100 seconds or 1 second per run.

The output of dbt --version:

installed version: 0.15.0
   latest version: 0.15.0

Up to date!

Is there a way to disable telemetry via commandline or via env variable?

@sairam sairam added bug Something isn't working triage labels Dec 16, 2019
@drewbanin drewbanin removed bug Something isn't working triage labels Dec 16, 2019
@drewbanin
Copy link
Contributor

hey @sairam - check out the docs for disabling anonymous usage statistics here: https://docs.getdbt.com/docs/configure-your-profile#section-usage-statistics

I'm surprised to see this is ballooning your dbt runtime - we coded this such that a single failed event request would prevent future requests from being made. Let me take a deeper look here - the behavior you're seeing is not right.

@sairam
Copy link
Author

sairam commented Dec 16, 2019

Thanks for the link, I initially searched for telemetry and analytics, but could not find the right config.

config:
  send_anonymous_usage_stats: False

@drewbanin , feel free to close this issue.

@sairam
Copy link
Author

sairam commented Dec 16, 2019

I wanted to share that this was run with 1 thread.

Looks like a request to a remote server is happening after each view/action is done which explains close to 100second delay. Changing the location to edge endpoint may help instead of us-east-1.

@drewbanin drewbanin added the bug Something isn't working label Dec 17, 2019
@drewbanin drewbanin added this to the Barbara Gittings milestone Dec 17, 2019
@drewbanin drewbanin changed the title How to disable telemetry? Investigate performance of anonymous usage statistics Dec 17, 2019
@drewbanin drewbanin changed the title Investigate performance of anonymous usage statistics Investigate performance of anonymous usage statistics requests Dec 17, 2019
@drewbanin
Copy link
Contributor

Ok - that's not right - 1 second is far, far too long for these individual requests. I'll leave this issue open to investigate adding edge endpoints, batching the requests, or making the requests async. They actually used to be async but we had issues with the thread not being cleaned up and it causing dbt to hang. Thanks again for bringing this one to our attention.

@sairam
Copy link
Author

sairam commented Dec 17, 2019

would it possible to have a dedicated thread just for sending out the analytics?

@drewbanin
Copy link
Contributor

Yep, that's totally possible. Alternatively, we could try batching these events and sending more of them at once. The payloads are pretty tiny (timestamps, the command that was run, etc) - the really slow thing here is just the round-trip to us-east-1 I think.

@beckjake
Copy link
Contributor

beckjake commented Feb 4, 2020

Fixed in #2089

@beckjake beckjake closed this as completed Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants