PDA

View Full Version : Is entropy slowing down your Android device?



wraggster
January 6th, 2013, 20:21
[Lambgx02] got tired of his Android device getting bogged down and decided to dig down to the cause of the issue. His investigation led him to believe that entropy is causing the slowdown (http://forum.xda-developers.com/showthread.php?t=1987032&nocache=1). He believes that his workaround reduces 90% of the lag on the average Android device.
So how is it possible that entropy is causing the problem? It seems there is a bottleneck 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.

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