aureus 2014년 8월 18일 오전 2시 07분
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.
< >
29개 댓글 중 1-15개 표시
ChaosContrl 2014년 8월 18일 오전 4시 00분 
So it confirms my own opinion on why my hard disk storage was decreasing in availability...
Winter 2014년 8월 18일 오전 9시 31분 
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.
Winter 님이 마지막으로 수정; 2014년 8월 18일 오전 9시 32분
.Bhaze 2014년 8월 24일 오전 9시 59분 
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)
.Bhaze 님이 마지막으로 수정; 2014년 8월 24일 오전 9시 59분
Angry Over Videogames 2014년 9월 8일 오후 4시 40분 
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 2014년 9월 8일 오후 5시 39분 
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 2014년 9월 9일 오후 2시 36분 
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 2014년 9월 9일 오후 3시 17분 
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 2014년 9월 9일 오후 3시 24분 
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 2014년 9월 14일 오전 7시 07분 
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 2014년 9월 15일 오후 12시 55분 
I just stop the process in Activity Monitor. Do you commands do anything different?
buddhapest 2014년 9월 16일 오후 9시 05분 
if you stop steam distnoted relinquishes the massive memory its been using. no need to kill it.
Dazey 2014년 9월 17일 오후 1시 52분 
In my experience it's a lot faster to kill the process than to restart steam. Do you think quitting Distnoted is harmful?
buddhapest 2014년 9월 17일 오후 1시 58분 
it's a notification system used for a lot more than steam so killing it may have undesirable side effects

Dazey 2014년 9월 18일 오후 2시 03분 
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 2014년 9월 18일 오후 2시 11분 
whatever works for you man . i tend to avoid killing OS specific processes ;)
buddhapest 님이 마지막으로 수정; 2014년 9월 18일 오후 2시 11분
< >
29개 댓글 중 1-15개 표시
페이지당 표시 개수: 1530 50

게시된 날짜: 2014년 8월 18일 오전 2시 07분
게시글: 29