Skip to content

feat: Increase default batch size bytes and timeout#13324

Merged
kodiakhq[bot] merged 3 commits intocloudquery:mainfrom
erezrokah:feat/increase_default_batch_size
Aug 28, 2023
Merged

feat: Increase default batch size bytes and timeout#13324
kodiakhq[bot] merged 3 commits intocloudquery:mainfrom
erezrokah:feat/increase_default_batch_size

Conversation

@erezrokah
Copy link
Copy Markdown
Member

@erezrokah erezrokah commented Aug 25, 2023

Summary

Extracted from #13318.

BEGIN_COMMIT_OVERRIDE
feat: Increase default batch size bytes to 100000000 (100 MB) and default batch timeout to 60 seconds.
BREAKING-CHANGE: Increase default batch size bytes to 100000000 (100 MB) and default batch timeout to 60 seconds. We discovered a default higher batch size bytes and timeout settings provide better out of the box performance for the PostgreSQL destination. We're marking it as a breaking change as it might increase memory consumption in some environments.

END_COMMIT_OVERRIDE

@erezrokah erezrokah requested a review from yevgenypats as a code owner August 25, 2023 09:43
@erezrokah erezrokah requested a review from candiduslynx August 25, 2023 09:43
kodiakhq bot pushed a commit that referenced this pull request Aug 25, 2023

#### Summary

Extracted from #13318. Witnessed the bottleneck using `pprof`.
With default batch settings I'm getting `2m29s` sync time instead of ~`11m`,
With `batch_size_bytes: 100000000` and `batch_timeout: 60s` I'm getting `1m40s`. (Fixed in #13324)

Used spec:

```yaml
kind: source
spec:
  name: aws
  path: "cloudquery/aws"
  version: "v19.0.0"
  tables:
    - "*"
  skip_tables:
    - "aws_cloudtrail_*"
    - "aws_iam_*"
    - "aws_servicequotas_*"
  destinations:
    - postgresql
---
kind: destination
spec:
  name: "postgresql"
  registry: "grpc"
  path: localhost:8888
  # path: cloudquery/postgresql
  # version "v5.0.5"
  spec:
    connection_string: "postgresql://postgres:pass@localhost:5432/postgres?sslmode=disable"
    # batch_size_bytes: 100000000
    # batch_timeout: "60s"
```


<!--
@erezrokah
Copy link
Copy Markdown
Member Author

I'll hold off merging this until next week so we can release #13323 and #13327 in a non breaking change

@erezrokah erezrokah added the automerge Automatically merge once required checks pass label Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Automatically merge once required checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants