osprofiler/releasenotes/notes/redis-improvement-d4c91683fc89f570.yaml
Ilya Shakhat 147effea78 Optimize storage schema for Redis driver
The original Redis driver stored each tracing event under its own key,
as result both list and get operations required a full scan of the database.
With this patch traces are stored as Redis lists under a key equal
to trace id. So list operation iterates only over unique trace ids
and get operation retrieves the content of a specified list. Note that
list operation still needs to retrieve at least 1 event from the trace
in order to get a timestamp.

Performance test is executed with 1000 traces each consisting 1000 events:
 * existing driver:
   * write: 48 sec
   * list:  41 sec
   * get:   3.6 sec
 * optimized driver:
   * write: 44 sec
   * list:  4.1 sec
   * get:   0.01 sec

Change-Id: I09a122f91e3d26531965fe53d6df7c66f502de4c
2019-04-09 13:27:18 +02:00

17 lines
751 B
YAML

---
features:
- |
Redis storage schema is optimized for higher performance.
Previously Redis driver stored each tracing event under its own key,
as result both list and get operations required full scan of the database.
With the optimized schema traces are stored as Redis lists under a key
equal to trace id. So list operation iterates only over unique
trace ids and get operation retrieves content of a specified list.
Note that list operation still needs to retrieve at least 1 event
from the trace to get a timestamp.
upgrade:
- |
The optimized Redis driver is backward compatible: while new events are stored
using new schema the driver can retrieve existing events using both old and new
schemas.