Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: start trace exporter only if required #8147

Merged
merged 3 commits into from
Aug 23, 2024
Merged

Conversation

alexghr
Copy link
Contributor

@alexghr alexghr commented Aug 22, 2024

This PR splits the collector URL into _METRICS_ENDPOINT and _TRACES_ENDPOINT and makes exporting traces optional (if no processor is registered then the default processor is a no-op)

See https://www.npmjs.com/package/@opentelemetry/exporter-trace-otlp-http#user-content-configuration-options-as-environment-variables

@AztecBot
Copy link
Collaborator

AztecBot commented Aug 22, 2024

Benchmark results

Metrics with a significant change:

  • protocol_circuit_simulation_time_in_ms (private-kernel-tail-to-public): 664 (-50%)
  • avm_simulation_time_ms (Token:transfer_public): 19.5 (-40%)
Detailed results

All benchmarks are run on txs on the Benchmarking contract on the repository. Each tx consists of a batch call to create_note and increment_balance, which guarantees that each tx has a private call, a nested private call, a public call, and a nested public call, as well as an emitted private note, an unencrypted log, and public storage read and write.

This benchmark source data is available in JSON format on S3 here.

Proof generation

Each column represents the number of threads used in proof generation.

Metric 1 threads 4 threads 16 threads 32 threads 64 threads
proof_construction_time_sha256_ms 5,752 1,565 716 (+1%) 770 (-1%) 777
proof_construction_time_sha256_30_ms 11,507 3,083 1,378 (-1%) 1,415 (-1%) 1,457
proof_construction_time_sha256_100_ms 44,428 (+1%) 11,907 (+1%) 5,555 (+2%) 5,539 (+1%) 5,757
proof_construction_time_poseidon_hash_ms 78.0 34.0 34.0 59.0 (+2%) 88.0 (-1%)
proof_construction_time_poseidon_hash_30_ms 1,528 424 202 226 (+3%) 274 (+3%)
proof_construction_time_poseidon_hash_100_ms 5,640 1,509 677 (+1%) 730 (-1%) 750

L2 block published to L1

Each column represents the number of txs on an L2 block published to L1.

Metric 4 txs 8 txs 16 txs
l1_rollup_calldata_size_in_bytes 4,356 7,876 14,884
l1_rollup_calldata_gas 50,160 93,014 178,156
l1_rollup_execution_gas 1,396,411 2,130,161 3,915,359
l2_block_processing_time_in_ms 252 (+3%) 450 (+1%) 823 (+3%)
l2_block_building_time_in_ms 8,976 17,465 34,852
l2_block_rollup_simulation_time_in_ms 8,976 17,464 34,851
l2_block_public_tx_process_time_in_ms 7,580 (+1%) 15,961 33,307

L2 chain processing

Each column represents the number of blocks on the L2 chain where each block has 8 txs.

Metric 3 blocks 5 blocks
node_history_sync_time_in_ms 2,951 (+4%) 3,859
node_database_size_in_bytes 12,603,472 16,715,856
pxe_database_size_in_bytes 16,254 26,813

Circuits stats

Stats on running time and I/O sizes collected for every kernel circuit run across all benchmarks.

Circuit simulation_time_in_ms witness_generation_time_in_ms input_size_in_bytes output_size_in_bytes proving_time_in_ms
private-kernel-init 91.0 (+3%) 406 (+2%) 21,755 44,860 N/A
private-kernel-inner 170 (+2%) 717 (+2%) 72,566 45,007 N/A
private-kernel-reset-tiny 459 879 (-2%) 65,675 44,846 N/A
private-kernel-tail 195 (-1%) 159 (+1%) 50,686 52,257 N/A
base-parity 5.58 (-1%) N/A 160 96.0 N/A
root-parity 35.6 (+1%) N/A 73,948 96.0 N/A
base-rollup 2,746 N/A 189,136 664 N/A
block-root-rollup 41.5 N/A 58,205 2,448 N/A
public-kernel-setup 83.8 N/A 105,085 71,222 N/A
public-kernel-app-logic 95.0 N/A 104,911 71,222 N/A
public-kernel-tail 555 N/A 410,534 16,414 N/A
private-kernel-reset-small 465 (+3%) N/A 66,341 45,629 N/A
private-kernel-tail-to-public ⚠️ 664 (-50%) 659 (-6%) 460,796 1,825 N/A
public-kernel-teardown 82.9 (+1%) N/A 105,349 71,222 N/A
merge-rollup 19.9 (-2%) N/A 38,174 664 N/A
undefined N/A N/A N/A N/A 77,846 (-1%)

Stats on running time collected for app circuits

