-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default app.manifest should include <heapType>SegmentHeap</heapType> #43611
Comments
https://bugs.chromium.org/p/chromium/issues/detail?id=1102281 But which led to performance regression for WebXPRT3, Speedometer2, and JetStream2. Following are some regression data on Intel CFL i9-9900K i9-9900K: Vector35/binaryninja-api#2778 NTOS: JScript: These reflect a 20-25% improvement on analysis times. more info on segment heap(internals) : https://www.blackhat.com/docs/us-16/materials/us-16-Yason-Windows-10-Segment-Heap-Internals-wp.pdf |
Any more recent update in last 4 years? Behaviour we see with using a RocksDB db as part of app is performance is good for about 4 hours; then starts to continuously nose dive with default heap. With the segment heap the performance continues to remain steady beyond a week of runtime. An alternative might be to enable it when ServerGC is selected to indicate its a long running process (assuming it hasn't improved in the intervening 4 years) |
I'm not sure, best to ask Bruce Dawson about it, from some testing i did personally performance improvement or regression depends a lot on allocation frequency and size which is why i posted my first comment, since some apps benefit while others either experience stutters or overall perf drop by up to -20% Also i'm not sure why Microsoft doesnt have any documentation on segment heap or how to best optimize apps for it/tune the heap, best docs i can find about it are from reverse engineering and PoC for exploits..
https://blogs.windows.com/msedgedev/2020/06/17/improving-memory-usage/ https://bugs.chromium.org/p/chromium/issues/detail?id=1102281
|
Just adding further context on this in case anyone reading this is now wondering if they also should go update their apps with this: if you have a packaged (MSIX) app, this is already the default. No action is needed in that case. The UI framework you're using doesn't matter (UWP, WinUI 3, WPF, WinForms, no UI framework at all, whatever), as long as you're deploying as a packaged app. This app manifest fix is only needed for unpackaged apps. For docs, see heap:HeapPolicy remarks 🙂 |
microsoft/Windows-Dev-Performance#106
maybe add it as optional from sdk side to avoid surprises? like setting |
Describe the bug
While it doesn't effect managed code if you are using any native allocator from a 3rd party lib (e.g. use RocksDB for example); then the allocator will degrade terribly over time and become a performance bottleneck.
Windows 10, version 2004 (build 19041) and later support a new allocator that doesn't suffer from this issues https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests#heaptype
However it needs to be specified in the
app.manifest
which by default .NET isn't doing.This can be manually overwritten eg. NethermindEth/nethermind#7418 but should be on this fast path by default.
To Reproduce
Build a .NET exe on Windows this field is not included in the manifest
The text was updated successfully, but these errors were encountered: