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.
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.
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 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.
Neat. Thank you for the explanation.