Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm experiencing some significant OS X lag when listing directories/files. I originally thought it was purely an issue with Finder, and not the HD or any other part of OS X, however I have since noticed some file access lag with other apps, such as Versions and The Unarchiver, so I really have no idea where the problem lies.

The lag predominately appears to be when listing directories/files in Finder, where I'm seeing anything up to twelve or so seconds of lag (the folder opens with a blank list and the spinner going in the bottom right).

  • This happens on two different (albeit very similarly configured) computers
  • This happens with both the local SSD and network drives (connected via ethernet or wifi)
  • Browsing both local and network drives in terminal and listing directories is instant
  • I can actually browse files on my NAS from my phone over a 3G connection from the other side of the country faster than Finder can while connected to the local network

Can anyone help? Thanks.

EDIT:

After testing with the fs_usage command, it appears to be launchd that's slowing things down. These two lines appeared just after opening two directories that took a very long time to list:

13:23:58.528825  select         S=1       4.493972 W launchd.1347
13:24:58.572283  select         S=1       9.954218 W launchd.1347

Any thoughts?

2nd EDIT:

Further fs_usage log with some additional entries:

13:44:26.172945  select           S=1           1.157757 W Finder.4854
13:44:32.653263  select           S=1           9.987226 W launchd.1345
13:44:32.686134  select           S=1           1.327516 W dbfseventsd.3639
13:44:42.152977  select           S=1           9.473943 W launchd.1345
13:44:42.173888  select           S=1           9.487425 W dbfseventsd.3639
13:44:46.135971  select           S=1           19.926955 W Finder.4854
13:44:47.623476  select           S=1           1.472648 W Finder.4854
13:44:48.718721  select           S=1           2.344869 W dbfseventsd.3639
13:44:52.657413  select           S=1           1.615911 W launchd.1345
13:45:12.591938  select           S=1           15.687167 W launchd.1345
13:45:15.359595  select           S=1           2.747797 W dbfseventsd.3639
share|improve this question
    
Have you tried disabling document previews? –  Lauri Ranta Nov 8 '12 at 4:31
    
Thanks, I've turned that off, and cleaned out all the .DS_Store files that so all folder views reset, will see hoe it goes... –  Jack Sleight Nov 9 '12 at 11:23
    
Sadly this has not helped. –  Jack Sleight Nov 13 '12 at 13:17
add comment

1 Answer

The comments have already hit upon some common reasons why Finder will become slower such as corruption or a large .DS_Store file or a large number of documents that will cause the system to display previews of each.

If you really want to trace the IO, you can use the fs_usage command to dump all filesystem activity to a terminal window and optionally grep out results from programs you don't care about and also discarding all the short IO to get a picture of what IO are taking more than a hundredth of a second to complete.

sudo fs_usage -w | grep -v grep | grep -v 0.00

In your edit to your question, the slow IO are not looking like anything suspicious. You can't really get away from launchd - if it is blocking your IO in finder - that would be because the network filesystems are not responding (or the networking is having issues with packets being delayed for very long times).

Sadly, you may need to browse from the phone client if it really is that much faster than Finder and keep watching the IO. Perhaps if you disconnect all network shares, you might see the slow IO go down and be able to conclude you really have a networking delay / problem rather than a Finder / CPU / local problem. I was hoping something would look amiss in the fs_usage dump - but your results seem normal to me as posted.

share|improve this answer
    
Thanks, I'll give it a go! –  Jack Sleight Nov 13 '12 at 13:17
    
I've given it a go, "launchd" seems to be the problem (see my edit above). I don't know what that is though? –  Jack Sleight Nov 13 '12 at 13:27
    
Time to wrap this up. Sadly fs_usage didn't get me anywhere, but after monitoring Activity Monitor I did notice that coreservicesd was using a lot of CPU while browsing through Finder. A quick Google lead me here, and after going through that entire list local disk access is much snappier now. The same can't be said for network shares sadly, so that must be a separate, unresolved issue. As you provided the most help and pointed me to fs_usage (handy in future) I'll give you the bounty. Thanks for your help. –  Jack Sleight Nov 20 '12 at 10:44
    
Thanks for the nod - feel free to choose your own answer or edit mine severely - I'd rather the site have what worked for you even if it's another answer or only the history of my suggestion remains. –  bmike Nov 20 '12 at 18:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.