Question

Whenever the entropy pool goes less in android we can easily observe sluggishness in the device but i do not see a similar behavior on linux (ubuntu). I m using 2GB Ram in both. Why is entropy pool having so much effect on the performance of the device? And how can we make sure that the entropy pool is high always?

you can verify this by executing the following command

$adb shell cat /proc/sys/kernel/random/entropy_avail
Was it helpful?

Solution

Well from lot reading and help i got following useful information

firstly except from

http://hackaday.com/2013/01/04/is-entropy-slowing-down-your-android-device/

when an app requests a random number from the Linux kernel running at the lowest level of the device. Android is set up to use /dev/random for all random number requests, but [Lambgx02] says that location has a very shallow pool of numbers available. When they run out the kernel has to reload with a new seed and this is blocking the app that requested the data from continuing.

His solution was to write his own app that seeds /dev/random once every second using a number from /dev/urandom. He mentions that this might cause a security vulnerability as seeding the random data in this way is not quite as random. There may also be issues with battery life, so make sure to monitor performance if you give it a try.

Then Looking into the following google issue

https://code.google.com/p/android/issues/detail?id=42265

i have learnt that there was indeed an issue in Gingerbread as stated by google engineer but later this was fix. And android Random and SecureRandom use /dev/urandom

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top