INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Schrödinger's Memory Leak (Windows 11 - 2H/24)  (Read 630 times)

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14479
  • I won! I won!
Schrödinger's Memory Leak (Windows 11 - 2H/24)
« on: October 27, 2024, 03:32:59 am »

Is it a memory leak if you don't see it?

Got the Win11 2H/24 Upgrade and started to have a terrible memory leak.... but only when I was not using my machine.  After days of looking at Task Manager, Resource Monitor, PoolMon, and RamMap I figured what was going on.  The memory leak would only start some minutes of idle activity and would stop leaking as soon as you moved the mouse, at which point the cycle would continue.

svchost.exe (defragsvc) : This puppy gets run by a scheduler in the background to "defrag" your drives when the PC is not busy... but something in 2H/24 seems to leak (or not release) memory until the entire process has concluded... which just does not happen on an 80TB pool as you run out of memory first, reboot, and the cycle starts again.  I was losing about 1gb per minute. 

Turns out, under "Optimize Drives" you can specify what drives, and on what schedule, the drives will be defraged.  I've now excluded my spinning rust Media Pool drives (rest are solid state) and at which point all the missing memory magically reappeared.  The oddest thing is I'm now manually running defrag on one of the drives as a test and there is no memory leak / memory consumption like I was seeing.  So not svchost.exe (defragsvc) itself (or the underlying ntfs/refs processes)... maybe what ever is scheduling the defrag.  Who knows.  I'm over it. 
Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14479
  • I won! I won!
Re: Schrödinger's Memory Leak (Windows 11 - 2H/24)
« Reply #1 on: October 27, 2024, 04:00:18 am »

...and who thought defrag was still a "thing"? 
Logged
JRiver CEO Elect

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2642
Re: Schrödinger's Memory Leak (Windows 11 - 2H/24)
« Reply #2 on: October 27, 2024, 07:03:08 am »

Good tip, thanks!
You should also disable it for SSDs with TRIM support, though Windows should already know about that.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72478
  • Where did I put my teeth?
Re: Schrödinger's Memory Leak (Windows 11 - 2H/24)
« Reply #3 on: October 27, 2024, 09:32:37 am »

Nice one. Thanks for posting.
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7830
  • Long cold Winter...
Re: Schrödinger's Memory Leak (Windows 11 - 2H/24)
« Reply #4 on: October 27, 2024, 10:18:41 am »

You should also disable it for SSDs with TRIM support, though Windows should already know about that.

It does. For any SSDs in the system it'll run TRIM on them and it'll only defrag the HDDs.
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14479
  • I won! I won!
Re: Schrödinger's Memory Leak (Windows 11 - 2H/24)
« Reply #5 on: October 27, 2024, 03:40:24 pm »

It does. For any SSDs in the system it'll run TRIM on them and it'll only defrag the HDDs.

Correct.
Logged
JRiver CEO Elect
Pages: [1]   Go Up