Droid2 RAM Memory question. - Droid 2 General

Sorry if these are DUH questions, but while I've been working with computers since the mid 80's, I'm fairly new to the smart phone game and unfamiliar with the way they work internally.
Is the RAM on these phones a physical chip (like a PC) or is it a software defined allocation (virtual)?
Also, and more importantly, if it is software defined, is it possible to allocate more of the phones internal storage memory to RAM?
I've noticed that while I'm only using about 7% of the internal storage, RAM is typically running at about 80% used.
The device is rooted, running 2.3.2 and currently running the stock VZW rom.
Any insight on this would be appreciated.
Thanks!

I imagine android uses virtual addressing instead of physical addressing but I'm not sure.
I CAN tell you, though, that android (specifcally the dalvik vm) is designed to keep things in memory instead of freeing it to reduce load times, etc. If it starts to run out of memory it unloads things, probably on a LRU basis.

I see. So then the amount of available RAM really doesn't matter as it works more like cache?

It's not really much different in windows... if your usage is under certain limits, very little will be paged out. 99% mem in use is fine in windows. 101% is not.
I guess the main difference is that closing an app is not as integral to android as it is to windows, so those of us who are accustomed to closing apps to save memory feel a bit odd.
Sent from my DROID2 using XDA App

True, but a windows system with twice the memory of another, will usually run better. Which is what prompted me to ask this question to begin with. I figured if there was a way to re-appropriate some of the unused portion of the storage area to the frequently used area of RAM, it would make the system run faster and smoother. I just don't know if it's possible or if it even makes a difference with the Android/Linux OS.

Related

Memory leaks

Hi,
Can anybody tell me if it is OK or not. When I'm starting the devcie I have something about 21Mb of free program memory. All addons I'd installed to SD memory card. After some period of work, typically 2 days, I see that the available memory reduces to 17Mb. Cleaning all cashes and unnecessary files, having no running applications is not helping a lot.
After reboot I again have 21Mb back.
Which component is stealing the memory?
I have a 20-year experience in programming of big computers, and such behaviour is typically considered as a serious bug.
This Herald is my first device with WM5 (and WM in general) and I don't know if it is the feature of WM5 of is connected with this certain device. Can anybody advice me?
Don't warry, that's OK. If you need, you can close all the applications (Start-Settings-System-Memory-Running applications-Stop all.)
And, additionaly, some system apps use memory.
In any case, a lot of memory is needed only for apps like GPS-navigators, databases etc
Bader said:
(Start-Settings-System-Memory-Running applications-Stop all.)
And, additionaly, some system apps use memory.
In any case, a lot of memory is needed only for apps like GPS-navigators, databases etc
Click to expand...
Click to collapse
Of course, I stopped everything. It seems like some programmes are not freeing all the memory used and are leaving "orphans". It is necessary to reboot device from time to time, and this is a typical behaviour of "sick" operating system. After a month of continuous work you would be out of memory. I cannot consider OS be stable, if it is necessary to reboot each day. Well done again, Billy.
I have noticed the same thing on my 4350. Right now I have 16.74 avaible, I soft reset it last night
Believe it or not, this is typical of all windows mobile phones. For whatever reason, many programs that use memory will not release it when closed. I usually reboot my phone once a day to free up the memory. I have a couple of third party apps that I use that actually take the memory down to 5megs. Even after closing them, I only get 12-13 back.
Bad news. And this is not question of belief, it is a fact. I will consider moving to 'nix.
There's no working *nix builds available that'll run on the phone AFAIK.
RpR said:
There's no working *nix builds available that'll run on the phone AFAIK.
Click to expand...
Click to collapse
Hey might mean that he is switching to devices that run linux out of the box.

Does using high RAM have effect on speed?

