com.apple.iconServicesAgent

Discussion in 'OS X Mavericks (10.9)' started by Intelligent, Jul 11, 2014.

  1. Intelligent macrumors 6502a

    Intelligent

    Joined:
    Aug 7, 2013
    #1
    Now I'm tired of this process, it spits out errors all the time in Console and it uses a lot of ram (1GB) all the time. It has done this for a few months.

    Code:
    2014-07-11 15:02:42,820 com.apple.IconServicesAgent[226]: main Failed to composit image for binding VariantBinding [0x5db] flags: 0x8 binding: FileInfoBinding [0x173] - extension: eps, UTI: com.adobe.encapsulated-postscript, fileType: ????.
    
    Code:
    2014-07-11 14:59:02,137 com.apple.IconServicesAgent[226]: Icon filename entry missing from bundle info dictionary for bundle at URL: file:///System/Library/StagedFrameworks/Safari/WebKit.framework/Versions/A/XPCServices/com.apple.WebKit.Networking.xpc/
    
    These are the console errors that constantly pop up in the console.
     
  2. Intelligent, Jul 15, 2014
    Last edited: Jul 15, 2014

    Intelligent thread starter macrumors 6502a

    Intelligent

    Joined:
    Aug 7, 2013
    #2
    Here are the open ports and files
    Code:
    /
    /System/Library/PrivateFrameworks/IconServices.framework/Versions/A/XPCServices/com.apple.IconServicesAgent.xpc/Contents/MacOS/com.apple.IconServicesAgent
    /System/Library/ColorSync/Profiles/sRGB Profile.icc
    /private/var/folders/f8/r_k2kp0j63n6x6lp0wzddgt80000gn/C/com.apple.IconServices/ISCacheTOC
    /private/var/folders/f8/r_k2kp0j63n6x6lp0wzddgt80000gn/C/com.apple.LaunchServices-044501.csstore
    /usr/lib/dyld
    /private/var/db/dyld/dyld_shared_cache_x86_64
    /dev/null
    /dev/null
    /dev/null
    count=2, state=0x2
    ->0x6c8740b6d8f78d3f
    
    Creating a folder in /tmp/ named com.apple.iconservices seems to have fixed it, but that would be a temporary fix as the folder name suggests.
     
  3. Michaelgtrusa macrumors 604

    Joined:
    Oct 13, 2008
  4. grahamperrin macrumors 601

    grahamperrin

    Joined:
    Jun 8, 2007
    #4
    Observable icon services

    Those messages are level 4 – not errors. They're of potential interest to developers, and so on.

    (Debug is level 7; error is level 3; emergency is level 0.)

    Holistically, I'd say that Mavericks is no more hungry than Mountain Lion.

    Bear in mind, things are easier to measure in Mavericks. Loosely speaking:
    • without icon services in Mountain Lion, it's difficult to tell how the UBC (unified buffer cache) is used for icons
    • with icon services in Mavericks, things become noticeable.

    In Ask Different

    com.apple.iconServicesAgent using a lot of RAM in 10.9 – my answer.

    I expect that the benefits of icon services technologies will spill into a broader range of use cases when Apple introduces something better than HFS Plus.
     
  5. BradHatter macrumors regular

    Joined:
    Oct 7, 2014
    #5
    How can you tell from those error/warning messages what their level is? Just curious.

    Getting on with memory usage and IconServicesAgent, my gripe is this:

    Scannerz comes with a tool called Performance Probe which display memory used by applications in a pie-chart, similar to how it was in older versions of OS X. If I basically boot the system with nothing else running the pie chart shows 2G of RAM used. If I click on the Advanced Diagnostics tab to bring up the top memory consumers, it always shows IconServicesAgent using several hundred megs of memory, and it's usually about 300MB or more. If I open Activity Monitor and kill IconServicesAgent the pie chart in Performance Probe drops the corresponding amount, which to me confirms that yes, it really is eating up 300MB of RAM. By the way if you kill IconServicesAgent it will eventually get relaunched. Another thing it does is generate gigabytes of data in the /var directory. If I track all the IconServicesAgent files down, it will appear that I've just given myself gigabytes of free space, but fear not…IconServicesAgent will eventually kick in and while hogging the CPU up for about an hour, it will regenerate all those files all over again and I'm right back where I started.

    I have no problem with some background program generating icons and storing them on disk, my problem is why is it using so many resources. We're talking over 10GB of disk space and 300M of RAM just to generate icons. That just seems abusive to me.
     
  6. grahamperrin, Dec 30, 2014
    Last edited: Dec 30, 2014

    grahamperrin macrumors 601

    grahamperrin

    Joined:
    Jun 8, 2007
    #6
    Cache files for icon services are our friends

    The Info window of Console.

    (Interesting software. A window to its web page has been lurking in the background here for more than a week, I also saw it in June 2013.)

    Here, Activity Monitor shows that around 10 MB of real memory is used. It varies a little. Screenshots attached.

    That's proper. Related:

    Code:
    sh-3.2$ defaults read /System/Library/LaunchDaemons/com.apple.iconservices.iconservicesd.plist
    {
        Label = "com.apple.iconservicesd";
        LaunchEvents =     {
            "com.apple.dispatch.vfs" =         {
                "Monitor Low Disk Conditions" =             {
                    LowDisk = 300;
                    VeryLowDisk = 0;
                };
            };
        };
        MachServices =     {
            "com.apple.iconservicesd" = 1;
        };
        POSIXSpawnType = Adaptive;
        ProgramArguments =     (
            "/System/Library/CoreServices/iconservicesd"
        );
        RunAtLoad = 0;
    }
    sh-3.2$ 
    Yes, the cache files are stored in the user's temporary directory in that area. For this cacheing technology, it's not appropriate to store the files in the home directory.

    Attempting to manually clear the cache is counterproductive. It's proper for the operating system to create and make good use of this cache of files.

    That's where you should be :)

    bmike wrote:

    Usage here is around twenty percent of that. Figures will vary.

    [​IMG]

    Postscript

    The screenshot above is for the Mavericks startup volume alone. 131.76 GB used, on disk.

    My home directory is a separate file system with different characteristics. 280.25 GB used, on disk.

    For each file system there's a separate Core Storage logical volume. Both encrypted, different keys.
     

    Attached Files:

  7. BradHatter macrumors regular

    Joined:
    Oct 7, 2014
    #7
    Most of the Scannerz posts are probably mine. :D

    With that said, I opened the Advanced Monitoring window of Performance Probe and started Activity Monitor, then overlaid the Advanced Monitoring window right next to Activity Monitor so you can see real memory consumption. Maybe it's only 10M or so for you, but for me it's 372MB. Now you understand why I think this is abusive.

    Here's clipped the screenshot:
     

    Attached Files:

    • PPAM.png
      PPAM.png
      File size:
      85.6 KB
      Views:
      437
  8. grahamperrin macrumors 601

    grahamperrin

    Joined:
    Jun 8, 2007
    #8
    Towards an understanding

    Thanks. Good to see that the measurements presented by Scannerz are consistent with those presented by Activity Monitor .

    3.1 MB when I began this post, then up to 45.5 MB, then 1.7 MB, and so on. It varies according to what's done with the Mac.

    Please add a shot of the Memory page of Activity Monitor, in its entirety.

    Do you ever use the Mac with any Retina-capable hardware?

    What model is the Mac? Make and model of graphics card(s)?

    How many files in the /Applications directory?

    Here at the time of writing:
    • 46,261 files, presented by Disk Drill
    • 60,933,930,491 bytes (64.28 GB on disk) for 50,346 items, a few minutes later, presented by Finder
    – and I'll treat the discrepancy in measurement as negligible for this topic. Let's say, around 50,000 files here.

    Side note: in these screenshots of Disk Drill,
    /opt is a separate file system (not HFS Plus) on the same physical disk but in a different Core Storage LV from the LV that contains /Applications
     

    Attached Files:

  9. BradHatter macrumors regular

    Joined:
    Oct 7, 2014
    #9
    I don't have access to that machine right now because I'm at work. I also wanted to fool around with Yosemite on an external drive later.

    FWIW the system has more users than just me - one account for me personal, one account for me at work, one account for my wife, one account for my kid.

    I have noticed that with Mavericks there are often processes running associated with those users even though they're not logged in.

    Typically when I start IconServicesAgent it's memory use is much lower, like 250MB and within minutes it's grown to roughly 370MB. There was one and only one error in the system.log file stating it couldn't recognize some type of file format, but it doesn't identify the file. I'm doing that from memory.

    I also want to see if I run into this same problem on Yosemite.

    If I could clear this one memory hog up I'd consider using Mavericks instead of Mountain Lion. ML still seems faster but it seems to have just a few bugs, not show stoppers, but more like "Why didn't you guys fix that problem" type of things, and most of them seem Safari related.
     
  10. grahamperrin macrumors 601

    grahamperrin

    Joined:
    Jun 8, 2007
    #10
    More

    Processes for users who are not, or no longer, logged in to OS X

    That's consistent with the figure given in Ask Different.

    Similar to the one given above by Intelligent?
     
  11. BradHatter macrumors regular

    Joined:
    Oct 7, 2014
    #11
    I'll have to check. Right now (again) I'm not on that system. One thing I did note, right now I have a huge external drive connected to the system. As you may remember I've been experimenting with which OS to use, so this thing has part's on it for Lion, ML, Mavericks, and Yosemite. I noticed that when this drive wasn't connected to the system IconServicesAgent was down, but not down to your level of 10M.

    When fooling with Yosemite two days ago I noticed it's version of IconServicesAgent (which on it is all lower case) was only using about 10M of RAM.

    I'll copy and paste the error from the log file later tonight. It doesn't look like the same error.
     
  12. grahamperrin macrumors 601

    grahamperrin

    Joined:
    Jun 8, 2007
    #12
    Thanks

    Nope, I rarely remember things like that. So thanks for the context.

    More than the size of the external drive, the contents of the five system installations may be pertinent.

    I guess that the primary system, on your internal drive, is Mavericks. If so, I'd like that maximal screenshot of the Activity Monitor view of memory.

    On the external, were/are any of the four systems based on a copy of all or part of the primary/internal system? (E.g. does each of the four have a well-populated home directory and/or suite of additional applications?)

    Or are all four installations, on the external drive, almost clean?

    Any other external or networked drives, any other systems on the internal drive?

    Thanks. Whilst you're there, use the Inspector window of Console to view the message level.
     
  13. BradHatter macrumors regular

    Joined:
    Oct 7, 2014
    #13
    I didn't have time to do much more work with the system tonight. However, when I created each partition with each OS they all have clones of my home folder and the exact same set of applications installed. On Yosemite, some of them don't work, for what that's worth. Spotlight indexing is active on all of them. My home folders typically are running about 30GB. Extra applications were just re-installed on them, not cloned.

    Later, and thanks for the interest.
     
  14. grahamperrin macrumors 601

    grahamperrin

    Joined:
    Jun 8, 2007
    #14
    Relevance of icon services cached data to Spotlight+

    I don't expect indexing of metadata to have any effect on the sizes of the icon services caches, or on the amounts of memory used by icon services processes.

    (Visualise, for example: searching by name for an app. There, an index is used. Then …*how would you search for an icon? There's probably a database of the cached content, but that's not what's used when the eyes seek an icon.)

    Loosely speaking, I expect that icon services are more for things like Launcher (the visuals therein, not the search field) than for text-based Spotlight.

    Thanks :)
     
  15. BradHatter macrumors regular

    Joined:
    Oct 7, 2014
    #15
    I'm fooling around with all types of systems right now and it may be possible for me to create a fresh Mavericks partition on a system. If I do so I'll compare the iconServicesAgent memory use with what I'm seeing.

    Personally, it sort of looks like it might have attempted to open a large file it misidentfied, like an audio file, and is just hanging on to allocated memory.

    That's a guess. If true it would also be a bug. Maybe me needing hundreds of megabytes of RAM for it is a bug itself.

    Think Apple will ever fix it, or are they too busy apologizing for Yosemite?
     
  16. chrfr macrumors 604

    Joined:
    Jul 11, 2009
    #16
    It will never get fixed for 10.9.x. My understanding is that it is resolved in Yosemite. I recall reading elsewhere that bugs had been filed with Apple prior to the 10.10 release on this and the response was that it won't be fixed in 10.9.x. Now that 10.10 is shipping, 10.9.5 will only receive security updates.
    I manage an OS X server with about 1500 users in the directory. Currently it's on 10.9.5, and periodically, com.apple.iconservicesagent will run away, spawning hundreds of processes for many of the users in the directory (none of whom ever log into the server at the desktop, but connect only through file sharing.) The processes spawned are not necessarily from users who are, or have logged into the server, since its last reboot.
    Eventually all the RAM (16GB installed) is consumed and the server becomes unresponsive. Troubleshooting is difficult because nothing gets logged once the computer stops responding.
    Disabling Spotlight indexing on the server definitely mitigates the problem, but seems not to resolve it entirely.
     
  17. grahamperrin macrumors 601

    grahamperrin

    Joined:
    Jun 8, 2007
    #17
    I should not expect that to resolve it.

    If not indexing for Spotlight, any number of other things could cause a file (with its icon) to be read.
     
  18. chrfr macrumors 604

    Joined:
    Jul 11, 2009
    #18
    But the the point is (despite your editing my comment out of context) is that it does indeed have a relationship.
     
  19. grahamperrin macrumors 601

    grahamperrin

    Joined:
    Jun 8, 2007
    #19
    Context

    Sorry. I did get the point.

    The context, the single sentence paragraph from which I quoted, is immediately above the quote, and (if printed) there's unlikely to be a page break between the two.
     
  20. grahamperrin macrumors 601

    grahamperrin

    Joined:
    Jun 8, 2007
    #20
    Why no screenshot?

    Was there any reason for not taking, or not sharing, that screenshot?
     
  21. BradHatter macrumors regular

    Joined:
    Oct 7, 2014
    #21
    I'll try and get you one later today, but I should say that my mind is made up to stay with Mountain Lion rather than Mavericks or Yosemite.

    IMHO Yosemite just looks downright silly. It doesn't bother me so much that I would stop using Mac's but it certainly isn't an improvement. Yosemite is consuming at least 20% more memory and from what I've read/seen that extra 20%, or a significant portion of it is used (wasted) to support a gimmicky effect known as Translucency. One word - WASTE.

    Mavericks has IconServicesAgent. There are lots of posts on the web about it being a memory hog, so the problem isn't unique to me. However, lets say I post this screenshot and you say "A Ha! There's the problem!" it's not going to sway me from Mountain Lion. Why? Because in spite of Mavericks being a memory hog, especially with IconServicesAgent eating up 300M+ of RAM, IconServicesAgent is also generating somewhere between 11GB and 16GB of drive space just to support icon drawing. ARE YOU KIDDING ME??? 16GB of drive space to support icons????

    Once again - WASTE! No, SUPER WASTE! Yosemite has this problem as well.

    That's utterly ridiculous. A few years ago I had an old iBook with a 20GB hard drive on it and it was able to hold the OS, add on applications, and all my data with room to spare. Now you're telling me the OS needs to use almost that same amount to store icon information, and that's acceptable???

    That's GOT to be someone's sloppy programming or sloppy work. I have an SSD with 256G and I refuse to waste 6% of my space on icon storage. I assume as time progresses, so will the icon information, and eventually that will become 10% or more....all to store icons.

    The only reason Apple keeps doing what's become crappy work is because people are willing to accept inferior products from them. The "We need a yearly update" strategy when the products often don't work or work poorly is absurd. Every initial release of OS X since Lion has been buggy, with the bugs getting more numerous, more serious, and more rampant with each release. Eventually they fix them, but why are they releasing "broken" products anyway? Just look at all the complaints about Yosemite in the App Store.
     
  22. BradHatter macrumors regular

    Joined:
    Oct 7, 2014
    #22
    Here's your screenshot. This is right after startup, and IconServicesAgent is already using in excess of 240MB. This time, no other user accounts have been activated, just mine with my user ID blacked out for obvious reasons. Basically, nothing is running except FireFox. It will do this even if nothing (including Firefox) is running. I compressed the original tiff to jpg fairly high compression but it's still readable, just a little blurry.

    Do you ever use the Mac with any Retina-capable hardware? It's never used with any Retina capable hardware

    What model is the Mac? Make and model of graphics card(s)? 2009 MacBook Pro, often used w/HannsG 19" external display. Graphics chip is NVIDIA GeForce 9400M.

    How many files in the /Applications directory? I have 77 applications in the Applications folder consisting of 213312 files.
     

    Attached Files:

    • AM.jpg
      AM.jpg
      File size:
      91.9 KB
      Views:
      453
  23. grahamperrin macrumors 601

    grahamperrin

    Joined:
    Jun 8, 2007
    #23
    No hogging of memory

    Thanks – the screenshot shows free memory, no swap used and so on (as can be expected so soon after startup) – not a problem; no hogging.

    Of greater interest will be the amounts of memory used by the agent when the system prioritises things other than the agent. If you can (if anyone can), a screenshot of the memory page of Activity Monitor – including the agent(s) – at a time when a problem with overall use of memory is perceived.

    At the moment, I have the agent using 928 KB memory, 6.1 MB real memory (screenshot attached). I might take another screenshot fairly soon after I next reboot the system. Neither a problem with the agent, nor a problem with overall use of memory (the pressure is as expected in my environment).
     

    Attached Files:

  24. TheBSDGuy macrumors 6502

    Joined:
    Jan 24, 2012
    #24
    The problem is fairly common with developers because they have multi-boot systems. If I recall correctly you (BradHatter) are using a multi-boot system because you're playing around with multiple operating systems. What's likely happening is that you've got indexing enabled on some of the volumes containing Lion and/or Mountain Lion. If you don't have indexing enabled on them, don't waste your time reading the rest of this post. If you do, do the following:

    1. Open up the Terminal.app application.

    2. Type in the following command exactly as listed below:

    mdfind com.apple.quicklook -name .plist

    3. If this returns files on some of your other OS X version's volumes, especially the volumes for Snow Leopard, Lion, and Mountain Lion then IconServicesAgent is likely reading them, not knowing what to do with them, and getting confused, and may even be locking up.

    4. Eject any of the volumes that have other quicklook files. Remember, this is only an experiment.

    5. Kill IconServicesAgent using:

    killall -KILL com.apple.IconServicesAgent

    6. Open finder and try navigating via the Finder GUI to a directory you've never visited before. This should trigger the launch daemon to relaunch IconServicesAgent. You can monitor this with Activity Monitor, Performance Probe, top, ps, or whatever you want.

    7. When IconServicesAgent restarts, after becoming stable it should be using about 1/10th of the memory it was using before. It will vary as it processes. If you have a multiuser system and have two or more sessions active with users it will still use more memory than normal, but generally the memory used by IconServicesAgent should be substantially reduced.

    For a general fix, you could exclude other volumes from mds/Spotlight indexing, and another would be to write a script and launch it at startup to unmount those drives from mounting that have the files.

    It worked for me, and I think you'll find Mavericks is now using about the same amount of RAM as Mountain Lion, and you'll probably notice a slight performance increase. This may also cut down on some of the space used to store icon information.
     
  25. BradHatter macrumors regular

    Joined:
    Oct 7, 2014
    #25
    THAT WORKED!!! Finally, a solution to something that's been bugging me for a year!!!

    I couldn't understand how anyone could call Mavericks less of a memory hog than Mountain Lion but I can see it now. Have an unneeded load of nearly 400MB strapping you down is enough make anyone take a look at an OS and run.

    I'll run this for a while and check the memory status of IconServicesAgent. Generally it seems to be hovering at about 30MB. Less than 1/10th what it was before.
     

Share This Page

30 July 11, 2014