microsoft / Windows-Dev-Performance

A repo for developers on Windows to file issues that impede their productivity, efficiency, and efficacy
MIT License
434 stars 20 forks source link

Task Manager available memory is often wrong #81

Closed randomascii closed 2 years ago

randomascii commented 3 years ago

Environment

Item Value
OS, Version / Build Win32NT 10.0.19041.0 Microsoft Windows NT 10.0.19041.0
Processor Architecture AMD64
Processor Type & Model Intel Core i7-7820HQ @ 2.90 GHz
Memory 32 GB
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) SSD, 32GB / 254 GB
Relevant apps installed Python

Description

The Task Manager "Available Memory" value on the Memory section of the Performance tab shows how much physical memory is available for allocation and it includes free memory, zeroed memory, and standby memory. Perfect. It is great to have a single number which represents how much memory is available for programs to allocate.

But! Physical memory is just one possible limiting factor. It is possible to have 10 GB of available memory but have zero commit available. Due to the limited size of my SSD and therefore the limited size of my page file I hit this problem quite frequently. In this context the current Available memory calculation is misleading. It would be much better if "Available" was set to the minimum of the current calculation and the amount of commit remaining.

Steps to reproduce

Have a fixed-size page file. Have a program that allocates a lot of memory but doesn't touch it, preferably using VirtualAlloc. The amount of commit will drop, but Available memory will stay steady.

Expected behavior

Available memory should drop when commit is dropping.

Actual behavior

Available memory pays no attention to commit.

randomascii commented 3 years ago

The original twitter thread with supporting thoughts and screen shots is here:

https://twitter.com/BruceDawson0xB/status/1357735446449516545

AvriMSFT commented 3 years ago

Hey Bruce! This issue is actually to be handled by the Task Manager team and they take their feedback via the Feedback Hub. Can you file this issue in Feedback Hub under Desktop Environment -> Task Manager? Once you've done that, please paste the link here and I can upvote the feedback 🙂. I've also reached out to the team about this issue so they're aware of it now and are investigating a fix. Once you include the Feedback Hub link I'll close out this issue as out-of-scope.

randomascii commented 3 years ago

I filed the issue here:

https://aka.ms/AAce5h8

I had to edit quite a bit to fit within the 1,000 (???) character limit, and I had to file the issue on my home laptop whereas the issue occurs on my work laptop where Feedback hub is disabled. Therefore the report does not include a recording of the issue happening - I hope it doesn't get discarded because of this.

AvriMSFT commented 2 years ago

I've alerted the team of your issue. It shouldn't get discarded. Thanks for reporting Bruce!