aureus Aug 18, 2014 @ 2:07am
Steam causing memory leak on OS X Mavericks
I've been noticing over the last few weeks that something keeps consuming my hard disk space and after a bit of digging it appears I have come across the (or at least a) culprit: Steam.

In particular, as long as Steam is running on my computer, the distnoted process (the distributed notification daemon) leaks a few kilobytes of memory per second. Since I've been leaving Steam running in the background, this adds up over a few days to gigabytes of memory, eating up both physical memory and eventually swap space.

Running the terminal command sudo dtruss -p <pid of distnoted> while Steam is running displays about a dozen lines per second which mostly look like:

kevent64(0x3, 0x7FFF7C9B3130, 0x1) = 1 0
workq_kernreturn(0x20, 0x0, 0x1) = 0 0
workq_kernreturn(0x20, 0x0, 0x1) = 0 0
kevent64(0x3, 0x7FFF7C9B3130, 0x1) = 1 0
workq_kernreturn(0x20, 0x0, 0x1) = 0 0
workq_kernreturn(0x20, 0x0, 0x1) = 0 0

These lines do not appear nearly as frequently if I quit Steam.

I'm not familiar with the internal workings of Steam, but looking over the NSDistributedNotificationCenter reference (https://developer.apple.com/library/mac/documentation/cocoa/reference/foundation/classes/NSDistributedNotificationCenter_Class/Reference/Reference.html), my guess is that steam is either repeatedly calling - addObserver: or is posting notifications faster than the observers are consuming them.
< >
Showing 1-15 of 29 comments
ChaosContrl Aug 18, 2014 @ 4:00am 
So it confirms my own opinion on why my hard disk storage was decreasing in availability...
Winter Aug 18, 2014 @ 9:31am 
So what would be a good solution for this until they fix this (it doesn't seem like they fix things on mac that well on Steam so I don't have high hopes. I have issues with Steam overlay crashing my mac and its been this way for months).

Would making sure to restart it every few hours help? Or do i have to restart the mac entirely? I have tended to keep Steam running 24/7 for days lately.

BTW I am using the beta version, don't see any difference except a much better looking dock icon.
Last edited by Winter; Aug 18, 2014 @ 9:32am
.Bhaze Aug 24, 2014 @ 9:59am 
Same here. With Steam running for a while, distnoted process runs at >100% regular CPU capacity (MBAir CPU is under clocked by default.)

  • MacBook Air 13-inch, Mid 2013
  • OS X 10.9.2 (13C1021)
  • Running latest stable Steam build. (Steam package versions: 1407966480)
Last edited by .Bhaze; Aug 24, 2014 @ 9:59am
I've also observed the behavior of distnoted growing in memory usage, only while steam is running.

  • On a 15" Early 2011 Macbook Pro
  • OS X 10.9.4
  • Steam package versions: 1409240101

Disnoted grows from using about 3 megs of RAM when steam isn't running to a hundred something in an hourish and this weekend grew to over 4gb which is what alerted me to the problem in the first place.

Has anyone found a workaround for this or had the problem go away with an update?
Dazey Sep 8, 2014 @ 5:39pm 
I'm seeing this happen as well, only noticed it in the last 2 weeks so I believe it's from a recent update.
  • 27-inch Mid 2010 iMac
  • OSX 10.9.4
  • Steam package version: 1409240101
ehyder Sep 9, 2014 @ 2:36pm 
I have been having even more problems with Steam after the last round of updates. Games are crashing, especially when Steam is sending me sales messages, and harder to tell, syncing files. I am also getting a message asking me to allow Steam to use the accessiblity settings every single time I open a game. I get this message despite the fact that Steam is already enabled in the settings.

Anyone else experiencing these Mac issues and figure out any settings that keep the crashing to a minimum?
Dazey Sep 9, 2014 @ 3:17pm 
I had to re-enable steam in the accessibility settings after the update, but only once. Haven't noticed any of the other things you mentioned though.
ehyder Sep 9, 2014 @ 3:24pm 
Tnank you, I will try that then. Maybe I will be lucky and there is just something wacky going on because I have not re-enabled the setting.
Robot Monster Sep 14, 2014 @ 7:07am 
I've been noticing distnoted gradually gobbling all my RAM, too. To get it back without having to reboot, issue the following from the command line to restart distnoted:

launchctl stop com.apple.distnoted.xpc.agent
launchctl start com.apple.distnoted.xpc.agent

Dazey Sep 15, 2014 @ 12:55pm 
I just stop the process in Activity Monitor. Do you commands do anything different?
buddhapest Sep 16, 2014 @ 9:05pm 
if you stop steam distnoted relinquishes the massive memory its been using. no need to kill it.
Dazey Sep 17, 2014 @ 1:52pm 
In my experience it's a lot faster to kill the process than to restart steam. Do you think quitting Distnoted is harmful?
buddhapest Sep 17, 2014 @ 1:58pm 
it's a notification system used for a lot more than steam so killing it may have undesirable side effects

Dazey Sep 18, 2014 @ 2:03pm 
Every time I quit the process it restarts immediately with a reasonable amount of memory allocated, so I'm not to concerned in that case.
buddhapest Sep 18, 2014 @ 2:11pm 
whatever works for you man . i tend to avoid killing OS specific processes ;)
Last edited by buddhapest; Sep 18, 2014 @ 2:11pm
< >
Showing 1-15 of 29 comments
Per page: 1530 50

Date Posted: Aug 18, 2014 @ 2:07am
Posts: 29