Skip to content

Commit d9178f1

Browse files
⚡ Increase PGlite pool size to 24 for maximum parallel execution
- Change default pool size from 3 to 24 instances - Update documentation with new default and memory usage - Enables testing up to 24 testcases concurrently - Memory usage: ~6GB (24 × 256MB per instance) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent fd351f8 commit d9178f1

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

frontend/internal-packages/agent/src/tools/runTestTool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ async function executeDmlOperationsByTestcase(
3636
testcaseCount: testcases.length,
3737
})
3838

39-
const poolSize = Number(process.env['PGLITE_POOL_SIZE'] || '3')
39+
const poolSize = Number(process.env['PGLITE_POOL_SIZE'] || '24')
4040
console.info(
4141
`[runTestTool] Starting parallel execution with ${poolSize}-instance pool`,
4242
)

frontend/internal-packages/pglite-server/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ Internal package for executing SQL queries using PGlite (PostgreSQL in WebAssemb
66

77
### Environment Variables
88

9-
- `PGLITE_POOL_SIZE`: Number of PGlite instances in the pool (default: 3)
9+
- `PGLITE_POOL_SIZE`: Number of PGlite instances in the pool (default: 24)
1010
- Set to 3 for CI/test environments (faster initialization)
11-
- Set to 8 for production (better parallelism)
11+
- Set to 8-24 for production (better parallelism)
1212
- Example: `PGLITE_POOL_SIZE=8 pnpm dev`
1313

1414
## Features
@@ -22,4 +22,5 @@ Internal package for executing SQL queries using PGlite (PostgreSQL in WebAssemb
2222

2323
Each PGlite instance uses approximately 256MB of memory. Plan accordingly:
2424
- 3 instances: ~768MB base memory
25-
- 8 instances: ~2GB base memory
25+
- 8 instances: ~2GB base memory
26+
- 24 instances: ~6GB base memory (default)

frontend/internal-packages/pglite-server/src/PGliteInstanceManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ export class PGliteInstanceManager {
1313
private static supportedExtensionsPool: string[][] = []
1414
private static loadedExtensionsPool: string[][] = []
1515
private static currentIndex = 0
16-
// Pool size configurable via environment variable (default: 3 for CI, 8 for production)
16+
// Pool size configurable via environment variable (default: 24 for maximum parallelism)
1717
private static readonly POOL_SIZE = Number(
18-
process.env['PGLITE_POOL_SIZE'] || '3',
18+
process.env['PGLITE_POOL_SIZE'] || '24',
1919
)
2020

2121
/**

0 commit comments

Comments
 (0)