What's causing all the disk activity on OS X?
--
Music by Eric Matyas
https://www.soundimage.org
Track title: Puddle Jumping Looping
--
Chapters
00:00 Question
00:37 Accepted answer (Score 62)
01:35 Answer 2 (Score 51)
01:50 Answer 3 (Score 2)
02:24 Answer 4 (Score 1)
03:12 Thank you
--
Full question
https://superuser.com/questions/89266/wh...
Answer 2 links:
[locate]: https://developer.apple.com/library/mac/...
Answer 3 links:
[fs_usage]: http://developer.apple.com/mac/library/D...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#macos #mac
#avk47
ACCEPTED ANSWER
Score 62
From man iotop
:
iotop tracks disk I/O by process, and prints a summary report that is refreshed every interval.
This is measuring disk events that have made it past system caches.
Since this uses DTrace, only the root user or users with the dtrace_kernel privilege can run this command.
This may not be precisely what you want - but it's a ksh script which wraps around dtrace, so you should be able to figure out how to make dtrace do what you need, if iotop doesn't handle it by default.
However, something like iotop -C 5 12
should give you something to start with: it will output 12 samples, each 5 seconds long.
ANSWER 2
Score 51
You can also use fs_usage
to get a blow-by-blow account of what apps are hitting the disk.
ANSWER 3
Score 2
I always noticed this on Saturday mornings, and it turned out to be locate
, which updates its database at 3:15am on Friday nights.
I tried disabling its launchd
configuration (in /System/Library/LaunchDaemons/com.apple.locate.plist
), but it still ran anyway, so I just moved /usr/libexec/locate.updatedb
out of the way. Problem…mitigated.
ANSWER 4
Score 1
It might be the OS paging to virtual memory instead of something application specific. You might try quitting less frequently used applications or at least restarting some applications that like to build up in-memory caches over time (e.g. Safari). Check out the various per-process memory statistics with Activity Monitor to find likely culprits. If quitting some memory intensive applications seems to temporarily alleviate the problem, you might try adding RAM.
If the disk activity is not paging related, you might be able to use fs_usage
to track it back to one or more specific processes.