Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

With Mac OS X 10.7 (Build 11A411) alone, or with Xcode 4.1:

Q: is there a way to accurately measure, or at least estimate the CPU load associated with Core Storage?

A graphical view of load on a timeline would be useful but not essential.

I would be equally happy with useful results from something run at the command line.

Distinguishing this question from others

Popularly-referenced (and well written) sources such as Mac OS X 10.7 Lion: the Ars Technica review (page 13) (2011-07-20) discuss uses of the CPU in ways that are reassuring, for example:

… Whole disk encryption takes advantage of this nearly omnipresent CPU cycle glut to sneak in the tiny chunks of work it requires to encrypt and decrypt data from the disk. Apple also leverages the special-purpose AES instructions and hardware on Intel's newest CPUs, further reducing the CPU overhead. The end result is that regular users will be hard-pressed to notice any reduction in performance with encryption enabled. …

In AnandTech — Back to the Mac: OS X 10.7 Lion Review (page 18) (2011-07-20) there's benchmarking and performance, and screenshots of a CPU graph in Activity Monitor, but those graphs are too broad for this question: any number of things could contribute to peaks of activity. Another set of benchmarks: Filevault 2 Benchmarks : Max Cho (2011-07-22). And so on.

In this question I am:

  • less interested in benchmarks, less interested in performance.

More interested in:

  • Core Storage-related load on CPU that is, I suspect, not presented by Activity Monitor.

Possible relationships to other questions

Not limited to Ask Different, some users of Lion observe occasions when running of fans to cool the CPU is inexplicably high for the detectable load on CPU.

An answer to this question might help us to assist with questions elsewhere. Currently on my radar:

Use cases

I would probably begin with measurements during:

  1. forward conversion with passphrase encryption
  2. forward conversion without encryption
  3. backward conversion with decryption
  4. backward conversion without decryption.

(Around this time — less than two weeks since Lion was released — forward conversion may be most commonly encountered after beginning FileVault 2 encryption of a startup volume, or after beginning Time Machine encryption of a backup volume, but there can be many other applications of Core Storage.)

Notes

Apple's manual page (not yet published) for corestoraged(1) offers the following description:

corestoraged manages CoreStorage volumes. It is invoked by launchd(8) when a CoreStorage volume needs management.

— so whilst corestoraged appears in Activity Monitor, CPU load for that process alone is probably not an indicator of everyday (non-management) uses of Core Storage.

There's the kernel extension, /System/Library/Extensions/CoreStorage.kext but currently in Apple's Kernel Extension Programming Topics there's only one reference to CPU and honestly, I lack the skills to interpret most documentation for developers.

A 2011-07-22 post Re: [Fed-Talk] Lion FileVault (highlights) draws attention to kernel_task but as far as I recall, that process has not been noticeable to me whenever my CPU is hot without explanation.

Not ruling out the possibility of greater attention to kernel_task … an answer to a different question led me to experiment with fs_usage but it seems not applicable to pid 0.

Thank you!

share|improve this question
    
Following a hint in Ask Different Chat I searched Stack Exchange and Super User. No clearly matching questions or answers were found. –  Graham Perrin Aug 1 '11 at 0:55
1  
This is out of my depth, but have you looked into dtrace? It seems designed to capture the information you're looking for. –  Kyle Cronin Aug 2 '11 at 6:35
    
I'm familiar with opensnoop use of dtrace, but I suspect that opensnoop can not work at the required level(s). Learning more about dtrace itself is probably out of my depth at the moment, without certainty that I'm barking up the right tree(s). However: if someone can come up with a dtrace (or related) command that will help us to measure, that could inspire me to focus my learning … –  Graham Perrin Aug 2 '11 at 10:43

1 Answer 1

iotop would be the first place to go if Activity Monitor wasn't getting you an answer. It uses dtrace instead of the activitymonitord and has far superior probing skills without the "needing to learn DTrace" part.

Instruments would be my second choice but it has so many presets, it might be some probing until someone answers with an easy 1, 2, 3 to reveal the specific workload of FileVault 2.

share|improve this answer
    
Thanks. A day or so ago I did toy briefly with Instruments. CPU System Trace template, without knowing whether it's appropriate. That 1, 2, 3 is what I'm hoping for. OTOH maybe I simply haven't paid close enough attention to Activity Monitor (kernel_task ?) at the appropriate times. Off-topic, since you mentioned Darwin before joining me here: chat.stackexchange.com/transcript/message/1534196#1534196 ;-) –  Graham Perrin Aug 4 '11 at 17:12

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.