question

caffemocha-3791 avatar image
0 Votes"
caffemocha-3791 asked caffemocha-3791 commented

Why does Windows 10 ver.1909 GlobalMemoryStatusEx report smaller ullAvailVirtual by 4 GB?

Hello,
I noticed Windows 10 GlobalMemoryStatusEx function started reporting a smaller ullAvailVirtual value for the same x64 program.

  1. On Windows 10 ver. 1607 (10.0.14393), ullAvailVirtual = 140,737,471,442,944 bytes

  2. On Windows 10 ver. 1909 (10.0.18363), ullAvailVirtual = 140,733,079,748,608 bytes

Comparing them, the latter reports a smaller ullAvailVirtual by 4,391,694,336 bytes (~4 GB).
On the other hand, the both versions report the same ullTotalVirtual = 140,737,488,224,256 bytes

Since Virtual Bytes are calculated as ullTotalVirtual - ullAvailVirtual, memory tools such as 'perfmon.exe' started reporting a larger Virtual Bytes by ~4 GB.
Also, .NET method: System.Diagnostics.Process.GetCurrentProcess().VirtualMemorySize64 started reporting a larger Virtual Bytes.
'VMMap.exe' reports it as 'Private Data - Thread Environment Block'.

My questions are:

  1. What is the purpose of lowering 'ullAvailVirtual' on Windows 1909?

  2. Is this caused by a system setting or configuration?

  3. If it is, which system setting or configuration affects it?

Replication steps:
Build (x64) and run the program below on Windows 10 ver. 1607 and 1909 systems to see the difference.

Replication code (C++):

     #include <iostream>
     #include <string>
     #include <Windows.h>
    
 int main()
 {
  MEMORYSTATUSEX memStatusEx;
  memStatusEx.dwLength = sizeof(memStatusEx);
  BOOL succeeds = GlobalMemoryStatusEx(&memStatusEx);
  if (succeeds)
  {
  DWORDLONG totalVirtual = memStatusEx.ullTotalVirtual;
  DWORDLONG availVirtual = memStatusEx.ullAvailVirtual;
  std::cout << "totalVirtual=" << totalVirtual << "\n";
  std::cout << "availVirtual=" << availVirtual << "\n";
    
  DWORDLONG virtualBytes = totalVirtual - availVirtual;
  std::cout << "virtualBytes=" << virtualBytes << "\n";
  }
    
  std::cout << "Press enter to close\n";
  std::cin.ignore();
 }
windows-10-general
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

I would like to check if the reply could be of help? If yes, please help accept answer, so that others meet a similar issue can find useful information quickly. If you have any other concerns or questions, please feel free to feedback.

Best Regards,
Joan

0 Votes 0 ·
jiayaozhu-MSFT avatar image
0 Votes"
jiayaozhu-MSFT answered caffemocha-3791 edited

Hi,

Thank you for your posting!

1) The regular (monthly) updates save installation etc files which over time occupy a large drive space. So, the change in 'ullAvailVirtual' on Windows 1909 is caused by version upgrading.

2) The feature upgrades (like 1809 to 2004) save a complete copy of the previous installation to allow roll back. The system usually deletes this after a few days. Look for the folder windows.old.

3) Most of this can be recovered using the various drive cleanup options.

Here is the blog who has the similar issue with yours, and in this blog, certain solutions to monitor and cleanup this extra data are also covered:

https://docs.microsoft.com/en-us/answers/questions/62169/more-disk-space-used-by-windows-10-with-upgradatio.html

Thank you for your support!

Best regards
Joan


If the Answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Humm... @caffemocha-3791 asked about memory but your answer is for disk space...

0 Votes 0 ·

Hi,

Virtual memory has to do with the performance of the system and how much disk space is used. I guess it is the system updating that uses more disk space and that's why available virtual memory gets smaller.

Best regards
Joan

0 Votes 0 ·

ullTotalVirtual and ullAvailVirtual numbers returned from GlobalMemoryStatusEx are not affected by Physical memory size, paging file size, or disk space size at all.
Please notice they are 140 TB range.
They are virtual space sizes determined by Windows architecture, not by individual PC spec in my understanding.
I tested on multiple machines with different physical memory sizes, paging file sizes, and disk space sizes. I tested with zero-paging file size, too.
I tested on Intel CPU and AMD CPU.
All machines with Windows 10 ver.1909 reported smaller ullAvailVirtual by ~ 4GB.

This affects Virtual Bytes reported by perfmon counter because Virtual Bytes = ullTotalVirtual - ullAvailVirtual

Many 64-bit programs started reporting larger Virtual Bytes.
For example, a presumably tiny program such as Windows Calculator now reports its Virtual Bytes ~ 4.7 GB.

On the other hand, Committed Bytes and Private Bytes on Windows 10 ver.1909 do not change much from those on ver.1607.

0 Votes 0 ·
jiayaozhu-MSFT avatar image
0 Votes"
jiayaozhu-MSFT answered caffemocha-3791 commented

Hi,

Thanks for your reply!

Based on your descriptions, your issue should be related to version 1909 and if your performance is not affected by the change, just ignore it. We can only try our best to troubleshoot issues which are related to configuration. If your production runs properly, we can hardly give any more suggestions within our Q&A scope. So, if you are really worried about your issue, you are suggested to contact Microsoft Customer Support and Services where more in-depth investigation can be done so that you would get a more satisfying explanation and solution to this issue. In addition, if the issue has been proved as design matter, the consulting fee would be refund. You may find phone number for your region accordingly from the link below.

Global Customer Service phone numbers:

https://support.microsoft.com/en-us/help/13948/global-customer-service-phone-numbers

Thanks for your support and understanding! And don't forget to help Accept Answer!

BR,
Joan


If the Answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you.
Following your suggestion, I called Global Customer Service, and was advised to submit a new case online.
My co-worker will submit a business support request on https://support.serviceshub.microsoft.com/supportforbusiness/create
Hope he can get an explanation whether this is a new behavior of the API (GlobalMemoryStatusEx function), or a regression of Windows version 1909, or something else.

0 Votes 0 ·