On 7/6/22 10:59, dmitri maziuk wrote:
mmap() doesn't side-step disk access though, dep. on the number of of mmap'ed chunks and chunk size, it can be slow. Especially if your "disk" is an iSCSI volume on a gigabit link to a slow underprovisioned NAS.
If the mounted filesystem is one that the OS can cache, and there is enough spare memory, then a lot of the mmap requests that Lucene makes won't ever hit the actual disk. Most block devices can be cached. I would expect that to be the case for iSCSI, because it should be a block device from the OS perspective. I think most network filesystems (NFS, SMB, etc) cannot be locally cached. They are probably cached on the server side, but then you'd be limited by network bandwidth and latency. The transfer rate of most 7200RPM SATA disks is a little bit faster than gigabit ethernet.
Thanks, Shawn