Since the new official WM6.5 is using a lot of RAM, does this affect the speed of the device?
Or does it merely mean that there can't be as many apps open until it reaches critical level?
Not directly, it should not. Only if it reaches a certain level, as you said.
It's likely however that WM6.5 uses more processing power than 6.1, but I can't say for sure.
It should not affect the performance, I have been up to 80% or more and never experienced any lag issues.
Cool thanks for the replies
One of the biggest misconceptions about RAM on Windows Mobile or indeed most operating systems, is that it's a good thing to have lots of free ram available. It's not. It's a complete waste of resources. The most efficient use of RAM would be bouncing off 100% used as much as possible.
It's good to have free RAM up until you have nothing more to execute. Having more RAM ensures you never reach this limit and start swapping.
I may not use all 4GB on my PC at once, but when the next version of XXXXX game comes out, I may end up using more than I do now. The overhead ensures I don't have to go out and buy more memory to ensure reliable performance.
A little off topic, but seems like a good place to ask: Opera (using 6.1, original or TESS) often struggles rendering complex (and sometimes even simple) pages. When you scroll to a new part of the page there are delays while it redraws the new bits. When you scroll back, it has to redraw the original bits. There are annoying delays and large ugly grey areas while it does this. I often have 3-4 tabs open BTW.
The question is, can Opera be allocated more memory (since I have plenty, especially since TESS) or is it completely automatic under WM? I've poked around in the registry and there are a couple of keys for "memory allocation" and "heap allocation", or some such, under the Opera section, but they're just numbers, they don't look like Mbytes, if you see what I mean.
The slow redrawing thing feels like a memory problem, as though it's redrawing from storage cache rather than quicker RAM cache, that's why I ask.
ArtieQ said:
It should not affect the performance, I have been up to 80% or more and never experienced any lag issues.
Click to expand...
Click to collapse
I fully agree with you.
The only problem is that programs that use lots of memory will not start. In fact I can play with Xtrakt only if I disable manila, otherwise the system not have enough memory to start it.
Sorry for the bad English
im sorry but if your PC or phone whatever you like is using alot of RAM, say %90, then this is going to cause the device to slow down.
once you reach a certain limit of RAM left, it has to start using disk space as temporary RAM and as such everything becomes slower.
RAM makes it quicker ONLY when the program you want is loaded into the RAM. So in windows if you have alot of programs running in the task area, then yes these programs will run up very quickly. But try then to open up another program when your memory is briming and you will find that it will slow it up.
To have memory running at a high percentage used is bad practise. In theory its good because it means things are loaded, but its only the things that are loaded that notice the speed benifits. There needs to be a cut off point.
adamrob69 said:
im sorry but if your PC or phone whatever you like is using alot of RAM, say %90, then this is going to cause the device to slow down.
once you reach a certain limit of RAM left, it has to start using disk space as temporary RAM and as such everything becomes slower.
RAM makes it quicker ONLY when the program you want is loaded into the RAM. So in windows if you have alot of programs running in the task area, then yes these programs will run up very quickly. But try then to open up another program when your memory is briming and you will find that it will slow it up.
To have memory running at a high percentage used is bad practise. In theory its good because it means things are loaded, but its only the things that are loaded that notice the speed benifits. There needs to be a cut off point.
Click to expand...
Click to collapse
Your understanding of the OS and therefore your conclusions are wrong. Desktop Windows is a different beast to Windows Mobile. When physical RAM gets low in Windows, it swaps data out to the disk. In WM it doesn't, it asks programs to close down (then forces them if none of them do), on a least recently used basis. For this reason, in WM, you might as well have applications using free RAM since they're effectively 'cached' and ready to be called up quickly. Should you start another process that requires that RAM, then the old processes will be closed very quickly. In WM, free RAM is wasted RAM.
Hi
For this reason, in WM, you might as well have applications using free RAM since they're effectively 'cached' and ready to be called up quickly. Should you start another process that requires that RAM, then the old processes will be closed very quickly. In WM, free RAM is wasted RAM.
Click to expand...
Click to collapse
Exactly Which is why having the HTC task bar shut down applications on clicking the cross is a complete waste of time. Windows Mobile is designed to leave applications loaded even when you close them, that way they are ready immediately when you want them again. This saves times and also power.
As already stated Windows Mobile will close applications automatically if required to free up some space.
Empty RAM is a complete waste, and is an argument against increasing RAM in Windows Mobile devices to silly headline amounts as even in standby that RAM has to be kept powered even if not being used.
Regards
Phil

Android 1.6 vs 2.x memory footprint

Hello.
Right now I am on Cyanogen 4.2.15.1.
The biggest problem of G1 is imho lack of memory. I did every possible hack to make more memory available to my phone. I use compcache, 10mb hack etc..
I also tried swap, but it has been giving me some troubles and I find my phone working better without it.
I see everybody switching to 2.x roms and of course it makes me want to switch too although my phone runs pretty fine as it is now. But I would switch if I am convinced that things will improve. So here come the questions:
Did you experienced speed improvement by switching or it just runs the same/slower? (I am only interested in answers of G1 users as this is somehow a bit specific phone with the lack of memory)
My second question rose from my concerns of memory too. To use 2.x roms, one has to use DangerSPL, right? I am not sure about this, but I got the impression, that this one moves some of the memory from application runtime to rom space, so we can fit larger roms in. Does that mean, that in the end this rom has less operational memory for itself? Because that would be the exact opposite thing to what I want to do.
Thanks for the answers.
You as many others are confusing persistent storage with ram.
Ram is fast but will not store data over a reboot.. the amount of ram on the dream remains the same regardless of the spl/radio/rom (with maybe an exception of the 10mb hack that borrows 8mb from video ram for general use)
The persistent storage slow and is what danger spl changes.. this is the equivalent of your hard drive on a computer.
In the case of danger spl it significantly reduces the temporary space (cache) and increases both the core system storage (system) and the user space storage (data) this allows more on internal phone storage instead of the sdcard, having your core apps not using apps2sd is likely to increase perceived speed.
Since the memory (ram) is unchanged and the new kernels are better at memory management there is potential for newer versions to support more tasks at the same time than the older versions. (We are not there yet but cm-5.0.8-test4 and cm-4.2.15.1 seem similar in behavior in terms of what can be done with the ram avalible)
As for upgrading that's your choice.. in general on the dream anyway I don't recommend going to cm5.0.7 and related roms if you have not already done so.. and I never recommend a test version if you are not looking to be a tester. So I'd wait till cm5.0.8 final and related roms are pushed if you feel it's time to upgrade.
Otherwise if you are on a stable 1.6 rom that fills your needs and want to keep a very stable phone.. there is no need to rush the upgrade.. at some point you will find something that requires you to upgrade to 2.1 and will be glad it exists as it will improve the usefulness of the phone.. and I'm sure the stability of 2.1 will only improve over time.
Thank you for your answer.
I of course understand the difference between ram and persistent storage (rom?). The information I missed is that the additional memory is taken from the cache. Someone somwhere here posted something that implied that it reduces ram. Hackery!
Thank you for clearing that up. What are consequences of having less cache? Is this not a problem then?
You got my point with stable 1.6. I do not want to flash new rom every week and prefer stable working phone. The ONLY thing I was hoping for is the better memory management and maybe the whole rom footprint in ram, leaving more room for apps instead of system. I am running apps2sd but I think the main source of sluggishness of my phone is that apps are too often removed from ram by dalvik.
So I was hoping for something like " Yep, 2.1 is 50mb in ram instead of 80mb of 1.6 and you will have more free memory." That would make me switch. Having the same amount or even less makes no sense for me. I see no killer 2.x feature that I need to have so far.
Same amount of ram with both spls as I said. No 10mb hack on cm5 because the gpu is used for system operations
Cache is mounted as /cache and as I said contains temporary and cached data.. As designed its intended as a staging area, which will usually persist across reboots but may not under certain situations.
No performance impact ought to exist due to the resize. If too many things are attempted to be saved here you will get out of disk space errors.. but 30mb is plenty for the staging operations required by the system during normal operation.
As you may know: Linux never has "free" memory.. but reclaimable memory.. the reason for thus is anything read from persistent media is put into "disk cache" in case its needed again.. if the memory is needed for something else it will be freed at no/little cost, but if the cached files are needed they wont be reloaded thus saving the time reading disks/SD/flash.
(Thus why devs cringe when people show the output of free.. 'cat /proc/meminfo' will give full detailed breakdown of memory use if you qknow how to read it)
I am Linux guy myself, so I know how it manages the memory. Anyway, 10mb hack was a huge thing for me, can not live without it.
That pretty much means I am staying and 1.6, thank you for your time.

[Q] Does A2SD result in more available 'process' memory?

Is the phone's internal memory shared for both app-storage AND running processes? I had assumed they were separate memory pools.
I monitor my Running Services pretty closely and I can see the memory mgmt only trying to maintain about 18 MB free. The phone starts to lag if there's less than that so I would like to see more available, e.g. 30 MB! Would implementing A2SD achieve this? Again, I was under the impression that it would not. Other threads have specifically stated that A2SD has nothing at all to do with performance and instead is intended to make it easier to switch ROMs by maintaining all your installed apps on the SD card (apart from the memory you need to flash when changing ROMs)
Thank you for any clarification!
Internal memory has nothing to do with RAM, which is what running processes use.
You want auto killer. Can set your minimum memory free and forget it, and let android maintain it.
Sent from my HERO200 using XDA App

Android / Linux Memory Management

Hi guys,
I find myself, yet again, having to explain to users how linux and android manages ram.
Most users seem to think that more free ram is better. They couldn't be more wrong.
This article explains the concept in layman's terms so nobody should be confused or left doubting.
So there we go, I'll refer to this article and I hope you all do too if you see stupid remarks here in the forum regarding free ram.
Have fun reading
Quote
Linux memory consumption concept
Linux memory consumption concept is all about efficiency. The system’s RAM is a resource that is meant to be used; 100% of it (if possible), all the time (if possible).
Linux utilizes unused RAM to cache data and filesystem meta-data from slower storage devices (Flash or disk) because fetching the information from the RAM is much quicker: There are no bottlenecks such as slow physical media, slow buses or device clocks, and not decompression is required.
Assuming there are no memory leaks, the reason that memory report tools report low amount of free memory is because the RAM is considered to be wasted if it isn’t used. This concept may require some time to digest, because conventional thinking may lead to the conclusion that an efficient system is a system with a lot of free memory. This is not entirely correct. In Linux case, the kernel tries to utilize the most of the RAM to improve the system performance. Keeping the cache means that if the kernel or a task needs the same data again, there’s a good chance it will still be in the fast cache in memory.
Conclusion: less free ram = more cached process/application = better multitasking.
Some heavyweight app need lot of free memory, but in the daily usage better if you NOT use s*perch*rger or any similar script to get more free ram.
A typical bug with systems what have lot of free ram: when a call arrive, you need to wait several seconds to see the caller name, because the contacts app killed to get more free ram, and need to reload the app, open the contacts database, etc...
Sent from my E15i using xda app-developers app
pilu1978 said:
Conclusion: less free ram = more cached process/application = better multitasking.
Some heavyweight app need lot of free memory, but in the daily usage better if you NOT use s*perch*rger or any similar script to get more free ram.
A typical bug with systems what have lot of free ram: when a call arrive, you need to wait several seconds to see the caller name, because the contacts app killed to get more free ram, and need to reload the app, open the contacts database, etc...
Sent from my E15i using xda app-developers app
Click to expand...
Click to collapse
i have a lot of free ram and still doesn't have any problem with call delay or any other problem, I don't even use any ram script or any other script ,so in my rom I can enjoy when I use heavyweight app's or when I use a daily APPs
All this information is an overkill for the original discussion and it actually misses the most important point. Here's why.
The number reported by most users as free RAM is not free at all. When most users refer to the amount of free ram in a particular ROM, they're refering to the number reported in Running Apps. That memory is not free memory. And that's the most important point.
You don't read guys reporting the amount of free RAM memory while executing the free command in terminal.
It's true that the "running apps" doesn't report the true amount of free ram..
Terminal Emulator - type su then type free . I think that is the true amount of ram.
Sent from my Nexus 7 while being Paranoid .
Mockingbird said:
Terminal Emulator - type su then type free . I think that is the true amount of ram.
Sent from my Nexus 7 while being Paranoid .
Click to expand...
Click to collapse
Yeah that's right to a certain point since android grabs as much ram as it can.. Doesn't mean the remaining ram is all that's free though..
Quote
Memory management
Since Android devices are usually battery-powered, Android is designed to manage memory (RAM) to keep power consumption at a minimum, in contrast to desktop operating systems which generally assume they are connected to unlimited mains electricity. When an Android app is no longer in use, the system will automatically suspend it in memory - while the app is still technically "open," suspended apps consume no resources (e.g. battery power or processing power) and sit idly in the background until needed again. This has the dual benefit of increasing the general responsiveness of Android devices, since apps don't need to be closed and reopened from scratch each time, but also ensuring background apps don't waste power needlessly.
Android manages the apps stored in memory automatically: when memory is low, the system will begin killing apps and processes that have been inactive for a while, in reverse order since they were last used (i.e. oldest first). This process is designed to be invisible to the user, such that users do not need to manage memory or the killing of apps themselves.] However, confusion over Android memory management has resulted in third-party task killers becoming popular on the Google Play store; these third-party task killers are generally regarded as doing more harm than good.
CtrlAltDelIrl said:
Memory management
Since Android devices are usually battery-powered, Android is designed to manage memory (RAM) to keep power consumption at a minimum, in contrast to desktop operating systems which generally assume they are connected to unlimited mains electricity. When an Android app is no longer in use, the system will automatically suspend it in memory - while the app is still technically "open," suspended apps consume no resources (e.g. battery power or processing power) and sit idly in the background until needed again. This has the dual benefit of increasing the general responsiveness of Android devices, since apps don't need to be closed and reopened from scratch each time, but also ensuring background apps don't waste power needlessly.
Android manages the apps stored in memory automatically: when memory is low, the system will begin killing apps and processes that have been inactive for a while, in reverse order since they were last used (i.e. oldest first). This process is designed to be invisible to the user, such that users do not need to manage memory or the killing of apps themselves.] However, confusion over Android memory management has resulted in third-party task killers becoming popular on the Google Play store; these third-party task killers are generally regarded as doing more harm than good.
Click to expand...
Click to collapse
Certenly you explain the subject very good. It is my first time to understood. Thanks!
mikekgr said:
Certenly you explain the subject very good. It is my first time to understood. Thanks!
Click to expand...
Click to collapse
Certainly you didn't care enough about the subject before. Otherwise you would have found the same information in Wikipedia: http://en.wikipedia.org/wiki/Android_(operating_system)#Memory_management .
Unless CtrlAltDelIrl edited that article...
Fortun said:
Certainly you didn't care enough about the subject before. Otherwise you would have found the same information in Wikipedia: http://en.wikipedia.org/wiki/Android_(operating_system)#Memory_management .
Unless CtrlAltDelIrl edited that article...
Click to expand...
Click to collapse
Always these days the same problem: all information exist somewwhere but it is not very easy to "locate" the information required!

Categories

Resources