Why is dwm.exe using so much memory?

25

5

I've scoured the web, but I'm sick of reading "scan your computer for viruses" and "upgrade your RAM" on answers to similar questions to this. I understand that dwm.exe is for (simply put) caching bitmaps for things like Aero-peek and similar, but as far as I have read it shouldn't be using vast amounts of memory.

My colleague and I both have 4GB of RAM, Core 2 Duo, blah, blah -- essentially they're pretty capable. His dwm.exe is running at around 30mb, mine is currently running at about half a gig, though it does fluctuate quite a lot. This is the same while running the exact same applications (currently Zend studio, FireFox (with firemin - low memory usage), Outlook). Every so often I will get a notification asking me if I want to switch to Aero Basic because it's using too much memory, and sometimes it will just switch itself to basic and let me know why.

I know it's possible to stop it switching, but I want to know why it is using too much memory otherwise it's just papering over the cracks.

One thing to add is this seems to have started after a robbery on Monday, where two of my monitors were stolen, and I had to temporarily use a couple of alternative monitors. I am now using brand new monitors but the problem is the same. All drivers installed and working seemingly fine.

Any ideas why the usage is so high?

We are using windows 7 64-bit Professional.

Leonard Challis

Posted 2012-05-25T14:26:06.770

Reputation: 841

Can you get any clues from Proccess Monitor? – jmreicha – 2012-05-25T14:54:58.223

What kind of information would you regard as a clue in Process Monitor? Sorry, not used it a whole lot. – Leonard Challis – 2012-05-25T15:02:57.427

1You can drill down into the processes more and see what, if any other processes it is talking to. – jmreicha – 2012-05-25T15:45:02.360

dwm.exe doesn't actually seem to show up in procmon...? – Leonard Challis – 2012-05-28T09:31:37.107

Yeah ProcMon can be a little hairy. How about the sysinternals tool Process Explorer? Can you find any clues with that maybe? – jmreicha – 2012-05-29T00:19:29.753

How come no info on the used Theme, visual effects enabled, number of monitors and their resolutions and whether cloned or extended, etc., etc., on the respective computers? They all would seem to be highly relevant. – kreemoweet – 2012-10-27T17:13:29.013

kreemoweet, the Theme doesn't matter (it's Aero anyway when the DWM is enabled), the transparency shader doesn't need memory, just GPU performance. – Joey – 2012-10-30T20:35:52.950

It'd be interesting to know the graphics cards used in both computers as well as how up-to-date the drivers are. E.g. if the driver doesn't support WDDM 1.1 then you'll have much higher memory usage. – Joey – 2012-10-30T20:37:15.630

0.5 GB isn't a lot fo memory! – Mikhail – 2012-10-30T21:03:36.540

Answers

24

The DWM.EXE process will consume a lot of memory when you have multiple screens and the system performance is set to the default of Let Windows choose what's best for my computer. To change this:

  1. Go to Computer -> Right click and choose Properties
  2. Select the Advanced tab
  3. Select the Settings button under the Performance section. This will popup the Performance Options window
  4. On the first tab is Visual Effects. Select Adjust for best performance or Custom (and select the feature(s) you want).

I chose Custom myself and selected only the Smooth edges of fonts to reduce memory usage from 534M to 6M with running 4 windows.

wallfodder

Posted 2012-05-25T14:26:06.770

Reputation: 264

@pjc50 I've recently started using Eclipse and have noticed dwm.exe taking much more memory than usual. Maybe Eclipse doesn't work well with Aero? – Nicholas Pickering – 2014-07-20T14:28:22.013

2Well, if you don't enable the DWM it won't use any memory of course ;) – Joey – 2012-10-30T21:03:06.143

1That's not the whole answer. I have best appearance set in the settings, and dwm.exe usually takes 80-100 MB of memory, but recently it has started sporadically spiking up to 1300 MB of RAM. If I terminate the process, it restarts automatically with normal 80 MB (and Aero style immediately applies again, so it's not like restart kills visual effects). – Violet Giraffe – 2013-12-22T17:06:14.720

1Thanks, this has made my computer much faster, especially in Eclipse. Note that it turns off 'Aero' and its transparent window effects etc. – pjc50 – 2014-02-07T10:50:01.800

I first tried the hint from http://www.computerhope.com/issues/ch001182.htm to switch from (default?) Aero style to Win basic theme - and this lowered usage (but not enough for me). Next, I tried this fix and this really seems to have helped.

– Lars Nordin – 2014-06-02T12:25:46.723

6

Since I cannot comment yet, I'll add this as additional answer. Microsoft has confirmed a memory leak in DWM.EXE: https://support.microsoft.com/en-us/kb/3078667

In short, DWM.EXE leaks memory when status windows are open for a long time.

Alexandr Zarubkin

Posted 2012-05-25T14:26:06.770

Reputation: 212

1

Try restarting the dwm service:

  1. Hit Win+r and type services.msc.
  2. Find Desktop Window Manager Session Manager.
  3. Click Restart the service and see if that fixes it.

Or if you want to get rid of the process all together, just click Stop.

imtheman

Posted 2012-05-25T14:26:06.770

Reputation: 3 503

Starting from Windows 7 it is impossible to stop DWM (so the service doesn't show up in services.msc) – marijnr – 2018-08-13T06:54:24.013

From what I understand, restarting the computer would have the same effect as restarting DWM. And would stopping DWM be a good idea, considering it's needed? – Leonard Challis – 2012-07-04T07:23:11.720

Technically yes, but here read this see if this helps any: http://www.howtogeek.com/howto/windows-vista/what-is-dwmexe-and-why-is-it-running/

– imtheman – 2012-07-04T07:37:23.153

1I don't see how that helps at all. Note that I don’t recommend turning this off unless you are playing games in fullscreen mode, and even then it likely won’t help increase speed. for starters, and I have indeed read this page already (I did Google before posting this question). I also said Iknow it's possible to stop it switching, but I want to know why it is using too much memory otherwise it's just papering over the cracks. and this doesn't help at all. – Leonard Challis – 2012-07-04T08:11:37.957

0

Another speed up tip is to hold the windows key and press r, type msconfig and press enter, click on boot tab > advanced options then check mark number of processors then click the down arrow and select max number of cores 2 is duo 4 is quad hit ok.
Check mark boot log and OS boot information, then in the right click make all boot changes permanent and make sure nothing else is open and hit apply then restart.
Most Microsoft windows computers only use one core by default boot settings. This works on windows 8 and 8.1 for sure. I haven't tried it on anything before that.
Good luck :)

Mantis

Posted 2012-05-25T14:26:06.770

Reputation: 1

this really doesn't sound like a good idea to be messing with this option - especially your comment "Most Microsoft windows computers only use one core by default boot settings." !! – Simon – 2018-11-01T22:50:20.920