OpenMLS includes comprehensive benchmarks to measure performance across different operations, group sizes, and scenarios. This page describes the benchmark methodology and provides guidance on running your own benchmarks.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/openmls/openmls/llms.txt
Use this file to discover all available pages before exploring further.
Running benchmarks
OpenMLS uses Criterion.rs for benchmarking core operations:Run the benchmark suite
Benchmark categories
The benchmark suite measures the following operations:Key package operations
Key package bundle creation - Measures the time to generate a complete key package including credential and signature:- Joining a new group
- Pre-generating key packages for future invitations
- Refreshing expired key packages
Group creation operations
Create welcome message - Measures commit and welcome generation when adding the first member:- Commit creation
- Welcome message encryption
- Ratchet tree updates
- Pending commit merge
Join operations
Join group from welcome - Measures processing a welcome message and creating group state:Update operations
Create commit - Measures self-update commit creation and merge:Large group benchmarks
For testing with realistic group sizes, use thelarge-groups example:
Setup variants
The large group benchmark supports different tree states:- Bare
- Commit after join
- Commit to full group
Members join but don’t commit afterward. Results in a minimally-updated tree.
Measured operations
The large group benchmark measures these real-world operations:Adder
Adder
Time for an existing member to create a commit that adds a new member to the group.Scales with: Group size, tree depth
Updater
Updater
Time for a member to create and merge a self-update commit.Scales with: Tree depth, path length
Remover
Remover
Time for a member to create a commit that removes another member.Scales with: Group size, tree complexity
Process update
Process update
Time for a member to process and merge an update commit from another member.Scales with: Path length, tree state
Real-world scenarios
OpenMLS benchmarks are designed around common usage patterns:Stable group
Many private groups follow this model:- Group created by user P1
- P1 invites N other users
- Group used for messaging between N+1 members
- Every X messages, one user sends an update
- Fast message encryption/decryption
- Infrequent commit operations
- Predictable resource usage
Somewhat stable group
Models company or team-wide groups:- Group created and initially populated
- Regular messaging between members
- Every X messages, one user sends an update
- Every Y messages, Q users are added
- Every Z messages, R users are removed
- Moderate commit frequency
- Tree gradually changes structure
- Need to handle both additions and removals
High fluctuation group
Models public groups or real-time collaboration:- Group exists with varying membership
- Users frequently join and leave
- Very small Y and Z (frequent member changes)
- High commit frequency
- Many welcome messages
- Tree structure changes rapidly
- Important to batch operations
Benchmark configuration
The benchmark suite is configured inopenmls/Cargo.toml:
Benchmark parameters
Default configuration:- Iterations: 1000 (for stable measurements)
- Warmup: 5 iterations
- Ciphersuites: All supported ciphersuites
- Providers: RustCrypto and libcrux providers
Interpreting results
Benchmark output shows timing for each operation:Performance scales with group size, but the relationship is sublinear due to the tree structure. A 5x increase in group size typically results in less than 3x increase in operation time.
Performance tracking
For historical performance data and comparisons across versions, see the OpenMLS Performance Spreadsheet.Extreme scenarios
Some benchmarks test edge cases:Blank node patterns
Testing trees where every second leaf is blank (after removals):Long-offline device
Simulate a device catching up after being offline:Custom benchmarks
Create application-specific benchmarks using Criterion:Optimization checklist
Use benchmarks to validate these optimizations:- Selected optimal ciphersuite for your platform
- Chosen appropriate crypto provider
- Configured wire format policy for your transport
- Implemented efficient storage backend
- Batching membership changes when possible
- Tuned update frequency for your use case
- Measured performance on target hardware
Next steps
Optimization guide
Learn how to optimize OpenMLS for your use case.
Source code
View benchmark source code on GitHub.