Skip to main content
TL;DR - Performance overhead compared to non-TEE environments:
  • CPU: 5-10% slower in single-threaded, scales to 80% efficiency at 32 cores
  • GPU: 6.9x faster than AWS GPUs for INT8 workloads. For LLM inference, TEE adds 5-20% overhead
  • IO: Matches bare-metal for sequential I/O (36.2 GB/s), 40% higher latency on random reads
  • Network: 5-7x higher latency for HTTPS, but gateway handles 1,244 QPS at 1,000 concurrent connections

I. Introduction

TEE Performance Overview Phala Cloud’s TEE infrastructure delivers enterprise-grade performance with strong security guarantees. The following sections detail our comprehensive benchmarks across key performance dimensions.
  • Compute Performance
    Phala’s TEE environment demonstrates exceptional computational efficiency:
    • CPU: 1,271 MIPS for per-core compression
    • Scaling: 79.91% scaling efficiency at 32 threads
    • Multi-core: < 10% slower than bare-metal at 8 threads
    • GPU: 3,341 TFLOPS for INT8 operations (6.9x AWS GPUs)
  • Storage I/O
    Storage performance shows minimal overhead for most real-world scenarios:
    • Random Read: ~40% latency increase in TEE
    • Sequential I/O: Outperforms bare-metal at 36.2 GB/s
    • Caching: Significantly improves random read performance
  • Network & Security
    The architecture maintains robust performance under demanding conditions:
    • Gateway: 1,244 QPS at 1,000 concurrent connections
    • HTTPS: 702% latency increase vs HTTP (mitigated by optimizations)
  • Zero-Knowledge Proofs
    Our implementation balances security and performance:
    • Baseline: 5.12x slowdown (18.3 kHz vs non-TEE)
    • GPU Acceleration: Reduces overhead to < 1.8x
    • Throughput: 25.1k proofs/second (GPU-accelerated)
Performance Highlights

II. Storage Performance Analysis [1]

Experiment Setup
Performance Summary Key Findings
  1. TEE CVM shows 60-80% I/O performance degradation vs bare-metal
  2. Memory encryption extends I/O path and introduces context-switching overhead
  3. Random operations most impacted (20% of bare-metal performance)
  4. Sequential Read speed is faster in TEE VM due to that qemu may cache the memory

III. Network Gateway Performance [2]

Experiment Setup
Core Performance: Prod5 vs TDX-Lab TProxy Overhead Analysis Multi-process AB Test
  • Experiment Setup
  • gateway ver: git 7bc9eea958bd8aaca228341139f2cff5fab1d8d9
  • Results
Conclusions
  1. TDX-Lab outperforms Prod5 across all concurrency levels
  2. TLS handshake accounts for 70% of TProxy overhead
  3. Info-level logging reduces Prod8 performance by 33%

IV. zkTLS Performance in TEE [3]

Core Performance (2048-bit Verification) Memory Encryption Impact Key Findings
  1. Memory encryption causes 70-80% bandwidth degradation
  2. Data structure padding increases proof size by 289%
  3. Data migration overhead increases by 200% in TEE GPU

V. Multi-threaded Computing Capability [4]

Experiment Setup
Compression Performance Benchmark Conclusions
  1. TDX-Lab excels in compute-intensive tasks (high single-core frequency)
  2. Prod8 leads in memory-bound operations (DDR5 advantage)
  3. Prod5 suffers from frequency instability (48.7% fluctuation)

VI. zkVM + TEE GPU Integration [5]

Hardware Comparison
Cost-Performance Ratio = (Compute/Cost) / H200 Baseline
Integration Benefits
  1. Seamless deployment: SP1 zkVM runs on TEE GPU without code modifications
  2. Dual security: Hardware encryption + cryptographic verifiability
  3. Memory advantage: Supports complex workloads (zkEVMs, 100B+ parameter models)
  4. Optimization headroom: Current utilization < 30% of available resources

VII. TEE Scalability in Large-Scale LLM Inference [6]

Performance Metrics Across Models
  • Table 1: Throughput Comparison (Tokens/Requests per Second)*
Table 2: Latency Metrics (Time in Seconds) Key Findings
  1. Inverse Efficiency Scaling
    • Overhead decreases exponentially with model size
    • 70B models show near-zero overhead (H100: -0.13% TPS, -0.41% TTFT)
    • 8B models sustain 6-25% overhead due to shorter compute phases
  2. Computation/IO Asymmetry
  3. Token Volume Law
    • Every 10k token increase reduces overhead by 37%
    • At >50k tokens, TEE efficiency exceeds 95%
    • Phi3-128k demonstrates 5.29% ITL overhead vs 10.33% for 8B model

VIII. CPU Scaling Efficiency Analysis [7]

Experiment Setup
Comparative Multi-threading Performance
  • Table 1: TEE CVM Scaling Performance (7-Zip Benchmark)*
  • Table 2: Bare Metal Scaling Performance (7-Zip Benchmark)*
Key Findings
  1. Superlinear Scaling in TEE
    • At 2 threads: 140.75% efficiency vs bare metal’s 87.3%
    • At 4 threads: 116.9% efficiency (+36% advantage over bare metal)
  2. Memory Encryption Optimization
  3. Total Performance Impact
    • Single-thread penalty: 45% performance loss in TEE (2,803 vs 4,544)
    • 32-thread recovery: 73.2% of bare metal throughput (71,665 vs 97,853)
Scaling Characteristics Conclusions
  1. TEE demonstrates superior scaling efficiency (avg +35% at ≤8 threads) due to encrypted memory access optimizations
  2. Scaling beyond 16 threads becomes memory-bound, reducing TEE’s relative advantage
  3. Maximum throughput reaches 73% of bare metal in fully-loaded scenarios

References

  1. IO Benchmark with FIO
  2. Gateway Benchmark Analysis
  3. zkTLS in TEE zkVM Benchmark
  4. TDX Host Benchmark
  5. SP1 zkVM in TEE H200 Performance Benchmark
  6. TEE Scalability in Large-Scale LLM Inference. (2024). arXiv:2409.03992
  7. dstack CPU Benchmark
Note: Internal reports are available upon request. Please contact the Phala Team for access to the full documentation.