Skip to content

Commit ebd8708

Browse files
committed
fix: tx_collector_bench - increase memory
In a previous PR, #20014, we fixed the benchmark being run as an actual benchmark instead of a test. Unfortunatelly this [still fails on CI](http://ci.aztec-labs.com/de7eb65687fb67e4), hopefully this will fix it.
1 parent 049b40b commit ebd8708

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

yarn-project/bootstrap.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ function bench_cmds {
238238
echo "$hash BENCH_OUTPUT=bench-out/native_world_state.bench.json yarn-project/scripts/run_test.sh world-state/src/native/native_bench.test.ts"
239239
echo "$hash BENCH_OUTPUT=bench-out/kv_store.bench.json yarn-project/scripts/run_test.sh kv-store/src/bench/map_bench.test.ts"
240240
echo "$hash BENCH_OUTPUT=bench-out/tx_pool.bench.json yarn-project/scripts/run_test.sh p2p/src/mem_pools/tx_pool/tx_pool_bench.test.ts"
241-
echo "$hash:ISOLATE=1:CPUS=16:MEM=8g:TIMEOUT=600 BENCH_OUTPUT=bench-out/p2p_client_proposal_tx_collector.bench.json yarn-project/scripts/run_test.sh p2p/src/client/test/tx_proposal_collector/p2p_client.proposal_tx_collector.bench.test.ts"
241+
echo "$hash:ISOLATE=1:CPUS=16:MEM=32g:TIMEOUT=600 BENCH_OUTPUT=bench-out/p2p_client_proposal_tx_collector.bench.json yarn-project/scripts/run_test.sh p2p/src/client/test/tx_proposal_collector/p2p_client.proposal_tx_collector.bench.test.ts"
242242
echo "$hash BENCH_OUTPUT=bench-out/tx.bench.json yarn-project/scripts/run_test.sh stdlib/src/tx/tx_bench.test.ts"
243243
echo "$hash:ISOLATE=1:CPUS=10:MEM=16g:LOG_LEVEL=silent BENCH_OUTPUT=bench-out/proving_broker.bench.json yarn-project/scripts/run_test.sh prover-client/src/test/proving_broker_testbench.test.ts"
244244
echo "$hash:ISOLATE=1:CPUS=16:MEM=16g BENCH_OUTPUT=bench-out/avm_bulk_test.bench.json yarn-project/scripts/run_test.sh bb-prover/src/avm_proving_tests/avm_bulk.test.ts"

yarn-project/p2p/src/client/test/tx_proposal_collector/p2p_client.proposal_tx_collector.bench.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ describe('ProposalTxCollector Benchmarks', () => {
102102
await workerManager.makeWorkerClients(PEERS_PER_RUN, {
103103
bootstrapMode: 'all',
104104
batchSize: 5,
105-
batchDelayMs: 500,
105+
batchDelayMs: 1000,
106106
});
107107
await sleep(5000);
108108
});

yarn-project/p2p/src/client/test/tx_proposal_collector/proposal_tx_collector_worker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ async function startClient(config: P2PConfig, clientIndex: number) {
104104
const worldState = createMockWorldStateSynchronizer();
105105
const l2BlockSource = new MockL2BlockSource();
106106
const proofVerifier = new AlwaysTrueCircuitVerifier();
107-
kvStore = await openTmpStore(`proposal-bench-${clientIndex}`);
107+
kvStore = await openTmpStore(`proposal-bench-${clientIndex}`, true, BENCHMARK_CONSTANTS.KV_STORE_MAP_SIZE_KB);
108108
logger = createLogger(`p2p:proposal-bench:${clientIndex}`);
109109

110110
const telemetry = getTelemetryClient();

yarn-project/p2p/src/test-helpers/testbench-utils.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,8 @@ export const BENCHMARK_CONSTANTS = {
321321
FIXED_MAX_PEERS: 10,
322322
/** Fixed max retry attempts for fair benchmarking */
323323
FIXED_MAX_RETRY_ATTEMPTS: 3,
324+
/** LMDB map size for temp stores used in benchmarks (in KB). */
325+
KV_STORE_MAP_SIZE_KB: 256 * 1024,
324326
} as const;
325327

326328
/**

yarn-project/p2p/src/testbench/p2p_client_testbench_worker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ process.on('message', async msg => {
345345
const l2BlockSource = new MockL2BlockSource();
346346

347347
const proofVerifier = new AlwaysTrueCircuitVerifier();
348-
kvStore = await openTmpStore(`test-${clientIndex}`);
348+
kvStore = await openTmpStore(`test-${clientIndex}`, true, BENCHMARK_CONSTANTS.KV_STORE_MAP_SIZE_KB);
349349
workerLogger = createLogger(`p2p:${clientIndex}`);
350350
workerTxPool.setLogger(workerLogger);
351351
const telemetry = getTelemetryClient();

0 commit comments

Comments
 (0)