• Peffse@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    23 hours ago

    Yeah, I guess I was fundamentally misunderstanding OPFS. I was thinking it was just resident in memory as a process of the browser. What exactly does this line mean, though?

    The file must exceed the system’s available RAM so that every random 4 KB read hits the SSD rather than the OS’s page cache.

    • Jesus_666@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      23 hours ago

      The OS can cache parts of files in RAM to speed up accesses. That cache is called the page cache. If your file is big enough you can fairly reliably access random parts of it and expect the OS to not have cached them no matter how big the page cache is. So each read hits the SSD, allowing you to observe its performance.