SetProcessWorkingSetSizeEx() is not working on Windows Server 2022 - x64 OS.
We are planning to test and use SetProcessWorkingSetSizeEx() for setting limit on memory (working set) consumed by a service so that working set by our service never exceeds the limit set in dwMaximumWorkingSetSize parameter of this API. We are calling the API with QUOTA_LIMITS_HARDWS_MAX_ENABLE.
We are aware of the impact of this on System's performance when the limit is exceeds as there can be a lot of page faults though the memory is available, depending the on multiple factors. We are in the process of evaluating this, for evaluating we are setting 1/10th of Physical Memory Bytes as limit.
We tested this API on Windows Server 10 - x64, Windows Server 2019 - x64. The API returns success and the working set of our process never exceeds the limit.
And on Windows Server 2022 - x64, the API returns success but the limit is not honored by the OS. The working set by our process exceeds the limit.
As per the documentation of this API, minimum supported OS are
Minimum supported client Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2003 [desktop apps
Could anyone please help us on this, if anyone using this API? If there is any change in the behavior of this API on Windows Server 2022 OS.
If more details needed for understanding the issue, let me know. I am happy to share more details.
If this is not the correct forum could you please let me know the right forum in which I would get info?
Regards,
Arjun Annam