Function input_size_in_bytes output_size_in_bytes witness_generation_time_in_ms
ContractClassRegisterer:register 1,344 11,731 342
ContractInstanceDeployer:deploy 1,408 11,731 18.3 (-1%)
MultiCallEntrypoint:entrypoint 1,920 11,731 405
FeeJuice:deploy 1,376 11,731 390
SchnorrAccount:constructor 1,312 11,731 74.6 (-1%)
SchnorrAccount:entrypoint 2,304 11,731 398 (+1%)
Token:privately_mint_private_note 1,280 11,731 104 (-1%)
FPC:fee_entrypoint_public 1,344 11,731 26.6 (-4%)
Token:transfer 1,312 11,731 233 (+3%)
Benchmarking:create_note 1,344 11,731 87.3 (+1%)
SchnorrAccount:verify_private_authwit 1,280 11,731 27.6 (+1%)
Token:unshield 1,376 11,731 524
FPC:fee_entrypoint_private 1,376 11,731 703

AVM Simulation

Time to simulate various public functions in the AVM.

Function time_ms bytecode_size_in_bytes
FeeJuice:_increase_public_balance 53.7 (-4%) 7,739
FeeJuice:set_portal 9.57 (-21%) 2,354
Token:constructor 77.9 (-3%) 26,051
FPC:constructor 53.1 (-3%) 18,001
FeeJuice:mint_public 39.8 5,877
Token:mint_public 70.7 (-3%) 10,917
Token:assert_minter_and_mint 41.4 (+1%) 7,512
AuthRegistry:set_authorized 39.8 (-16%) 4,391
FPC:prepare_fee 241 (+2%) 7,043
Token:transfer_public ⚠️ 19.5 (-40%) 39,426
FPC:pay_refund 56.3 (+1%) 10,234
Benchmarking:increment_balance 933 6,563
Token:_increase_public_balance 40.3 (-1%) 8,433
FPC:pay_refund_with_shielded_rebate 61.8 (-4%) 10,783

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.159

Tree insertion stats

The duration to insert a fixed batch of leaves into each tree type.

Metric 1 leaves 16 leaves 64 leaves 128 leaves 256 leaves 512 leaves 1024 leaves
batch_insert_into_append_only_tree_16_depth_ms 2.21 (+1%) 3.98 (+3%) N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_count 16.8 31.7 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_ms 0.115 (+1%) 0.112 (+3%) N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A 11.6 (+1%) 17.6 31.5 (+4%) 58.8 113
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A 95.9 159 287 543 1,055
batch_insert_into_append_only_tree_32_depth_hash_ms N/A N/A 0.111 (+1%) 0.102 0.103 (+4%) 0.101 0.102 (+1%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 14.4 (-1%) 25.7 (-1%) 44.0 (+1%) 83.1 161 (+1%)
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 109 207 355 691 1,363
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.109 (-1%) 0.103 (-1%) 0.103 (-2%) 0.102 0.103 (+2%)
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 16.6 (+1%) N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A 132 N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A 0.106 N/A N/A N/A N/A

Miscellaneous

Transaction sizes based on how many contract classes are registered in the tx.

Metric 0 registered classes 1 registered classes
tx_size_in_bytes 64,779 668,997

Transaction size based on fee payment method

| Metric | |
| - | |

@alexghr alexghr force-pushed the ag/fix-trace-exporter branch 2 times, most recently from 42c791d to 0a84cbf Compare August 23, 2024 08:01
@alexghr alexghr enabled auto-merge (squash) August 23, 2024 08:01
@alexghr alexghr disabled auto-merge August 23, 2024 08:30
@alexghr alexghr marked this pull request as draft August 23, 2024 08:30
@alexghr
Copy link
Contributor Author

alexghr commented Aug 23, 2024

I have to updated the aztec start cli flags The flags for aztec start are generated from config automatically :)

@alexghr alexghr marked this pull request as ready for review August 23, 2024 13:49
@alexghr alexghr enabled auto-merge (squash) August 23, 2024 14:20
@alexghr alexghr merged commit 4e63106 into master Aug 23, 2024
96 checks passed
@alexghr alexghr deleted the ag/fix-trace-exporter branch August 23, 2024 14:20
spalladino pushed a commit that referenced this pull request Aug 27, 2024
This PR splits the collector URL into `_METRICS_ENDPOINT` and
`_TRACES_ENDPOINT` and makes exporting traces optional (if no processor
is registered then the default processor is a no-op)

See
https://www.npmjs.com/package/@opentelemetry/exporter-trace-otlp-http#user-content-configuration-options-as-environment-variables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants