Was trying to finish some work last night and my Mac OS/X developer release had an issue with an open file limit. First time I ever experienced this on a Mac. Then again I don’t use OS/X for server applications. I started to look into it and realized that it was slightly different from Linux and Solaris and many of the web pages out there were just wrong. I wish they would put dates on web pages and you could simply score the web page with a -1, 0, +1 so they start to fade away. I think I spend some percentage of my day on stale content.
I looked at my current limits and that told me nothing. That is another opportunity for improvement of the operating system CLI. Link the commands together in someway so that the purpose of the command and other relevant commands are shown when they are needed.
I used one of my favorite commands lsof, to get a sorted list by count of all the open files. If only the Big Data people would take some time to come up with some model to process data so that one could manipulate large datasets easily and get results without the convolutions we go through. I listed all the processes that have over 100 open files. Why do they have 100 open files? It is mind boggling to think of the lack of thought going into programs. Maybe it is an indication of OO and layered frameworks gone wild. Perhaps that maxim – Don’t need to know about what the object is doing ignores constraints.
launchctl limit cpu unlimited unlimited filesize unlimited unlimited data unlimited unlimited stack 8388608 67104768 core 0 unlimited rss unlimited unlimited memlock unlimited unlimited maxproc 709 1064 maxfiles 256 unlimited
lsof | cut -f 1 -d ' ' | sort | uniq -c | sort -n -r3153 Google 911 Skype 891 java 731 Microsoft 661 com.apple 606 Dock 491 SystemUIS 363 launchd 347 Mail 332 Finder 296 UserEvent 293 webide 273 vmware-vm 271 iPhoto 268 cfprefsd 246 httpd 233 Adium 232 mds_store 189 VMware 178 mDNSRespo 150 Dashboard 141 kav 118 OpenVPNCo 116 xpcd 115 iTerm 109 mds 109 filecoord 102 AirPort
So how do you find out what resources a Google page/tab is using?
(Bug: We seriously overcount our own memory usage: Issue 25454.)
That doesn’t tell me what resources a plugin is using which by the way might be an indicator about applications resources on my machine. It is a disturbing architecture, You want to trust the Google brand and they let addons and plugins run with very little control throwing away decades of operating system research. Effectively punting and relying on the core underlying operating system. KISS is not the answer to all problems. Kind of like the oil companies relying on the Federal Government for disasters instead of having their own emergency response teams.
So I restarted Chrome. the dumb computer can’t even tell me what is wrong with it. I am not going to waste my time on it. Yes it should know that this program is not behaving normally and tell me “LOOK HERE“.
On startup Chrome has over 2500 files open. That is 2500 paths for something to write on my disk. I can at least get back to my day job. Probably need to find the plugin/extension that is responsible for this someday. I hope it is not doing something bad. Then again maybe this is the new normal. Yuck.