Skip to content

Commit 3d3e7d7

Browse files
DavidS-ovmactions-user
authored andcommitted
Increase the default source parallelism (#2875)
we expect most source interactions to be waiting on external services, so adding more parallelism can help. and we do not explicitly configure MAX_PARALLEL anywhere, so all sources have been running on this default GitOrigin-RevId: 4af1a8f8015cacce0fdc131a3b9b2d4e76a408e8
1 parent d8fcb28 commit 3d3e7d7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

discovery/cmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ func EngineConfigFromViper(engineType, version string) (*EngineConfig, error) {
175175

176176
maxParallelExecutions := viper.GetInt("max-parallel")
177177
if maxParallelExecutions == 0 {
178-
maxParallelExecutions = runtime.NumCPU()
178+
maxParallelExecutions = runtime.NumCPU() * 100 // we expect most source interactions to be waiting on external services, so adding more parallelism can help
179179
}
180180

181181
return &EngineConfig{

discovery/cmd_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func TestEngineConfigFromViper(t *testing.T) {
4949
expectedApiServerURL: "https://api.app.overmind.tech",
5050
expectedNATSUrl: "wss://messages.app.overmind.tech",
5151
expectedApiKey: "api-key",
52-
expectedMaxParallel: runtime.NumCPU(),
52+
expectedMaxParallel: runtime.NumCPU() * 100,
5353
expectError: false,
5454
},
5555
{
@@ -185,7 +185,7 @@ func TestEngineConfigFromViper(t *testing.T) {
185185
engineType: "test-engine",
186186
version: "1.0",
187187
expectError: false,
188-
expectedMaxParallel: runtime.NumCPU(),
188+
expectedMaxParallel: runtime.NumCPU() * 100,
189189
expectedSourceName: "custom-source",
190190
expectedApp: "https://app.overmind.tech",
191191
expectedApiServerURL: "https://api.app.overmind.tech",

0 commit comments

Comments
 (0)