Technical Articles
How to prevent high paging on certain Windows versions?
This blog discusses a specific paging performance issue on Windows Server 2012, 2012 R2, 2016 and 2019.
If you operate a SAP ABAP Dialog Instance on Windows you maybe experience a very high paging rate (write operations).
Here is an example from Windows Resource Monitor:
Do you notice the orange bar? It displays the modified memory pages, which will be soon written to the pagefile, due to memory optimization of the Windows kernel.
You can see this type of paging in Disk tab of Resource Monitor:
The Windows kernel itself (System PID 4) writes with 208 Mbyte/sec to the Pagefile, in this example on c:\pagefile.sys. You may notice, that the priority for this is “Background I/O”.
Even it is background I/O it will cause bad performance issues!
The solution for this behavior was delivered by Microsoft with the July 2019 patches for
Windows Server 2012 R2
Windows Server 2016
Windows Server 2019
Remark:
Microsoft does not fix this behavior in Windows Server 2012!
Windows 2008 R2 is not affected!
To get rid of the above described paging problem, you must do two things:
- Install the patches of July 2019 (or later) via Windows Update
- Set a registry key value to enable the patch (requires reboot of the OS)
Add this value via Registry Editor (regedit) or using PowerShell commands:
Path | HKLM\System\CurrentControlSet\Services\disk |
Value | IdleClassSupported |
Type | REG_DWORD |
Data | 1 |
If the patch is working, you do not see any high page writes to the Pagefile in Windows Resource Monitor anymore.
What you see, is a background I/O to Pagefile.sys of ~ 1 Mbyte/sec with a very strange high response time (more than a second!). This indicates, that the patch Microsoft created to prevent the high page writes to pagefile.sys, is working properly.
Example:
Suppi, Danke für die Info, das werden wir sofort probieren.
Thank you very much for sharing this information. We will try this asap.
Ohh Servicing Stack Update is in July Patches included!? (was will uns das sagen)
Thanks a lot for that interesting post.
Extra information available in note : 2553235 – High Paging on Windows Server 2012 or higher affecting overall performance
Hi Yves,
Your note number is correct. However, the link is not.
Hi Denis,
You're true,link was wrong. Fixed it.
Karl-Heinz Hochmuth
"What you see, is a background I/O to Pagefile.sys of ~ 1 Mbyte/sec with a very strange high response time (more than a second!). This indicates, that the patch Microsoft created to prevent the high page writes to pagefile.sys, is working properly."
You're very right 🙂
But one side effect: saposcol now recognizes 100% disk utilization nearly all the time. Windows resource monitor shows the same, maybe because of the response times at accessing the page file.
But as far as i understand, this utilization should be no problem - right?
At SAP-point of view, it's missleading in Wily or ST06 f.e. Is there any chance to fix this?
Hello Florian,
you are right: The fix has the bad side affect, that the disk utilization on the disk, which hosts the pagefile, is wrong.
This utilization is a "fake", because the I/O does not occur in reality. Anyway, I understand that this must be fixed in saposcol. We start working on this issue.
You can support us if you open a ticket (ask the colleagues to put it directly on my name (Karl-Heinz Hochmuth)) and then we will provide a fix for saposcol.
My recommendation at this point in time:
Thanks for your feedback!
Best regards,
Kalle
Dear Karl Heinz
My question is a bit general. On AIX systems the memory management is a bit different where %free memory is not really relevant (as default is to consume all available free memory on host with fs cache and release it slowly when required to other applications). Hence we monitor only the % free swap there to know if the memory on host is sufficient for application or not
How does it work on Windows (2016) ? There are so many metrics that solution manager offers like %Free swap, %Free memory, Page In (% of RAM per hour), Page In(KB per sec) etc etc
Which is the one true metric (and preferably what can be the threshold) that would give an accurate indication that the server's memory is not sufficient for the workload and we should do something about it ?
Thx
Hello Chandrakanth,
it depends on the memory model you use in ABAP. By default, the view model will be used. An alternative is the flat memory model.
On Windows OS the extended memory (shared memory) used by the ABAP application server will be reserved in the pagefile. Therefore, the used virtual memory should be monitored.
Run "systeminfo" in a command prompt. You will get the current RAM and virtual memory consumption of the OS.
But you also should monitor, if your Windows host is paging, due to
a) out of physical memory
b) the behavior explained in this article
c) other processes which affects SAP operations, for example a database or antivirus engines
This will be monitored with the "Pages In" metrics. Too many pages in => system paging.
Much nicer is the Windows resource monitor tool which tells you details, for example "hard faults" which means, memory pages must be read from pagefile.
Best regards,
Kalle
I am grateful to you for sharing this information. I will definitely try to do this. I am also interested in your opinion about servers for Windows, such as SSH Server, for example, recently everyone began to think about buying a server.
Hello Ethan,
if you think about SSH for Windows, you should take a look at the OpenSSH projekt:
https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse
I used it in my lab with local and domain users and it works great.
Best regards,
Kalle
Hello Kalle,
I am not sure if you are looking for private use or commercial, but if you are looking for a commercial solution Georgia SoftWorks offers an industrial-grade SSH Server. It offers the strongest algorithms commercially available along with a lot of productivity and efficiency-based features. A large number of our customers use our software to connect to SAP systems, as our software works out of the box with SAP solutions.
Best regards,
Benjamin
Developer | Georgia SoftWorks