Livy TLSNotary Docs
Benchmarks

TEE vs No TEE

Notarization-only TEE overhead measurements from the tlsn benchmark branch.

Source Material

These measurements were collected from the benchmark branch. The implementation docs elsewhere use tee_dev as the source of truth.

Test Matrix

  • TEE no verify: notarization with TDX attestation requested, excluding local quote verification time.
  • TEE verify: notarization with TDX attestation requested, followed by local TDX quote verification.
  • No TEE: normal TLSN notarization without the extra TDX attestation message.

Methodology

Each row below is one notarization run. The benchmark uses release binaries, the public TDX Notary at tlsn.livylabs.xyz, and a local TLS fixture as the target server. The values are elapsed milliseconds for the notarization phase only unless the column explicitly includes local verification.

The benchmark does not resolve test-server.io in DNS. The TCP connection goes to TARGET_HOST=127.0.0.1 and TARGET_PORT=4000; TARGET_SERVER_NAME=test-server.io is used for TLS SNI, certificate validation, and the HTTP Host header. The fixture package includes a certificate for test-server.io, and USE_FIXTURE_CA=true configures the example to trust that fixture CA.

Run the current benchmark from the infra repository root:

./benchmark-tee-impact.sh

The script uses these defaults:

  • TLSN_BRANCH=benchmark
  • ITERATIONS=25
  • BENCHMARK_MODES="no_tee tee_no_verify tee_verify"
  • START_FIXTURE=1
  • FIXTURE_ADDR=127.0.0.1
  • FIXTURE_PORT=4000
  • NOTARY_SCHEME=https
  • NOTARY_HOST=tlsn.livylabs.xyz
  • NOTARY_PORT=443
  • TARGET_HOST=127.0.0.1
  • TARGET_PORT=4000
  • TARGET_SERVER_NAME=test-server.io
  • TARGET_URI=/formats/json?size=4
  • USE_FIXTURE_CA=true
  • MAX_SENT_DATA=4096
  • MAX_RECV_DATA=16384
  • RUN_TIMEOUT_SECONDS=300

It writes benchmark-results/<timestamp>/results.csv, summary.txt, and per-run stdout and stderr logs. The CSV includes both tdx_verify_ms and notarization_plus_verify_ms so verification cost is reported separately from the notarization phase.

Per-Run Results

RunNo TEE notarization (ms)TEE no verify notarization (ms)TEE verify notarization (ms)TDX verify (ms)TEE verify notarization + verify (ms)
11097164455943845978
21091136912673001567
31032139614642981762
41091132212793321611
51205142215502941844
61086134312583341592
71131123012552961551
81107121636263563982
91047140212583291587
101083151114123191731
111226138913303001630
121250126913183461664
131104128012423081550
141041161812982971595
151029124213573581715
161045138213343101644
171088149827753763151
181259164712933261619
191083126813543381692
201200126014283081736
211114134312973391636
221047134551793505529
231046133713853091694
241117145416453001945
251064138213033261629

Summary Statistics

ModeAverage notarization (ms)Median notarization (ms)P90 notarization (ms)Average TDX verify (ms)Average notarization + verify (ms)
No TEE1107.31091.01217.6n/a1107.3
TEE no verify1382.81369.01575.2n/a1382.8
TEE verify1820.01334.03285.6325.32145.4

Overhead

ComparisonGroup average overheadGroup median overheadPaired average overheadPaired median overhead
TEE no verify notarization - No TEE notarization+275.4 ms, +24.87%+278.0 ms, +25.48%+275.4 ms, +25.28%+278.0 ms, +25.48%
TEE verify notarization + verify - No TEE notarization+1038.0 ms, +93.74%+573.0 ms, +52.52%+1038.0 ms, +95.27%+565.0 ms, +53.10%
TDX verification only325.3 ms326.0 msn/an/a

Notes

This run removes public target-server variance by using the local TLS fixture. The public Notary path can still produce network or service outliers. The initial 25-run pass had three timeout rows; those rows were retried with a 300-second timeout and folded into the complete result set.

With 25 samples, the TEE no-verify group median and paired average agree closely, so the earlier 10-run +6.06% paired average was an outlier artifact. TEE verify includes several high notarization runs, so its average is higher than its median. For this run, use these headline figures:

  • TEE no verify median overhead over No TEE: +278.0 ms, or about +25.48%.
  • TEE verify median notarization + verification overhead over No TEE: +573.0 ms, or about +52.52%.
  • TDX verification median: 326.0 ms.

On this page