paulirwin opened a new issue, #1151: URL: https://github.com/apache/lucenenet/issues/1151
### Is there an existing issue for this? - [x] I have searched the existing issues ### Describe the bug I have discovered that MMapDirectory has serious performance problems under parallel load when searching (with no background writes), across all platforms. The demo repo to reproduce this issue is at https://github.com/paulirwin/LuceneAdventureWorks/ This demo builds a simple index from the AdventureWorks2022 database data, and does a load test against it with 100k requests, using Parallel.For to search in parallel as fast as possible. Of note: MMapDirectory is the default Directory implementation returned by `FSDirectory.Open` on Windows and Linux 64-bit platforms. | OS | Architecture | Runtime | SimpleFS | NIOFS | MMap | Compared to SimpleFS | | --- | --- | --- | --- | --- | --- | --- | | macOS | arm64 | .NET 9.0 | 4.07s | 5.46s | 3m25s | 51x slower | | Linux | x64 | .NET 9.0 | 2.21s | 2.43s | 35.57s | 16x slower | | Windows | x64 | .NET 9.0 | 4.13s | 11.66s | 2m33s | 37x slower | | Windows | x64 | .NET Framework 4.8.1 | 7.83s | 2m21s^ | 2m21s | 18x slower | ^ This was an outlier for NIOFS, and yes it was identical to MMap. Also note that hardware between these machines is not exactly comparable but all are 6-8 performance core machines with at either 32GB or 64GB RAM. Given that MMapDirectory is the default Directory implementation returned by FSDirectory on Windows and Linux 64-bit (which is the majority of Windows and Linux use nowadays), we definitely need to resolve this, as MMapDirectory is supposed to be a fast implementation. ### Expected Behavior MMapDirectory performs well on all platforms. ### Steps To Reproduce See demo repo. ### Exceptions (if any) _No response_ ### Lucene.NET Version 4.8.0-beta00017 ### .NET Version _No response_ ### Operating System _No response_ ### Anything else? _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
