You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cold constant-IRI lookups on next read ~60% more from a network filesystem and run 1.3–1.8× slower than main #2428
P2Scheduled: real but not urgentarea:storageStorage backends, nameservice, ledger lifecycle, index storage, cachesperformancePerformance improvement (release notes: Performance)
Measured on BSBM 100M with the ledger on a network filesystem (EFS) and a cold page cache. Q11 and Q12 each look up one constant offer IRI, and both are slower on next than on main (a2a50ca):
next
main
Q11, inside the cold mix
140 ms
23 ms
Q12, inside the cold mix
136 ms
13 ms
Q11/Q12 run alone
1.3–1.8× slower
Run alone, next reads about 60% more bytes per query.
With a warm page cache the two are level.
The rest of the mix is faster on next: about 2× at one client and +35% at 128 clients, with identical answers.
Lead
The two branches read local blobs differently:
On next, FileStorage returns ContentBytes::from_file (fluree-db-core/src/storage/file.rs). That reads blobs of 64 KiB or less (DEFAULT_MMAP_MIN_BYTES) into the heap and maps anything larger, dictionary tree leaves included.
On main, FileStorage reads blobs into the heap with tokio::fs::read. Only index leaves and large dictionary packs are mapped.
On a network filesystem each fault on a mapping is a remote read sized by the readahead window. A point lookup that touches a few scattered pages of a large blob can therefore read more than it needs.
This is unconfirmed. The two ledgers also differ in index format, so part of the extra bytes may be layout. The first step is to split the bytes read by blob kind (index leaf, dictionary tree leaf, forward pack) on both branches for one cold Q11.
P2Scheduled: real but not urgentarea:storageStorage backends, nameservice, ledger lifecycle, index storage, cachesperformancePerformance improvement (release notes: Performance)
Activity