Comments (5)
To give some extra context, I first ran into this scheduled task issue (or perhaps a restart manager issue, but probably the same root cause) in 2009 or 2010 while working at Microsoft. I then hit it again at my next job. And it's still around.
It can be an extremely painful bug because low memory priority means that a process' working set will be drained and then can easily end up being swapped out to disk. Any programs that are launched from explorer.exe will inherit the low memory priority which can easily end up being most processes the user is running.
When I first encountered it the low memory priority would propagate from explorer.exe to Visual Studio (when I launched it from explorer.exe with a lowered memory priority) and if I didn't use VS for a while it's working set would be drained, and if I left it alone for longer its memory would be written to the page file. This meant that when I went to go use VS it would have to read in hundreds of MB of data from the page file. This was on an old-style spinning disk so this was extraordinarily painful.
A lot has changed since then (memory compression, SSDs) which may change the impact of this bug, but it is still a bug. Thank you for finding a particularly simple way to reproduce it. I hope it gets fixed.
from windows-dev-performance.
The bug (well, some form of it at least) dates back far before Windows Server 2016. I first saw it in 2009 when working on Internet Explorer at Microsoft. We were experimenting with updating IE without restarting the computer, and that required restarting explorer. Explorer would start with low memory priority, so would anything that was launched from explorer, and pretty soon Visual Studio's working set would be drained away to the page file on a slow spinning disk.
The only change since then is that now when the bug hits the trimmed pages are more likely to be compressed or stored on an SSD, so the consequences are less severe.
But, it's still a bug.
from windows-dev-performance.
The bug mentioned above by Chris has been fixed and in a GA release since 22H2 (22621+).
from windows-dev-performance.
For MS people follow along on the bug here.
from windows-dev-performance.
Caught by this unexpected/undocumented behavior apparently introduced in Windows Server 2016 (I'm on Windows Server 2019):
- Already using
<Priority>5</Priority>
to overcome the Below Normal (<Priority>7</Priority>
) assigned by default - Noticed the unexpected Below Normal memory priority (using Process Hacker, where it's labelled Page priority)
- Setup two scheduled tasks to assert the behavior:
- the one with
<Priority>5</Priority>
got Normal process priority and Below normal memory priority - the one with
<Priority>4</Priority>
got Normal for both process and memory priorities
- the one with
At a minimum, this means that documentation for Priority (settingsType) Element is incomplete; furthermore, pairs of numbers - such as 4 and 5 - are presented in a way they look equivalent, which is deceiving.
from windows-dev-performance.
Related Issues (20)
- PROCESSOR_POWER_INFORMATION.CurrentMhz no longer shows CurrentMhz HOT 7
- Throttling detection needed in Windows HOT 5
- Symbol server PE files are being overwritten with different versions HOT 13
- WinDbg's `dU` command is painfully slow HOT 4
- Merge module validation in Orca fails on well-formed merge module
- NT heap scales horrendously in some cases HOT 2
- Set up your dev environment on Windows for Rust HOT 2
- PrefetchVirtualMemory does not prefetch virtual memory (windows api bug) HOT 1
- Explorer leaks resources over a long time HOT 2
- Configuring RDP with MSA is impossible using the RDP Developer Menu HOT 1
- Argon containers use only weak cores on systems with heterogeneous CPUs HOT 4
- Extremely slow Context Menu launch in Windows Explorer HOT 2
- Unexpected Sleep(1) Precision with Different Clock Interrupt Frequencies (Timer Resolution) HOT 3
- Dev drive has vanished HOT 3
- Windows incorrectly schedules utility QoS threads exclusively to E-cores when running on AC power
- Alt + Tab Sometimes Skips over the Last Window
- Alt+tab issue when in full-screen app HOT 2
- Can't Pinpoint What to do with Error PR175 with Visual Studio HOT 2
- "Must define a target architecture" issue from winnt.h when included by `.rc` files HOT 7
- Consistent CPU performance for benchmarking HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from windows-dev-performance.