How much power does Visual Look Up use?
Look in the log, and Visual Look Up (VLU) on an Apple silicon Mac apparently involves a great deal of work, in both CPU cores and the neural engine (ANE). This article reports a first attempt to estimate power and energy use for a single VLU on an image.
To estimate this, I measured CPU, GPU and ANE power in sampling periods of 100 ms using powermetrics
, and correlated events seen there with those recorded in a log extract over the same period, obtained using LogUI. The test was performed on a Mac mini M4 Pro running macOS 15.6.1, using Preview to perform the VLU on a single image showing a small group of cattle in an upland field. Power measurements were collected from a moment immediately before opening the image, and ceased several seconds after VLU was complete.
When used like this, powermetrics
imposes remarkably little overhead on the CPU cores, but its sampling periods are neither exact nor identical. This makes it difficult to correlate log entries and their precise timestamps with sampling periods. While powermetrics
gives power use in mW, those measurements aren’t calibrated and making assumptions about their accuracy is hazardous. Nevertheless, they remain the best estimates available.
Log narrative
The first step in log analysis was to identify the starting time of powermetrics
sampling periods. Although execution of that command left no trace in its entries, as it has to be run with elevated privileges using sudo
, its approval was obvious in entries concluding30.677182 com.apple.opendirectoryd ODRecordVerifyPassword completed
A subsequent entry at 30.688828 seconds was thus chosen as the start time for sampling periods, and all times given below as given in seconds after that time zero.
The following relevant events were identified in the log extract at elapsed times given in seconds:
- 1.3
com.apple.VisionKit
Signpost Begin: “VisionKit MAD Parse Request” - 1.3
com.apple.mediaanalysis
Running task VCPMADServiceImageProcessingTask - 1.4 ANE started and an ObjectDetectionModel run for 0.2 s
- 1.6 ANE activity and a NatureWorldModel run for 0.25 s
- 2.0 ANE activity for 0.15 s
- 2.4 ANE activity for 0.1 s
- 8.1 ANE activity and a UnifiedModel run for 0.01 s
- 8.1 PegasusKit queried Apple’s SMOOT service, the external connection used to populate the VLU window.
Thus, the ANE was run almost continuously from 1.4-2.2 seconds after the start of sampling, otherwise was used little over the total period of about 9 seconds. Over that period of activity, an initial model used to detect objects was succeeded by a later model to identify objects in a ‘nature world’.
Power and energy estimates
From the log record, it was deduced that the VLU was started in powermetrics
sample 10 (1.0 seconds elapsed), and essentially complete by sample 75 (7.5 seconds elapsed), a period of approximately 6.5 seconds, following which power use was low until the end of the sampling periods. All subsequent calculations refer to that series of samples and period of time.
Sums, averages and maxima of power measurements for that period of 6.5 seconds are:
- CPU 64,289 mW total, 989 mW average, 7,083 mW maximum (10 P cores)
- GPU 3,151 mW total, 48 mW average, 960 mW maximum (20 cores)
- ANE 1,551 mW total, 24 mW average, 671 mW maximum
- total 68,991 mW total, 1,061 mW average, 7,083 mW maximum.
Thus for the whole VLU, 93% of power was used by the CPU, 4.6% by the GPU, and only 2.2% by the ANE.
For comparison, in the M4 Pro chip running maximal in-core loads, each P core can use 1.3 W running floating point code, and 3 W running NEON code. The chip’s 20-core GPU was previously measured as using a steady maximum power of 20 W, with peaks at 25 W.
As each power sample covers 0.1 seconds, energy used during each sampling period is power/0.1, thus the total energy used over the 6.5 second period of VLU is:
- CPU 6.4 J
- GPU 0.3 J
- ANE 0.2 J
- total 6.9 J.
Those are small compared to the test threads used previously, which cost 3-8 J for each P core used.
Power over time
Power used in each 100 ms sampling period varied considerably over the whole 10 seconds. The chart below shows total power for the CPU.
Highest power was recorded between samples 10-25, corresponding to 1.0-2.5 seconds elapsed since the start of measurements, and most events identified in the log. Later bursts of power use occurred at about 4.2 seconds, and between 6.6-7.1 seconds, which most probably corresponded to opening the info window and performing the selected look-up.
Almost all power use by the neural engine occurred between 1.5-2.1 seconds, correlating well with the period in which substantial models were being run.
Peak GPU power use occurred around 1.0-1.5 seconds when the image was first displayed, at 3.1-3.2 seconds, and between 6.5-7.4 seconds. It’s not known whether any of those were the result of image processing for VLU as GPU-related log entries are unusual.
Composite total power use demonstrates how small and infrequent ANE and GPU use was in comparison to that of the CPU.
Conclusions
Given the limitations of this single set of measurements, I suggest that, on Apple silicon Macs
- power and energy cost of VLU is remarkably low;
- the great majority of work done in VLU is performed in the CPU;
- although use of the neural engine may result in substantial performance improvements, VLU doesn’t make heavy demands on the neural engine in terms of power or energy use;
- VLU may appear impressive, but it’s not actually that demanding on the capability of the hardware.