Performance Benchmarks
Latency
This section presents the results of an experiment designed to measure the latency between TimeBase server receiving a message and its subsequent retrieval via TimeBase Python API.
Test environment
- Instance: one Amazon EC2 c6i.2xlarge (8 vCPU, 16 GB RAM), the server, the loader and the client are co-located on it
- TimeBase server v5.5.77
- Loader: TimeBase Java client loader
- Client: dxapi v5.5.5
- Messages: payload size 40 bytes (10 float numbers)
Results
Loading message rate: 10000 msgs/s
Percentile : Microseconds : Message count
50.0% : 829.760 : 600000
75.0% : 1087.232 : 900000
90.0% : 1283.840 : 1080000
99.0% : 1511.488 : 1188000
99.9% : 1593.792 : 1198800
99.99% : 1626.368 : 1199880
99.999% : 3744.256 : 1199988
99.9999% : 5159.898 : 1199999
100% : 5161.792 : 1200001
Loading message rate: 50000 msgs/s
Percentile : Microseconds : Message count
50.0% : 839.552 : 3000001
75.0% : 1089.408 : 4500002
90.0% : 1283.840 : 5400002
99.0% : 1514.112 : 5940002
99.9% : 1592.128 : 5994002
99.99% : 3822.464 : 5999402
99.999% : 13719.872 : 5999942
99.9999% : 14661.504 : 5999996
100% : 14677.888 : 6000003
Loading message rate: 100000 msgs/s
Percentile : Microseconds : Message count
50.0% : 846.080 : 5000000
75.0% : 1094.912 : 7500000
90.0% : 1288.704 : 9000000
99.0% : 1520.896 : 9900000
99.9% : 1600.512 : 9990000
99.99% : 3985.760 : 9999000
99.999% : 13873.056 : 9999900
99.9999% : 14632.704 : 9999990
100% : 14643.102 : 10000000
Throughput
This section presents the throughput of the TimeBase Python API (dxapi) v5.5.76 with compact messages
(CompactMessage, SelectionOptions.compactMessages = True): loading messages into TimeBase and reading them back, historical data and live data.
Test environment
- Instances: two separate Amazon EC2 m7i.2xlarge instances (server and client) in the same subnet, Amazon Linux 2023:
- CPU: Intel(R) Xeon(R) Platinum 8488C, 8 vCPUs; RAM: 32G
- Network: up to 12.5 Gigabit
- Server disk: GP3 EBS, 100 GB (3000 IOPS), ~125MB/s write throughput
- TimeBase server 5.6.225 (Amazon Corretto 17):
-Xms16G -Xmx16G- TimeBase.storage.writers=8
- TimeBase.network.socket.receiveBufferSize=4194304
- Client: dxapi v5.5.76, Python 3.14.10
- Messages: plain 15 fields (7 floating-point 64-bit, 2 integer 64-bit, 4 strings UTF-8 up to 4 characters, 2 boolean), the estimated payload size is about 102 bytes.
- Data: 100 instruments (symbols), one stream per client process, default stream options
The following diagram illustrates this test setup:
Test description
The client runs 1, 4 or 8 processes. Each process works with its own stream and has one writer (TickLoader) and one reader (TickCursor) with its own connection.
Opening and closing of loaders, cursors and connections is not included in the measurements.
The throughput is the total for all processes in messages per second (the average rate of a process multiplied by the number of processes). Every value is the average of 3 runs.
All the tests in this section use compact messages: the messages are written as CompactMessage objects and read with SelectionOptions.compactMessages = True.
Historical data (write and read). Each process writes 20 million messages into its own stream, and after all processes have finished writing, each of them reads its stream from the beginning.
Live. For each stream, a writer sends messages as fast as it can, and a reader receives them with a live cursor (SelectionOptions.live = True) that starts from the current time.
The result is the total number of messages received by all readers per second.
Results
Messages per second, total for all processes, dxapi v5.5.76 (compact messages layout):
| Processes | Historical write | Historical read | Live read |
|---|---|---|---|
| 1 | 1,257,861 | 1,481,497 | 1,172,686 |
| 4 | 4,770,533 | 5,353,840 | 3,604,304 |
| 8 | 6,636,129 | 7,907,968 | 3,735,086 |
Throughput comparison
This section compares dxapi v5.5.76 with dxapi v5.5.72 (regular instrument messages and compact messages).
dxapi v5.5.76 includes optimizations of the TickCursor and TickLoader implementation and the experimental mode of compact messages.
The same environment and same tests were used for all the results.
All values are in messages per second, total for all processes. The percentage in parentheses is the change relative to the baseline, dxapi v5.5.72.
Historical write
| Processes | v5.5.72 | v5.5.76 | v5.5.76 (compact) |
|---|---|---|---|
| 1 | 546,565 | 1,073,394 (+96%) | 1,257,861 (+130%) |
| 4 | 2,119,553 | 4,131,644 (+95%) | 4,770,533 (+125%) |
| 8 | 2,896,795 | 5,593,105 (+93%) | 6,636,129 (+129%) |
Historical read
| Processes | v5.5.72 | v5.5.76 | v5.5.76 (compact) |
|---|---|---|---|
| 1 | 662,765 | 1,132,470 (+71%) | 1,481,497 (+124%) |
| 4 | 2,552,693 | 4,460,603 (+75%) | 5,353,840 (+110%) |
| 8 | 3,337,119 | 5,814,942 (+74%) | 7,907,968 (+137%) |
Live read
| Processes | v5.5.72 | v5.5.76 | v5.5.76 (compact) |
|---|---|---|---|
| 1 | 637,800 | 1,133,950 (+78%) | 1,172,686 (+84%) |
| 4 | 1,801,271 | 2,616,074 (+45%) | 3,604,304 (+100%) |
| 8 | 1,821,021 | 2,695,970 (+48%) | 3,735,086 (+105%) |