CurtHagenlocher commented on issue #261: URL: https://github.com/apache/arrow-dotnet/issues/261#issuecomment-3905192593
Okay, so I think that the final paragraph of my original entry is the key here. A 1MB pressure increment has a much larger impact when the managed heap is small than when it is large, and this is why microbenchmarks like those created by Benchmark.NET suffer disproportionately. The problem is driven both by the total added pressure and by each additional call to `AddMemoryPressure` which seems to be another opportunity for a possible GC. When I add 512 KB memory pressure just once before running the tests, the .NET 4.7.2 numbers look like | Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated | |--------------- |---------:|--------:|--------:|---------:|--------:|----------:| | SystemTextJson | 661.0 us | 4.83 us | 4.52 us | 58.5938 | 19.5313 | 366.91 KB | | Arrow | 473.4 us | 7.04 us | 6.24 us | 120.1172 | 16.6016 | 52.13 KB | which is still not as good as "no memory pressure" but considerably better than adding pressure any more frequently. Even changing the initial reservation to 256 MB means that there's at least one call in the middle of the test to add memory pressure and the number of GCs noticeably increases. -- 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]
