9

I've got a late-2009 Mac mini that has begun to perform very poorly after some time on Yosemite. Safari takes about a minute to launch occasionally, as an example.

Granted, I've got a number of background tasks running (Dropbox, BitTorrent Sync, AirServer), but that's unchanged compared to before upgrading to Yosemite.

My main suspect is the very high network usage. The process kernel_task is using a lot of LAN bandwidth, occasionally downloading 60 MB (that's megabytes)/s for a few seconds before going down to zero, for no apparent reason. The total amount of bandwidth used has exceeded 14 terabytes (!) after a couple of weeks of uptime.

I've got a NAS that I use for sharing files and backups, but since the process using the bandwidth is kernel_task, I don't know what to think.

Update: As a temporary workaround I have setup a script to clear the systemstatsd files mentioned below regularly, but the root cause remains unresolved.

Today I noticed three things:

  1. In three days, total downloaded data amounts to 3,300 GB.
  2. Currently, approximately every 12 seconds there is a boost in network activity, where something maxes out the Ethernet interface for a couple of seconds.
  3. Quitting the BitTorrent Sync app made item number 2 go away.

My theory is then: there's some bug in BitTorrent Sync that causes it to go nuts on the network, which in itself uses quite some system resources. This in turn causes systemstatsd to hiccup, which creates the final burden on the system.

  • did you check who is using your network? could you look in the activity monitor, and in the console to get some more info on what is going on? – Ruskes Dec 31 '14 at 9:03
  • use lsof -i in Terminal to get more info! – Ruskes Dec 31 '14 at 9:04
  • kernel_task is using the bandwidth, according to Activity Monitor. 1,7 TB during 22 hours uptime. Nothing else comes close. Interestingly, systemstatsd has written 1,53 TB to disk during the same period. – Frost Dec 31 '14 at 14:52
  • Thanks, so to compare my systemstatsd is =0 (zero) after 50 hours, Last time I rebooted was like 2 weeks ago. Usage normal, like Firefox (this site) lots of browsing,+ Mail,+ Skype just to name main ones. So lets find out what is your systemstatsd doing ? – Ruskes Dec 31 '14 at 18:43
  • You also mentioned having bitTorrent running - could that be related? – Cullub Dec 31 '14 at 20:34
8

The culprit was indeed systemstatsd. The way I understand it, that process both produces a number of system stats, dumps them into a file which it later analyzes. For some reason, that file never got reset, resulting in a giant stats file that took serious resources to analyze.

What I did was stop the analysis daemons, sudo launchctl stop com.apple.systemstatsd sudo launchctl stop com.apple.systemstatsd.analysis

remove the stats dump file (which was about 3 gigs in size at the time) cd /private/var/db/systemstats/ sudo rm snapshots.db

relaunch the daemons sudo launchctl start com.apple.systemstatsd sudo launchctl start com.apple.systemstatsd.analysis

I never figured out why that dump file never got cleared, but suspect it'd something to do with the PRAM, so for good measure I finally reset it by rebooting and pressing CMD, ALT, P, R when the boot chime was heard until it was heard a second time.

The end result is a mac that is very much snappier than before. Here's hoping that zapping the PRAM did eliminate the root cause.

Further reading: What is the use of snapshot.db?

1

Your systemstats seems to be running out of control, that would explain sluggish operation.

The systemstats process is used to retrieve information about system statistics and power usage

Just to compare I have systemstatsd at 0% CPU usage on my MBA with Mavericks after 50 hours of CPU time. And for the disk usage is 18 MB (from a Total of 45 GB), so no TB's.

You can help it by resetting it.

Copy paste following in your Terminal that is located in your Utility folder.

sudo killall systemstats

enter your log in password when asked.

Or if you do not like using Terminal use the Activity Monitor window:

Select the errant systemstats process and choose the (x) button to force quit.

PS

Yes there are 2 processes, the systemstasts and the systemstatsd.

*

What could be causing it: Generally, there’s nothing to concern yourself with if you see systemstats spike up Activity Monitor or top for a short amount of time, and many standard Mac functions may cause it to temporarily appear. For example, the systemstats process is triggered on the MacBook line by looking at the Energy usage option from the OS X battery menu, and other users may see it briefly when adjusting other Energy settings. The problem arrises when the process is running constantly at very high CPU usage for no apparent reason.

  • You might want to check your Energy usage, your battery ect.. or do a SMC reset.

-1

We have a late 2009 Mac Mini. I bumped memory up from 2G to 8G and it seems to have fixed the problem. Of course it cost $90. Ordered memory at Crucial.com and used this very clear video to do installation (requires some care and some technical aptitude, but not professional skill): https://www.youtube.com/watch?v=5KaHNLR6Aac

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .