6Gb RAM utilization option

Droff

Senior Member
Dec 7, 2010
167
50
48
Just a thought about memory utilization....

So Oneplus 3 is the first mainstream (not the first overall) android phone with 6Gb. Apparently all that memory is not currently utilized. Most likely it is not fully utilized even on 4Gb phones. There is really no point in wasted RAM. Having a lot of open apps in memory is truly great and could be the best use for it, but it also can present some issues. Background apps on android are not always suspended in the best way and can waste resources (CPU, battery). Of course if app and system are optimized correctly this shouldn't happen, but unfortunately it is not always the case. While google optimizes the system with dose features etc, I'm wondering about a simpler option until the better one is built into the system.

RAM is 10 times faster than storage, so why not use a portion of it as a RAMDISK, like in old days (MS DOS times). For those who don't know, RAMDISK is a portion of RAM that is used as a temporary storage (like flash memory), that will be 10 times faster than permanent flash storage.
Basically out of 6Gb RAM that phone has (Oneplus 3), 3Gb would be used as regular RAM and 3GB would be used as a RAMDISK. RAMDISK completely looses all the data after reboot, but the good thing is that phones don't really need to be restarted often. So RAMDISK would be almost permanent. Lets say you have 100 apps on your phone. Out of those you use 30 all the time. It is a bit inconvenient when app that you use often (for example Facebook) is kicked out from the memory and has to reload from flash storage (slow). Instead you could have those 30 apps to be loaded/copied/synchronized to the RAMDISK during initial boot. If app is kicked from regular RAM and needs to be restarted/resumed it would load 10 times faster from the RAMDISK. During regular intervals and before reboot data/cache from RAMDISK can be permanently saved (synchronized) back to the flash storage. If you have your favorite app that keeps misbehaving in the background (uses too much CPU, doesn't let phone to go into deep sleep and kills battery) you can just have it removed from background processes (swipe away, greenify, kill it etc), but then it will be almost instantly reloaded from RAMDISK when you need it later. So in the end you would have all your favorite apps loading super fast, even if it is not currently running in the background. You would sacrifice some RAM for faster app loading, possibly also minimizing battery loss due to some bad apps.

My knowledge of Android system is very limited and I might be very mistaken regarding this option, it's implementation and benefits. I would love to hear what people with better knowledge can say on this topic.
 

gee2012

Recognized Contributor
Jul 13, 2010
11,140
4,167
253
Heerlen
Just a thought about memory utilization....

So Oneplus 3 is the first mainstream (not the first overall) android phone with 6Gb. Apparently all that memory is not currently utilized. Most likely it is not fully utilized even on 4Gb phones. There is really no point in wasted RAM. Having a lot of open apps in memory is truly great and could be the best use for it, but it also can present some issues. Background apps on android are not always suspended in the best way and can waste resources (CPU, battery). Of course if app and system are optimized correctly this shouldn't happen, but unfortunately it is not always the case. While google optimizes the system with dose features etc, I'm wondering about a simpler option until the better one is built into the system.

RAM is 10 times faster than storage, so why not use a portion of it as a RAMDISK, like in old days (MS DOS times). For those who don't know, RAMDISK is a portion of RAM that is used as a temporary storage (like flash memory), that will be 10 times faster than permanent flash storage.
Basically out of 6Gb RAM that phone has (Oneplus 3), 3Gb would be used as regular RAM and 3GB would be used as a RAMDISK. RAMDISK completely looses all the data after reboot, but the good thing is that phones don't really need to be restarted often. So RAMDISK would be almost permanent. Lets say you have 100 apps on your phone. Out of those you use 30 all the time. It is a bit inconvenient when app that you use often (for example Facebook) is kicked out from the memory and has to reload from flash storage (slow). Instead you could have those 30 apps to be loaded/copied/synchronized to the RAMDISK during initial boot. If app is kicked from regular RAM and needs to be restarted/resumed it would load 10 times faster from the RAMDISK. During regular intervals and before reboot data/cache from RAMDISK can be permanently saved (synchronized) back to the flash storage. If you have your favorite app that keeps misbehaving in the background (uses too much CPU, doesn't let phone to go into deep sleep and kills battery) you can just have it removed from background processes (swipe away, greenify, kill it etc), but then it will be almost instantly reloaded from RAMDISK when you need it later. So in the end you would have all your favorite apps loading super fast, even if it is not currently running in the background. You would sacrifice some RAM for faster app loading, possibly also minimizing battery loss due to some bad apps.

My knowledge of Android system is very limited and I might be very mistaken regarding this option, it's implementation and benefits. I would love to hear what people with better knowledge can say on this topic.
Never mind, wrong post.
 
Last edited:

Droff

Senior Member
Dec 7, 2010
167
50
48
It is not about fixing the number of apps that can be held in memory, it is about different use for the RAM. When you have 40 apps in the background some of them can kill the battery. That is probably why Oneplus limited the number of apps. RAMDISK could potentiality minimize the battery wasted by background apps (if they are not suspended correctly) by removing them from active memory and still allow fast restart when needed.
 
Last edited:

gee2012

Recognized Contributor
Jul 13, 2010
11,140
4,167
253
Heerlen
Did you read the post? It is not about fixing the number of apps that can be held in memory, it is about different use for the RAM. When you have 40 apps in the background some of them can kill the battery. That is probably why Oneplus limited the number of apps. RAMDISK could potentiality minimize the battery wasted by background apps (if they are not suspended correctly) by removing them from active memory and still allow fast restart when needed.
I corrected my post didn`t i?
 

dragon-tmd

Senior Member
Jan 16, 2005
213
67
0
BRD
RAMDISK could potentiality minimize the battery wasted by background apps (if they are not suspended correctly) by removing them from active memory and still allow fast restart when needed.
Android can not address any RAMDISK, it just makes no sense here.
 

Droff

Senior Member
Dec 7, 2010
167
50
48
Could you explain further why you think it is not being utilised ?
Look at the amount of free RAM in average use. There will be plenty that is unused. Keeping lots of apps cached is the best use for the free ram, but in some cases those background apps need to be removed from the active memory to prevent app from keeping device awake (and killing battery as a result). For example RAMDISK would allow to greenify all the bad written apps, stopping them from draining the battery, but then reloading them back to the active RAM almost instantly (much faster than from flash storage), when user wants to access the app again.
This situation (RAM "waste") can sure change with advances in android system itself, but as of now I just think RAMDISK is not a bad option for new devices with a lot of RAM onboard. Apparently we will see android phones with 8Gb Ram pretty soon.

Android can not address any RAMDISK, it just makes no sense here.
There is no such thing currently, but it doesn't mean that it cannot be created (at least in my understanding) and implemented via kernel or just an application (background service).

Here is info from WiKi

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

Here are the examples of programs/apps for PC:

http://www.radeonramdisk.com/software_downloads.php
http://memory.dataram.com/products-and-services/software/ramdisk

Here some more info:

http://www.pcworld.com/article/260918/how_to_supercharge_your_pc_with_a_ram_disk.html

Plenty more can be found online.
 
Last edited:

One Twelve

Senior Member
Oct 28, 2013
2,608
638
0
Look at the amount of free RAM in average use. There will be plenty that is unused.
The impression i got that was not all that ram was not available and was reserved for the system. To the point one questioned that 6GB was available, felt like less.

How much RAM does the OP3 mention as free after a restart ?
 

Droff

Senior Member
Dec 7, 2010
167
50
48
The impression i got that was not all that ram was not available and was reserved for the system. To the point one questioned that 6GB was available, felt like less.

How much RAM does the OP3 mention as free after a restart ?
It shows about 4.5Gb free. I'm yet to fully test OP3 and see my average memory usage, but I doubt that I will have less than 2Gb free
 

One Twelve

Senior Member
Oct 28, 2013
2,608
638
0
It shows about 4.5Gb free. I'm yet to fully test OP3 and see my average memory usage, but I doubt that I will have less than 2Gb free
4.5GB free implies its working as stated.

You're saying in use that memory gets reserved and drops, that is more than it should.
 

Xperia U Lover

Senior Member
Jul 7, 2014
347
76
0
Do u have any ideas how can that be done?

Sent from my HTC 10 using Tapatalk

---------- Post added at 01:55 PM ---------- Previous post was at 01:55 PM ----------

That would be really cool

Sent from my HTC 10 using Tapatalk
 

Droff

Senior Member
Dec 7, 2010
167
50
48
Do u have any ideas how can that be done?

Sent from my HTC 10 using Tapatalk

---------- Post added at 01:55 PM ---------- Previous post was at 01:55 PM ----------

That would be really cool

Sent from my HTC 10 using Tapatalk
As far as I know, there is no RAMDISK app for android at this time. I would love try it out myself. Unfortunately I don't have much coding experience to create this app (or kernel).

On a side note, after more time with a 6Gb phone I can see that this RAM can get utilized quite a bit. After editing the build.prop to magical number 42:) and running bunch of apps (regular operation, nothing really extreme), the free cache reported by OS (developer options) is 1.2GB - 1.3GB. at the same time in RUNNING SERVICES it shows 2.8GB free. SYSTEM got bloated to 2.0GB

From what I can see, the apps that I use didn't misbehave so far and even with such heavy load on RAM, my battery didn't take a hit. As a matter of fact I'm very surprised by battery performance so far, but I'm only 1/4 way through.
That being said, I would still love to create 2Gb RAMDISK from that 6GB and play with it more.
 

Attachments

saintxseiya

Senior Member
Jul 3, 2008
434
134
0
Actually, my RAM is well used and i am grateful for having 6 GB in the phone, that is, because i am using two profiles and on 4GB phones they were always operating at the limit. with the oneplus 3 finally this is over.

Praise the lord.