[Android Apps and Games] onexuan:
Hi

I have update a new Article about crazy endurance that it is renamed "Android Entropy"

http://onexuan.com/blog/2014/01/android-entropy-of-opg-pro/

I did a bit of digging and testing about Android entropy and discover a nice trick to have a nice fat Android entropy, Android entropy is able to improve battery life when using and reduce lag.

If an Android entropy pool isn't full, applications need entropy "just 'hang" and wait for more to be created. That's apparently what OPG Pro is designed to avoid.

kernel.random.read_wakeup_threshold contains the number of bits of entropy required for waking up processes that sleep waiting for entropy from /dev/random.

kernel.random.write_wakeup_threshold contains the number of bits of entropy below which we wake up processes that do a select() or poll() for write access to /dev/random.

Normally, read_wakeup_threshold is <strong>64</strong> and write_wakeup_threshold is <strong>128</strong>

This page is about kernel random at linuxinsight

you can use sysctl to set good values and low and behold.

busybox sysctl -e -w kernel.random.read_wakeup_threshold=128;
busybox sysctl -e -w kernel.random.write_wakeup_thresh</blockquote>old=256;

In one command prompt you can watch the entropy_avail with this one liner:

while :; do cat /proc/sys/kernel/random/entropy_avail; sleep 1;done

In a second command prompt you can do the sysctl thing...

we can find that write_wakeup_threshold doesn't effect entropy_avail at all.

But read_wakeup_threshold is a totally different

Try:

busybox sysctl -w kernel.random.read_wakeup_threshold=2048

The entropy_avail just started climbing....

All the way up to 3600+ and just stayed there. Never went down at all.

Actually, the more I did stuff with the phone, the faster the level would climb.

we played with different values.

Setting it to 1000... entropy would go up to 3000 and then drop to 2000 and up to 3000 again....

Setting to 750.... entropy would go up to 2250 and drop to 1500 and up to 2250 again...

So the pattern is:

max entropy_avail=read_wakeup_threshold * 3

min. entropy_avail=read_wakeup_threshold * 2 (ie. read_wakeup_threshold * 3 - read_wakeup_threshold)

after testing, we found that it is better, but we don't know it run the same well on all devices.

busybox sysctl -e -w kernel.random.read_wakeup_threshold=1366;
busybox sysctl -e -w kernel.random.write_wakeup_threshold=2048;

Maybe somebody would like to give it a try and test to see if it actually saves battery by setting read_wakeup_threshold to 1366.

OPG Pro have four profile, there are default,light,moderate,aggressive

Default - Standby better than using in this setting

read_wakeup_threshold=128
write_wakeup_threshold=256

Light - It is similar with Moderate, just lower value.

read_wakeup_threshold=1195
write_wakeup_threshold=2048

Moderate - Using better than Standby in this setting.

read_wakeup_threshold=1366
write_wakeup_threshold=2048

Aggressive It is similar with Moderate, just higher value.

read_wakeup_threshold=1708
write_wakeup_threshold=2048

You can see these video.

http://www.youtube.com/watch?v=z8N1sq-8Pds

http://www.youtube.com/watch?v=3Kv3QOVkTUQ

Download apps from Google Play or Official web site.