Skip to content

Cold constant-IRI lookups on next read ~60% more from a network filesystem and run 1.3–1.8× slower than main #2428

Open

Description

@bplatz

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.

Activity

  1. added this to the 5.0.0 milestone on Nov 17, 2026
  2. added
    P2
    area:storage
    performance
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2area:storageperformance

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions