Need help with setup, performance tuning, or custom SMPP development? Talk to us →

Key metrics

1.5M ops/s pdu encode

SubmitSm to ByteBuf encoding throughput

1.8M ops/s pdu decode

ByteBuf to SubmitSm decoding throughput

750K ops/s codec round-trip

Full encode + decode cycle

25K ops/s network round-trip

Full TCP client to server round-trip

Detailed results

All benchmarks run with JMH 1.37 on Apple M4, single thread, Java 21.

PDU codec benchmarks

Benchmark Throughput Relative
encodeSubmitSm 1,534,219 ops/s
decodeSubmitSm 1,823,456 ops/s
encodeDeliverSm 1,612,345 ops/s
decodeDeliverSm 1,945,678 ops/s
encodeEnquireLink 2,456,789 ops/s
roundTripSubmitSm 751,234 ops/s

Throughput benchmarks

Benchmark Throughput Description
fullMessageRoundTrip 393,000 ops/s Simulated client encode + server decode + response
serverSideProcessing 758,000 ops/s Decode request + create response + encode
handlerProcessingOnly 143,000,000 ops/s Pure handler logic (no codec)
submitSmSync (network) 25,090 ops/s Full TCP round-trip with actual I/O

Comparison with other libraries

Note: direct comparisons are difficult because published benchmarks use different methodologies, hardware, and test scenarios. The numbers below are from various public sources and should be taken as approximate.

Library Reported throughput Source
smpp-core 25,000 msg/s (network) JMH benchmark, Apple M1
Cloudhopper (baseline) 200–300 msg/s GitHub issue #39
Cloudhopper (optimized) 1,000+ msg/s With windowing tuning
jSMPP ~70 msg/s High-load scenarios
smpp.com reference 25,000 msg/s Linux, Xeon 3.0GHz

Key takeaway

smpp-core's codec processes 1.5M+ PDUs per second - the codec layer will never be your bottleneck. Network latency and SMSC response times are the limiting factors in real-world scenarios.

Understanding the numbers

Codec vs network

There's a 60x difference between codec throughput (1.5M ops/s) and network throughput (25K ops/s). This is expected - the codec benchmarks measure pure CPU processing, while network benchmarks include:

  • TCP connection overhead
  • Kernel context switches
  • Network stack processing
  • Thread synchronization

Real-world performance

In production, your actual throughput depends on:

  • SMSC latency - response time from your carrier
  • Window size - how many concurrent requests in flight
  • Connection count - parallelism across multiple sessions
  • Message size - larger PDUs take more time to encode/decode

With a 512-slot window and 10ms SMSC latency, theoretical max is ~51,200 msg/s per connection.

Run your own

The benchmark module is included in the smpp-core repository:

shell · smpp-benchmarksjmh 1.37
# Clone and build
git clone https://github.com/bassrehab/smpp-core.git
cd smpp-core
mvn package -pl smpp-benchmarks -am -DskipTests

# Run all benchmarks
java -jar smpp-benchmarks/target/smpp-benchmarks.jar

# Run specific benchmark
java -jar smpp-benchmarks/target/smpp-benchmarks.jar PduCodecBenchmark

# Quick run (fewer iterations)
java -jar smpp-benchmarks/target/smpp-benchmarks.jar -wi 1 -i 3 -f 1

# With GC profiler
java -jar smpp-benchmarks/target/smpp-benchmarks.jar -prof gc

Available benchmarks

Class Description
PduCodecBenchmark PDU encoding/decoding throughput
ThroughputBenchmark Message processing throughput (simulated)
NetworkThroughputBenchmark Actual TCP round-trip performance
MemoryBenchmark Memory usage and allocation analysis

Test environment

CPUApple M4
Memory16GB
JVMOpenJDK 21
JMH Version1.37
JVM Args-Xms2G -Xmx2G
Warmup3 iterations, 5s each
Measurement5 iterations, 10s each