Datomic Cache Tiers
Found segments float “up” the cache tiers, so they are cached close for future queries.
| Tier | Lower Bound | Upper Bound | |
|---|---|---|---|
| 1 | Object cache | ~1×10−7 s | |
| 2 | Valcache | 1×10−5 s | 1×10−4 s |
| 3 | Memcached | 2.5×10−4 s | 2×10−3 s |
| 4 | Storage | 2×10−3 s | 1×10−1 s |
nanoseconds (ns)
microseconds (µs)
= 1,000 ns
milliseconds (ms)
= 1,000 µs
= 1,000,000 ns
Object cache (~100 ns)
An LRU Java object cache of index or log segments, typically a few thousand datoms each. Docs.
1000 ns
=
1 µs
Valcache (10–100 µs)
Optional. Colocated SSD. Docs.
Memcached (250–2,000 µs)
Optional. Docs.
1,000 µs
=
1 ms
Storage (2–100 ms)
Network hop to your storage service (DynamoDB/Postgres/etc). Docs.
Note: Logarithmic scale!
Object cache
Valcache
Memcached
Storage
Each pixel of height is 100 nanoseconds (ns), making the object cache one pixel tall.