-
Notifications
You must be signed in to change notification settings - Fork 501
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: Add performance tuning section (#4639)
I started this PR mainly as a way to document the new wildcard options, but ultimately updated a few things relating to the CloudQuery docs: - added brief notes about wildcards to the source plugin reference sections for `tables` and `skip_tables` - placed detailed information about wildcards in a `Performance tuning` page under `Advanced Topics`. The idea is that we will expand this page over time. - updated the docs relating to `concurrency` (`resource_concurrency` and `table_concurrency` were deprecated) - some other misc fixes
- Loading branch information
1 parent
75162dd
commit b90ff96
Showing
9 changed files
with
75 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
{ | ||
"environment-variable-substitution": "Environment Variable Substitution", | ||
"running-cloudquery-in-parallel": "Running CloudQuery in Parallel", | ||
"proxy-configuration": "Proxy Configuration", | ||
"docker": "Docker", | ||
"security": "Security", | ||
"rate-limiting": "Rate Limiting" | ||
"proxy-configuration": "Proxy Configuration", | ||
"performance-tuning": "Performance Tuning", | ||
"rate-limiting": "Rate Limiting", | ||
"running-cloudquery-in-parallel": "Running CloudQuery in Parallel", | ||
"security": "Security" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
title: Performance Tuning | ||
--- | ||
|
||
# Performance Tuning | ||
|
||
This page contains a number of tips and tricks for improving the performance of `cloudquery sync` for large cloud estates. | ||
|
||
## Wildcard Matching | ||
|
||
import { Callout } from 'nextra-theme-docs' | ||
|
||
Sometimes the easiest way to improve the performance of the `sync` command is to limit the number of tables that get synced. The `tables` and `skip_tables` source config options both support wildcard matching. This means that you can use `*` anywhere in a name to match multiple tables. | ||
|
||
For example, when using the `aws` source plugin, it is possible to use a wildcard pattern to match all tables related to AWS EC2: | ||
|
||
```yaml | ||
tables: | ||
- aws_ec2_* | ||
``` | ||
|
||
This can also be combined with `skip_tables`. For example, let's say we want to include all EC2 tables, but not EBS-related ones: | ||
|
||
```yaml | ||
tables: | ||
- "aws_ec2_*" | ||
skip_tables: | ||
- "aws_ec2_ebs_*" | ||
``` | ||
|
||
<Callout> | ||
|
||
The CloudQuery CLI will warn if a wildcard pattern does not match any known tables. | ||
|
||
</Callout> | ||
|
||
## Improving Performance by Skipping Relations | ||
|
||
Some tables require many API calls to sync. This is especially true of tables that depend on other tables, because often multiple API calls need to be made for every row in the parent table. This can lead to thousands of API calls, increasing the time it takes to sync. If you know that some child tables are not strictly necessary, you can improve sync performance by skipping them with the `skip_tables` setting. | ||
|
||
Let's say we have three tables: `A`, `B` and `C`. `A` is the top-level table. `B` depends on it, and `C` depends on `B`: | ||
|
||
```text | ||
A | ||
↳ B | ||
↳ C | ||
``` | ||
|
||
We might want table `A`, but not need the information in table `B`. We can then write our source config as: | ||
|
||
```yaml | ||
tables: | ||
- A | ||
skip_tables: | ||
- B | ||
``` | ||
|
||
By skipping table `B`, we are automatically skipping its dependant table `C` as well. Likewise, by including table `A`, we are automatically including its dependant tables `B` and `C` as well, unless they are explicitly skipped in the `skip_tables` section (like in the example above). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
title: Linux | ||
title: Quickstart - Linux | ||
--- | ||
|
||
import Intro from '../../../components/mdx/_intro.mdx' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
title: macOS | ||
title: Quickstart - macOS | ||
--- | ||
|
||
import Intro from '../../../components/mdx/_intro.mdx' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
title: Windows | ||
title: Quickstart - Windows | ||
--- | ||
|
||
import Intro from '../../../components/mdx/_intro.mdx' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"cloudquery": "cloudquery", | ||
"cloudquery_sync": "cloudquery sync" | ||
"cloudquery_sync": "cloudquery sync", | ||
"cloudquery_migrate": "cloudquery migrate" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters