Heleron Technologies
  • Home
  • Services
  • Android Apps
  • Download
  • Blog
  • Forum
  • Contact

Fooled by battery percentages 2

9/26/2013

3 Comments

 
Android provides you with some information about how much battery power your apps are consuming. If you go to Settings->Battery, you will find a list of apps, and a percentage for each app.

In the previous post, we described how the percentage value only tells you how much battery is consumed relative to the other apps running on your device.

In actual fact though, it doesn't even tell you this. The problem is that there is no hardware for measuring the power consumption. Instead, Android makes an estimate of the power consumption based on some assumptions and calculations.

These assumptions are specified by the manufacturer of the device, and given as constant values to Android. For example "wifi.scan" tells Android how much power the wifi chip uses when doing a scan. The parameter "cpu.active" tells Android how much power the CPU consumes when it is running. The parameter "screen.on" tells Android how much power the screen consumes when it is on.

So how does Android calculate the power used by an app? It assumes that the longer the app is running, the more power it consumes. So, it measures the total length of time that the app has been running and multiplies this by the power consumption of the cpu ("cpu.active").  This gives us an estimate of the cpu power consumed by the app.

If the app does wifi scanning, then it counts the number of scans and uses the "wifi.scan" parameter to calculate the power consumed by the wifi chip. This is added to the total power consumed by the app.

This sounds all very reasonable, but unfortunately can lead to very confusing results, when the same app on one device suddenly appears to consume much more power when installed on another device.

Let's take an example - the Samsung Galaxy Nexus compared with the Samsung Galaxy S4. The following table lists the values supplied by Samsung, (stored in the "Power Profile" resource file).

Power consumption Parameter Galaxy Nexus Galaxy S4
CPU power cpu.active 397 mA 118 mA
Wifi scan power wifi.scan 100 mA 120 mA
Screen power screen.on 200 mA 120 mA

From the table, it seems the S4 wifi chip consumes 20% more power than the Nexus wifi chip (120 mA vs 100 mA). You might therefore expect the battery consumption of a wifi app to be 20% more on the S4, for example Android would show 6% instead of 5% on the Nexus.

Unfortunately not, the difference is much greater than 20%. This is because when Android does the calculations, it compares the wifi app with other apps that use the cpu intensively and leave the screen on.

Consider the calculation for the Nexus. The cpu activity (397 mA) consumes four times the power of wifi scanning (100 mA), and the Nexus screen (200 mA) consumes twice as much power as wifi scanning. So an app that has a lot of cpu intensive activity, or leaves the screen switched on, is going to consume much more power than an app that only does wifi scanning.

Now let's look at the Samsung Galaxy S4. The parameters are very different. Here, the amount of power consumed by wifi scanning (120 mA) is more than the power consumed by cpu activity (118 mA) and the same as the power consumed by screen on (120 mA)!

A wifi scanning app running on the Nexus compared with the same app running on the S4 appears to consume almost FOUR times the amount of power than an app using cpu power, and TWICE the amount of power than an app that leaves the screen on.

This is of course very misleading, and makes you think that the wifi app on the S4 consumes far far more power than the same wifi app on the Nexus.

As for the accuracy of the parameters given by Samsung, can it really be true that the quad core 1.9ghz cpu of the Galaxy S4 uses less than a third the power of a dual core Galaxy Nexus 1.2ghz, even taking into account the advance of technology? Can it be true that the 1920x1080 display of the Galaxy S4 uses only 60% of the power of the 1280x720 Galaxy Nexus? And yet the wifi uses 20% more power?

A description of the "Power Profiles" can be found here:

https://source.android.com/devices/tech/power.html
3 Comments

Avoid overlapping channels

7/29/2013

5 Comments

 
This post explains how you can maximize your network speed by choosing the best channel numbers for your access points (APs).

Most APs can transmit and receive on one of 11 channels. You can choose which channel to use from the AP setup screen. Each channel corresponds to a different radio frequency.

Although there are 11 channels to choose from, you should only use channel 1 or 6 or 11, and ignore the other channel numbers. (In some countries, 13 channels are available, and you should use channel 1 or 5 or 9 or 13).

If you only have one AP, and your neighbours don't have wifi, then it doesn't matter which channel you choose.  If you have two (or more) APs, then you'll want to set them on different channels, to avoid the radio signals from interfering with each other and making the network much slower. You'll also want to check what channel your neighbour's AP is set to, and avoid using the same.

So why should you only use channels 1, 6 or 11, and not the channels in between? The reason is that the AP actually transmits and receives on four channels, not one channel! If you set channel 6 for example, the radio signal will be transmitted not only on channel 6, but also on channels 5 and 7, plus half of channels 4 and 8.

These three channels (1, 6 and 11) are non-overlapping channels. (In countries with 13 channels, there are four non-overlapping channels: 1, 5, 9 and 13).

For example it is not good to set your three APs to channels 1, 2 and 3. They will all interfere with each other, and you will get slow network speeds. Instead, set the channels to 1, 6 and 11. This will keep the radio signals separated, so there is no interference.

What happens if you have four AP's? Then interference is unavoidable. To minimize the effect of the interference, then set the channel of the fourth AP to the same channel as the AP which is furthest away (that is, the AP with the weakest signal). Don't select an intermediate channel for the fourth AP, otherwise it will interfere with two APs instead of only one.

The same principle applies if you have five or more APs - each AP should be set to the channel where the interference is the lowest. You can see this by using an Android app like "Wifi Analyzer". An example screenshot is shown below:

Picture
In the screenshot you can see that there are a total of seven APs, and the strongest are using channels 6 and 11. The new AP should therefore be set to channel 1. It will interfere with blizoo9, but as this is a weaker signal, the effect will be minimized. Note that the AP Bahneva_wireless is set to channel 4. This is not recommended, because it interferes with the APs on both channel 1 and 6.

Note: this description applies to channels at 2.4GHz. More information can be found on Wikipedia:

https://en.wikipedia.org/wiki/List_of_WLAN_channels

5 Comments

Fooled by battery percentages

4/6/2013

2 Comments

 
Android provides you with some information about how much battery power your apps are consuming. If you go to Settings->Battery, you will find a list of apps, and a percentage for each app.

Don't be fooled into thinking that these percentages tell you how much battery power each app is using. All it tells you is how much battery is consumed relative to the other apps running on your device.

The total amount of power consumed is always 100%. If you only have one app running, then it would take 100%. If you had two apps running, then they would each take 50% (assuming they consume the same power).

In practice though, a single app can never take 100%, because there are always Android system tasks running in the background.

So, how does this help us to determine how much battery power a particular app consumes? Unfortunately it doesn't.

An app like "Wifi Roaming Fix" which always runs in the background, will show different percentages depending on what other apps are running. If nothing is running on your device, then the percentage may be quite high. If lots of apps are running, then the percentage may be only 1-2% - even though "Wifi Roaming Fix" uses the same amount of power from the battery.

The quickest way to see this is by running a "Stability Test" app on your device for a few minutes. Notice how the percentages of your other apps fall when you are running this app.

See part 2:
Fooled by battery percentages 2

Picture
Picture
2 Comments

    Author

    Heleron

    Archives

    September 2013
    July 2013
    April 2013

    Categories

    All
    Battery Consumption
    Wifi

    RSS Feed


Powered by Create your own unique website with customizable templates.