Lots and lots of system time
William H. Magill
magill at me.com
Sat Oct 29 10:57:25 PDT 2011
On Oct 29, 2011, at 10:54 AM, Harald Hanche-Olsen wrote:
> Please pardon me if this is off topic, but it is about a phenomenon I
> only see when macports is compiling software: So I'd like to hear if
> other macports users are seeing the same:
>
> Namely, that the majority of CPU time while compiling is system time,
> not user time. Right now, for example, I am compiling gimp2, and top
> says
>
> CPU usage: 10.34% user, 86.20% sys, 3.44% idle
>
> It did not use to be this way. Unfortunately, several things got
> upgraded about the same time, so I am not certain which one to blame:
> The OS to Lion, and XCode and macports itself.
>
> Does anyone else see this? Can you come up with a possible explanation
> off the top of your head?
>
> I thought it might be possible to play around with dtrace to find out
> what system calls are sucking up all the time, but my dtrace-foo is
> rather limited.
>
> The system is a 13 inch MacBook Pro with SSD, not a HD. I have
> full-disk encryption enabled, but I am pretty sure this started before
> I turned it on.
I have not noticed this particular situation, however based on experiences with OSF from years ago,
I know that what is considered "System time" vs "User time" is in reality quite different than what
most expect it to be… and easily changed.
Since you indicate that you have an SSD, my immediate assumption goes to "What does an SSD look
like to the OS?" I do not know the code, but I would guess that an SSD is NOT using the same code
path which a "disk" uses, but rather that which "memory" uses. Or put another way, all of the structures
which process I/O for a rotating disk have timings in them which are not relevant to an SSD, and which
in fact would impede its performance.
So I would assume that the "SSD reads/writes" are based on "memory read/writes" and are therefore
"read" as part of "System Time."
Quite frankly, I would suspect that Apple's developers never even looked at the issue.
For my 40+ yeas in the business ALL "accounting" is an add-on "after thought." It is never designed
in from the beginning, and the tools to process what little data is available are basically unchanged
since Dennis Richie, et.al first wrote Unix. It is a sad state of affairs, but sadly true.
T.T.F.N.
William H. Magill
# iMac11,3 Core i7 [2.936GHz - 4 GB 1333] OS X 10.7.2
# iMac6,1 Core 2 Duo [2.16GHz - 3 GB 667] OS X 10.6.8
# MacBook Pro4.1 Core 2 Duo [2.5GHz - 4GB 667] OS X 10.6.8
# Mac mini Core Duo [1.66 Ghz - 2 GB 667] OS X 10.6.8
# Flat-panel iMac (2.1) [800MHz - Super Drive - 768 Meg] OS X 10.4.11
# PWS433a [Alpha 21164 Rev 7.2 (EV56)- 64 Meg] Tru64 5.1a
# XP1000 [Alpha 21264-3 (EV6) - 256 meg] FreeBSD 5.3
# XP1000 [Alpha 21264-A (EV6-7) - 256 meg] FreeBSD 5.3
magill at mcgillsociety.org
magill at me.com
whmagill at gmail.com
More information about the macports-users
mailing list