I have an application that launches two IntentService. I performed some current drain measurement and found out that if I launch one service that perform audio recording and audio analysis the current consumption is about 65mA. If I launch the other one that perform BLE scan the current drain is about 85mA. If the two IntentService are running simultaneously, I have a current drain of 200mA. I measured this on Samsung SIII with Android 4.3. Also in Nexus 5 Android 4.4.2 the battery is drained when the two services are running together. I am not using wakelock. Is there an explanation for this? Is it possible to save battery life? The two IntentService are not using Network connection at all, they don't send data.
-
"I measured this on Samsung SIII with Android 4.3" -- how? Using a multimeter? "Is there an explanation for this?" -- audio recording, audio analysis, and BLE scans will consume battery, by definition. – CommonsWare Mar 19 '14 at 14:06
-
1I have added a 0.125 ohm in series between power supply and used DMM as voltmeter to detect current consumption. What I want to know is why the two process together are consuming a lot more that each one running alone. – Sfavilla Mar 19 '14 at 14:12
-
Spinlock on something? – Martin James Mar 19 '14 at 14:38
-
Modern mobile CPUs have ways to save power such as by changing clock speed. When you have several things going on at the same time, the CPU has to do much more work, so might need to rev up. – Sofi Software LLC Mar 19 '14 at 17:18
1 Answers
As the processing load increases, the system and the CPU respond by adjusting the number of active cores and the clock of those cores. The two tasks (intents) compete for memory access, may cause cache misses, and we add to that I/O requests; the complexity of operation does not scale linearly with the sum of these pieces.
Process scheduling is quite a complicated question. The Linux behind Android was originally designed to be time-efficient, not power-saving. Reducing running time was the main preoccupation of its design, and also remains so in the famous "A decade of wasted cores" study (DOI 10.1145/2901318.2901326).
I'd bet on CPU clock as the villain. No certitude at all (sorry); but another article published a few years after this question was posted here goes on the same direction (it describes tests on a Nexus 7, the question mentions a Nexus 5): DOI 10.1109/CANDARW.2018.00112.

- 115
- 1
- 5