Skip to content

Performance

This page summarizes results of Fusion performance benchmarks.

Test Environment

ComponentSpecification
CPUAMD Ryzen 9 9950X3D 16-Core Processor
RAM96 GB DDR5
OSWindows 11
.NET10.0.1

Note that Ryzen 9 9950X3D has 32 logical cores due to SMT.

Run-PerformanceTest.cmd from Fusion Test suite

The benchmark measures throughput of a simple repository-style user lookup service (UserService.Get(userId)) that retrieves user records from a database. The test compares two scenarios:

  1. With Fusion: UserService.Get is a [ComputeMethod], so its results are cached, and thus a majority of database calls are avoided (unless they happen right after a mutation).

  2. Without Fusion: UserService.Get is a regular method, so every call to it executes a simple SQL query.

Test Scenarios

  • Multiple readers, 1 mutator: Simulates a realistic high-intensity workload with ~640 concurrent reader tasks (20 per CPU core) performing lookups, while a single mutator task periodically updates random user records. This tests how well Fusion handles cache invalidation under concurrent load.

  • Single reader, no mutators: A single task performs sequential lookups with no concurrent mutations. This measures the peak lookup throughput per CPU core.

The test uses a pool of 1,000 pre-populated user records. Each run performs multiple iterations, and the best result from 3 runs is reported.

Results

Multiple Readers + 1 Mutator (all cores)

TestSQLitePostgreSQL
Without Fusion155.68K calls/s38.61K calls/s
With Fusion316.34M calls/s313.75M calls/s
Speedup2,032x8,126x

Single Reader, No Mutators

TestSQLitePostgreSQL
Without Fusion55.70K calls/s1.78K calls/s
With Fusion19.54M calls/s19.66M calls/s
Speedup351x11,045x

Key Observations

  • With Fusion + concurrent readers: ~315M calls/s regardless of the database, because most calls are served from Fusion's in-memory cache. This is approximately 2,000x faster than direct PostgreSQL access and 8,000x faster than the single-reader baseline without Fusion.

  • Without Fusion: Performance is entirely database-bound. SQLite (in-process) outperforms PostgreSQL (network round-trip) significantly, especially for single-threaded access.

  • Concurrent access amplifies the difference: With many readers, Fusion's lock-free cache scales linearly with CPU cores, while database access becomes the bottleneck.

Benchmark.cmd from ActualLab.Fusion.Samples

The benchmark measures throughput of a simple repository-style user lookup service that retrieves and updates user records from a database: UserService.Get(userId) and Update(userId, ...).

Local Services

TestResultSpeedup
Regular Service136.91K calls/s
Fusion Service263.62M calls/s~1,926x

Remote Services

TestResultSpeedup
HTTP Client → Regular Service99.66K calls/s
HTTP Client → Fusion Service420.67K calls/s~4.2x
ActualLab.Rpc Client → Fusion Service6.10M calls/s~61x
Fusion Client → Fusion Service223.15M calls/s~2,239x

RpcBenchmark.cmd from ActualLab.Fusion.Samples

This benchmark compares ActualLab.Rpc with gRPC, SignalR, and other RPC frameworks. The tables below include only ActualLab.Rpc, gRPC, and SignalR. Other options, such as StreamJsonRpc and RESTful API, are way slower, so we omit them.

Calls

TestActualLab.RpcgRPCSignalR
Sum8.87M calls/s1.11M calls/s5.34M calls/s
GetUser7.81M calls/s1.09M calls/s4.43M calls/s
SayHello5.58M calls/s1.03M calls/s2.23M calls/s

Streams

TestActualLab.RpcgRPCSignalR
Stream195.10M items/s38.75M items/s17.11M items/s
Stream10038.90M items/s20.63M items/s13.61M items/s
Stream10K320.04K items/s636.84K items/s387.00K items/s