[REF] reserved memory tests: ~356mb visible+test2: 258mb free 201010280000HKT - Galaxy S I9000 Android Development

just performed some tests with different reserved mem sizes (stock kernel ZSJP8) for your ref
default settings:
CONFIG_ANDROID_PMEM_MEMSIZE_PMEM=16384
CONFIG_ANDROID_PMEM_MEMSIZE_PMEM_GPU1=10240
CONFIG_ANDROID_PMEM_MEMSIZE_PMEM_ADSP=1500
CONFIG_VIDEO_SAMSUNG_MEMSIZE_FIMC0=14336
CONFIG_VIDEO_SAMSUNG_MEMSIZE_FIMC1=1024
CONFIG_VIDEO_SAMSUNG_MEMSIZE_FIMC2=12288
CONFIG_VIDEO_SAMSUNG_MEMSIZE_MFC0=36864
CONFIG_VIDEO_SAMSUNG_MEMSIZE_MFC1=36864
CONFIG_VIDEO_SAMSUNG_MEMSIZE_JPEG=5012
CONFIG_VIDEO_SAMSUNG_MEMSIZE_TEXSTREAM=10240
1/. minimum (almost) reserved mem with movie playback possible (no lag in youtube), 356mb memory, no special lags observed, opened 4 tabs in browser with lots of imgs and swfs
CONFIG_ANDROID_PMEM_MEMSIZE_PMEM=8192
CONFIG_ANDROID_PMEM_MEMSIZE_PMEM_GPU1=4096
CONFIG_ANDROID_PMEM_MEMSIZE_PMEM_ADSP=1024
CONFIG_VIDEO_SAMSUNG_MEMSIZE_FIMC0=6144
CONFIG_VIDEO_SAMSUNG_MEMSIZE_FIMC1=1024
CONFIG_VIDEO_SAMSUNG_MEMSIZE_FIMC2=6144
CONFIG_VIDEO_SAMSUNG_MEMSIZE_MFC0=29696**##
CONFIG_VIDEO_SAMSUNG_MEMSIZE_MFC1=29696**##
CONFIG_VIDEO_SAMSUNG_MEMSIZE_JPEG=3072
CONFIG_VIDEO_SAMSUNG_MEMSIZE_TEXSTREAM=2048
** min value in order to play movies = 29mb, 28mb wont play
## can be set to a lower value without movie playback, setting these with too low values caused problems, below 20mb should be ok
2/. nearly double all default values, 219mb available, didnt feel faster
EDIT 201010271843HKT: tweaking memory test2
available memory - 257.68mb
EDIT 201010280000HKT:
as to min mem usage, u'll need to (in brief):
1/. remove unneccessary apps
2/. remove startup/network chg broadcast listeners from the app - a lot of apps/services are launched at startup up or network state chg, remove them so they wont start automatically, eg gtalk, sync/feed, vold service, installd, etc
3/. kill unneccessary services & processes - i didnt use any killer since i rooted my phone, i use script to kill them since killers consume more mem
4/. i have read the source and found that only -Xmx (max mem) is included but no -Xms (initial mem), perhaps we can do something here (not done yet)
reference for 2.1 http://forum.xda-developers.com/showpost.php?p=8507031&postcount=38

It 's very useful info! thanks your test!

Can I have a guide to make these changes to my existing kernel?

Nice, able to see 356MB instead of 304!

CONFIG_ANDROID_PMEM_MEMSIZE_PMEM=8192
CONFIG_ANDROID_PMEM_MEMSIZE_PMEM_GPU1=6144
CONFIG_ANDROID_PMEM_MEMSIZE_PMEM_ADSP=1500
CONFIG_VIDEO_SAMSUNG_MEMSIZE_FIMC0=8192
CONFIG_VIDEO_SAMSUNG_MEMSIZE_FIMC1=1024
CONFIG_VIDEO_SAMSUNG_MEMSIZE_FIMC2=8192
CONFIG_VIDEO_SAMSUNG_MEMSIZE_MFC0=30720**##
CONFIG_VIDEO_SAMSUNG_MEMSIZE_MFC1=30720**##
CONFIG_VIDEO_SAMSUNG_MEMSIZE_JPEG=4096
CONFIG_VIDEO_SAMSUNG_MEMSIZE_TEXSTREAM=5012
can make one kernel for this setting? i want to test,but i don't know how to make a zimage.

These results exclude the 'blackholed' memory, right? Which means if we can find where it is used (if it is used at all) we can get even more?

Great work there. Could gain us a couple more MB of usable RAM.
The "48MB hole" is most likely used by the GSM Radio and we won't have access to it.

xos84292 said:
CONFIG_ANDROID_PMEM_MEMSIZE_PMEM=8192
CONFIG_ANDROID_PMEM_MEMSIZE_PMEM_GPU1=6144
CONFIG_ANDROID_PMEM_MEMSIZE_PMEM_ADSP=1500
CONFIG_VIDEO_SAMSUNG_MEMSIZE_FIMC0=8192
CONFIG_VIDEO_SAMSUNG_MEMSIZE_FIMC1=1024
CONFIG_VIDEO_SAMSUNG_MEMSIZE_FIMC2=8192
CONFIG_VIDEO_SAMSUNG_MEMSIZE_MFC0=30720**##
CONFIG_VIDEO_SAMSUNG_MEMSIZE_MFC1=30720**##
CONFIG_VIDEO_SAMSUNG_MEMSIZE_JPEG=4096
CONFIG_VIDEO_SAMSUNG_MEMSIZE_TEXSTREAM=5012
can make one kernel for this setting? i want to test,but i don't know how to make a zimage.
Click to expand...
Click to collapse
i'm sorry, my kernel will restart once the usb cable is unplugged, still looking for a solution....

jam3sjam3s said:
These results exclude the 'blackholed' memory, right? Which means if we can find where it is used (if it is used at all) we can get even more?
Click to expand...
Click to collapse
what blackhole r u talking about?

This is awesome! I can't wait to see a kernel with the resolved usb issue and more ram.

Yay! Finally we have experts working on the RAM issues!
BTW, is there no way to allocate memory dynamically for all these things as and when it is needed instead of reserving a set amount? Especially for the video playback stuff, it's a lot of wasted memory when you're not playing a movie / doing something graphic intensive.

Can anyone explain how to do a safe changes of this paremeters.....?
Thanks

Try 720p video capturing, encoding is hardware accelerated as well. (but might not be affected by those settings, it just needs checking)
Yes, dynamic allocation would be awesome
Those settings are accessible in source code = before compilation, so no way to change them post-startup/post-compilation ATM.
How come u got only around 100MB memory used?
I got over 140 just after startup..

This is still not 512MB as samsung promissed us! I hate this phone! I'll buy a Desire Ultra HD as soon as it's annoucned!
(just to be the first troll in this topic )
nice work though!

sztupy said:
This is still not 512MB as samsung promissed us! I hate this phone! I'll buy a Desire Ultra HD as soon as it's annoucned!
(just to be the first troll in this topic )
nice work though!
Click to expand...
Click to collapse
I don't think that the argument ever was that Samsung promised 512MB of usable RAM. It was that the amount of RAM usable out of 512MB for applications was not comparable to other phones with 512MB.
I don't want this to turn into an argument. I'm just glad that the problem is coming to fruition.

andars05 said:
I don't think that the argument ever was that Samsung promised 512MB of usable RAM. It was that the amount of RAM usable out of 512MB for applications was not comparable to other phones with 512MB.
I don't want this to turn into an argument. I'm just glad that the problem is coming to fruition.
Click to expand...
Click to collapse
You clearly either have no sense of humor or cant read

I know it was sarcastic. He was making fun of the people who wanted more RAM. I was just stating that no one (with exception of a few maybe) expected 512MB of RAM to be fully usuable. I think he misunderstood the original issue
I believe the issue was largely ignored because of this misunderstanding. It didn't help that people who expressed dissatisfaction were told to "stfu." A good portion of people were unhappy with the amount of available RAM. It wasn't that they expected to have full access to all 512MB.
I'm happy to see progress on this issue.

How are we able to change theSe values???
Sent from my SGH-T959 using XDA App

SupaDuckie said:
How are we able to change theSe values???
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
Any kind souls?

SupaDuckie said:
How are we able to change theSe values???
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
mengsuan said:
Any kind souls?
Click to expand...
Click to collapse
How about reading? Its just freakin 2 pages, not 50...

Related

Google Android & Memory Management

Hello Android Gurus
I have bought Galaxy S (My first Android phone) 2 weeks ago and i have been experimenting with it since. I have noticed one thing regarding how android manages memory and its quite alarming.
When i start my phone I typically have around 160 Mb of RAM. As i load an application that requires 10 MB for example, the available RAM evidently drops to 150 MB but when I kill the application the RAM goes up but not to the previous level (e.g. goes up to 157).
little RAM is always lost as applications are opened and closed. This means that after a couple of hours of using the phone, the RAM goes down to 40 MB and the phone becomes REALLY laggy and you have to restart
The above behavior is typical of windows mobile, and that is exactly why i shifted to Android thinking it is better.
My questions to the android experts out there are the following:
1- Why is memory leaking like this. Such a behavior results in a phone with very bad user experience
2- Is this typical behavior of Android, if yes then i'd better sell my Galaxy S and look for an alternative OS
3- Is this due to TouchWiz by Samsung, if yes then i will wait for subsequent updates to see if this problem could be resolved by Samsung
4- Will the 2.2 Froyo update resolve this issue ?
I used to have an iphone 3gs before this one, and no matter how much you open or close applications, the UI is always smooth and responsive. The thing that made me really hate Apple and its products is their "Closed OS" that does not enable you to do much with your phone. That is why i moved to Galaxy S thinking it would give me a better experience
Thanks for your thoughts.
FREE RAM IS A WASTED RAM, golden rule of android.
Some time ago I did even a video so you can check what i'm talking about... http://www.youtube.com/watch?v=Ewxuy12KuUA
Dexter666 said:
FREE RAM IS A WASTED RAM, golden rule of android.
Some time ago I did even a video so you can check what i'm talking about...
Click to expand...
Click to collapse
That's an awesome video! I never knew the games looked so nice. I'm on a download spree because of that video now
Strange
Dexter666 said:
FREE RAM IS A WASTED RAM, golden rule of android.
Some time ago I did even a video so you can check what i'm talking about... http://www.youtube.com/watch?v=Ewxuy12KuUA
Click to expand...
Click to collapse
This is quite strange, the less RAM you have the more non-responsive the phone is and laggy.
Enough RAM has to be maintained to guarantee a smooth user experience.
If the phone requires 100Mb of RAM to run smoothly, then this much has to be maintained.
from my experience with the Galaxy S, there has to be atleaset 80 to 100 MB to maintain a somewhat smmoth interface.
Edit:
I also understand from your input that this is a Samsung problem, not an android problem, and that no matter how low the RAM is, the interface will always be smooth ??????
Mate, just one word - google.
There are about a billion articles online on android memory management, how to impoove it etc.
Dexter666 said:
FREE RAM IS A WASTED RAM, golden rule of android.
Some time ago I did even a video so you can check what i'm talking about... http://www.youtube.com/watch?v=Ewxuy12KuUA
Click to expand...
Click to collapse
i dont understand how this shows anything? You are manually exiting each one of the games, forcing it to quit anyways. A better test is just to hit the home button, and continually load up the next game.
andy2na said:
i dont understand how this shows anything? You are manually exiting each one of the games, forcing it to quit anyways. A better test is just to hit the home button, and continually load up the next game.
Click to expand...
Click to collapse
This means that after a couple of hours of using the phone, the RAM goes down to 40 MB
Click to expand...
Click to collapse
+red baloon on vid which says phone was used for >day, so "free" ram was <50MB, becouse browser etc. reserve some MBs for quick comming back.
And still was no problem to run anything I choose.
Dont quite understand..care to explain more? I'm getting puzzled abt this shortage of ram thingy. Some suggest to use task killer to free up rams while you say dont. But looking at your videos its fast..please explain. Thanks
Sent from my GT-I9000
Android handles the memory management itself. The moment it runs below certain amount of free memory it will start the kill apps. There is no need to run an app killer. Altho the default settings are not enough to provide a smooth experience. Check out the freememmanager app in the market to change the settings. As long as min 45 mb is free everything will run smooth.
Sent from my GT-I9000 using XDA App
RADLOUNI said:
2- Is this typical behavior of Android, if yes then i'd better sell my Galaxy S and look for an alternative OS.
Click to expand...
Click to collapse
This is typical Android behavior. See ya later.
Really though, if you're killing tasks, then you're already taking horrible advice from people who haven't an inkling of an idea on how Android manages memory.
Keep in mind that your phone is only using 256MB of its total 512MB of memory. Once a newer kernel is released with himem the phone will use all 512MB.
Android's garbage collection can be set to be more aggressive which would sort of fix your issue by killing more background applications. However, you might as well wait for the newer kernel which will fix your problem anyway.
Though it was more 320 out of 512
Sent from my GT-I9000 using XDA App
RADLOUNI said:
The above behavior is typical of windows mobile, and that is exactly why i shifted to Android thinking it is better.
My questions to the android experts out there are the following:
1- Why is memory leaking like this. Such a behavior results in a phone with very bad user experience
2- Is this typical behavior of Android, if yes then i'd better sell my Galaxy S and look for an alternative OS
3- Is this due to TouchWiz by Samsung, if yes then i will wait for subsequent updates to see if this problem could be resolved by Samsung
4- Will the 2.2 Froyo update resolve this issue ?
Thanks for your thoughts.
Click to expand...
Click to collapse
This has to do a lot with Android's garbage collector. The reason task-killers are not the best way to go, is because when you kill tasks a lot of the memory is not recovered (garbage collector does not work as it should). Android by default won't start killing apps until you get between 20-30MB of memory. For some reason, in the SGS, as you said, when ram drops below 70MB, the phone starts to feel pretty laggy; the best way to remedy this is to use applications like autokiller or minfreemanager, which require you to be rooted.
For a more in-depth explanation of how android kills processes see this http://andrs.w3pla.net/autokiller/details (from the developer of Autokiller).
I would like to know why the phone feels so laggy when ram drops below 70MB, from what I understand, this shouldn't be the case...
2- Is this typical behavior of Android, if yes then i'd better sell my Galaxy S and look for an alternative OS
--> No, this is not typical behavior of Android, i use my HTC Magic before Galaxy S, no lagging problem even the memory is lower than 15MB.
The galaxy S defaults are too low for when it starts removing apps from RAM, you need to root it and then install minfree manager or autokiller (which is not a task killer don't be deceived by the name)
Brantyr said:
The galaxy S defaults are too low for when it starts removing apps from RAM, you need to root it and then install minfree manager or autokiller (which is not a task killer don't be deceived by the name)
Click to expand...
Click to collapse
doesn't solve the mystery because this is a non-issue on other android phones.
why do i need to keep 50-70mb free to get a smooth running phone where others can handle 30mb free without problems.
Goshh..thanks for simplified. Now ive removed the task killer..and stand firm by the android golden rules...cheers..
Sent from my GT-I9000
I noticed this same low ram behavior on my galaxy s. After boot the phone shows like 180 mb of ram free after a couple days the phone will drop down to 30 mb of ram all the while I'm killing apps running in the background with task killer.
The phone slows down significantly even after I kill everything.i thought android was supposed to circumvent these kind of low ram Issues.
inurb said:
I noticed this same low ram behavior on my galaxy s. After boot the phone shows like 180 mb of ram free after a couple days the phone will drop down to 30 mb of ram all the while I'm killing apps running in the background with task killer.
The phone slows down significantly even after I kill everything.i thought android was supposed to circumvent these kind of low ram Issues.
Click to expand...
Click to collapse
It is.
And you're supposed to not be messing with how Android manages things cuz taskkilling screws it up.
reuthermonkey said:
It is.
And you're supposed to not be messing with how Android manages things cuz taskkilling screws it up.
Click to expand...
Click to collapse
So you suggest that I not force close any apps using taskkiller and just let android 2.1 do it's thing with memory management?
When I had the phone for the first week without taskkiller installed, the device ran very slow after the first couple days of use. Your saying that the slowness will go away as android dishes out memory effectively?
I'll uninstall taskkiller and let the device run longer than a week and see if it ever speeds up. thanks

a simple way to get rid of lag (most of it)

hi everyone, i'm no expert on phone, so don't kill me if i sound stupid
been using my galaxy S for about 4 months now. and yes it does lag compare to the iphone, or other HTC phones. so i been trying to find out, what's going on? why is my top end phone lagging? here's what i found:
1) when does it start to lag badly?
i installed system panel which gives me a nice list of active and inactive apps, and how much free ram i have left. the phone ALWAYS starts to lag like crazy when ram gets below 60mb. this is a problem - samsung is not giving us enough free ram to play with as once we run a few apps (market, internet especially), we're reaching the 60mb point already. when the phone gets to the 60mb mark it tries to manage the apps by closing some less important ones. but it lags BADLY while doing so.
what's gonna happen is the phone gonna get into this never ending cycle of closing apps and laggin as it's stuck in around the 50mb-60mb mark.
i can solve this by going to system panel and closing all inactive apps. then the ram is gonna go back to around 140mb. however after opening a few apps, once again it goes back to below 60mb and the lag starts again.
2) autokiller
guys been saying autokiller is great and they go with the aggressive settings. i tried it and it made the phone worse. why? because instead of killing apps at the 60mb mark it starts killing apps even sooner! that's wasting battery, wasting free ram, and making the phone even slower. we don't have enough free ram to begin with, so we should make max use of it. here's how i do it:
1) root the phone. install autokiller from the market.
2) instead of using high aggressive settings, use the LOWEST settings. i use advanced mode and then enter all values to 8mb only.
now it is awesome!! the phone never lags until you get it down to around the 20mb mark. you now have around 40mb of extra ram to use (of course autokiller does use some ram but no big deal). the lag starts much latter. u may not think 40mb is a lot but it is in practice!
if you dont believe me, you can try it. it may or may not work for u, but it's definitely working for me. of course, once the ram falls below 20mb, it may be a good idea to close some inactive apps yourself, LOL
but really, samsung should give us at least 100mb more free ram, i can't believe i even have to do this!
Well you point one issue that lag happens, but almost every custom kernel/Rom use memory tweak that Make you around 40MB more to start with.
And yes autokiller don't work good.
The program in the phone is the best to use.
The main lag issue is the filesystem.
Even these can be fixed with many different kernel/Rom.
Sent from GT-I9000 jpo. My own kernel for z4mod and with 341MB Ram
i don't disagree with what you're saying. but a few things to add:
1) i have not applied lag fix myself but i have a friend who has. i dont feel his phone is much quicker than mine in reality. also, his phone crashed after a few weeks and he had to do a hard reset. what we REALLY need is more ram. if we have lots of ram, who cares about the file system? we don't even need any swap from the file system. just let everything stays in ram where it is the quickest.
2) i'm not using any custom roms. if custom roms give me extra 40mb, and then i adjust the auto killer setting to low, that gives me 80mb extra to play with. great.
autokiller DOES work good i feel if you're doing what i'm saying. maybe u have already tried what i'm doing, i don't know, but if you have not, then i highly recommend you to try it.
like i said i'm no expert on this, but autokiller is so easy to install and adjust, and that i feel anyone here can use it
maybe flashing custom firmware is easy to do, i haven't tried it, but it sounds complicated to do for me, and i don't want really big changes on my phone, i want it to be extremely stable and safe as i use it a lot for business. i don't really want to risk any data or risk reinstalling stuff.
so maybe i sound uneducated but like i said i suggest everyone to try this method if they're newbies and don't wanna do too much
I can confirm that setting autokiller to low settings makes the phone feel faster than on high settings, I tried that some time ago.
But lag will still be present.
As mentioned by the poster this is a low risk, low skill method of improving the phone and is easy to do for all.
For all others I recommend the JFS lagfix. It is by far the lagfreest experience out there!
i have a buddy with a moto milestone and his phone lags just the same as ours. his phone has even less free ram than ours and so his is constantly lagging. sometimes he can't even take a phone call while listening to music becoz his phone only has like 50mb of free ram after starting up. so, just a point of reference - our galaxy is crippled with just not enough free ram, i heard stories of nexus one having 200+ free ram after startup and that's why they dont lag like us, so at the end of the day we're fighting a losing batter becoz samsung didn't give us a good enough phone
Mycorrhiza said:
I can confirm that setting autokiller to low settings makes the phone feel faster than on high settings, I tried that some time ago.
But lag will still be present.
As mentioned by the poster this is a low risk, low skill method of improving the phone and is easy to do for all.
For all others I recommend the JFS lagfix. It is by far the lagfreest experience out there!
Click to expand...
Click to collapse
thank u and i may try the jfs fix, but i'm just worried about something happening to the phone becoz of what happened to my buddy who lost all his data (i can't remember which lag fix he used though), i always have this thinking that if the lag fix are 100% safe, then why aren't samsung doing it? samsung are paying tons of money to the programmers i'm sure and you would think they know how to do it too? but they choose not to, and there must be a good reason why.
You have a very good point supraman123! I realized it was the memory management that made the phone go crazy around the 60MB mark (you'll see the kswapd0 process go crazy), but never realized Autokiller could help us lower that mark. I hope this works, would be one of the best and easiest fixes for the SGS.
supraman123 said:
thank u and i may try the jfs fix, but i'm just worried about something happening to the phone becoz of what happened to my buddy who lost all his data (i can't remember which lag fix he used though), i always have this thinking that if the lag fix are 100% safe, then why aren't samsung doing it? samsung are paying tons of money to the programmers i'm sure and you would think they know how to do it too? but they choose not to, and there must be a good reason why.
Click to expand...
Click to collapse
If we know the amount of time and money Samsung spend on developing RFS...
So wait, the phone is faster if the minfree is set higher than default, and the phone is faster if the minfree is set lower than default... holy ****!
I applaud Samsung for figuring out the one setting that makes the phone suck and use that as default. Way to go, Sammy, way to go.
I know what u are talking about. I think it was an ext4 fix. All other lag fixes I know of don't share that problem.
Also with root there are many ways to secure your data prior to installing a lag fix.
Sent from my GT-I9000 using XDA App
Mycorrhiza said:
I know what u are talking about. I think it was an ext4 fix. All other lag fixes I know of don't share that problem.
Also with root there are many ways to secure your data prior to installing a lag fix.
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
hi, thank u, can u tell me how to secure the data? or u have any good links to show me? thanks
jjwa said:
You have a very good point supraman123! I realized it was the memory management that made the phone go crazy around the 60MB mark (you'll see the kswapd0 process go crazy), but never realized Autokiller could help us lower that mark. I hope this works, would be one of the best and easiest fixes for the SGS.
Click to expand...
Click to collapse
i hope it will work good for u also
xmonkee said:
So wait, the phone is faster if the minfree is set higher than default, and the phone is faster if the minfree is set lower than default... holy ****!
I applaud Samsung for figuring out the one setting that makes the phone suck and use that as default. Way to go, Sammy, way to go.
Click to expand...
Click to collapse
i'm quite disappointed at the ram issue also. coming from a n97 mini which seriously lacks ram, i was hoping by going for a high end phone like the galaxy, i aint gonna have to worry about ram and closing apps manually all day, however in reality the Galaxy aint much better than the n97 at multi tasking. of course, it's far better than the n97 at everything else.
I totally agree with OP on this one!
But Autokiller is not the only app that can fix the lag.
One Click Lag Fix 2.0 can root your SGS (Eclair only), lagfix it (with EXT2) and it can even do some additional tweaks like minfree (same as the Autokiller app) and fix the Scheduler.
With minfree Samsung put these values in "/sys/module/lowmemorykiller/parameters/minfree":
"2048,4096,5120,5632,6144,7172"
But best is:
Aggressive: "1536,2048,4096,21000,23000,25000"
or
Strict: "1536,2048,4096,15360,17920,20480" - I prefer this one
btw when you've a lot of ram free the ram is mostly used to cache file system reads ^.^
this explains that a little
Im using the 341MB of free ram so that gives me an instant 40MB ontop of the stock kernel, never seen the phone had less than 60mb free with this kernel, with my usage it doesnt even go under 95mb free.
I am also running one of those kernels that gives extra RAM. And I have all my partitions Ext4 lagfixed. But my phone still seems quite slow at times. My RAM was above 80MB free at that time though, so probably not related to any minfree/Autokiller thing at all. Which means there are way more causes to get rid of I guess.
I don`t know how you guys have problems with the lag, I use the stock samsung JPO, not even deodexed with zankinz 23 kernel and NO-RFS all ext4 lagfix and the phone is running perfectly, no lag whatsoever, the RAM is somewhere near 220 mb free after reboot. After deodexing and optimizing the apk`s the phone should run even better. I was determined to change my SGS with a Desire HD, but now I`m really thinking of keeping it.

[Q] Ram doesn't add up? (Not the usual question)

Hello,
So I just recently got my Nexus, and I'm really really loving it. I had a question about the RAM. I'm on stock un-rooted and I noticed I had a little less that 700 MB ram. I know that's for system or gpu or whatever so I'm ok with that.
What I'm confused about is, I'm currently using 400 MB of it. If I combine the totals from the "Running Apps" section plus what is in the "Cached" section, it doesn't come close to the total 400MB being used.
So where is the extra Ram being used from? How can I free some of it up?
I've been reading that task managers are a no-no for ICS, so I'm more curious about which apps are killing my ram.
Thanks in advance
ellimistx99 said:
How can I free some of it up?
Click to expand...
Click to collapse
Why would you want to?
killing my ram.
Click to expand...
Click to collapse
Killing it how? Using it to make you phone react faster?
beren28 said:
Why would you want to?
Killing it how? Using it to make you phone react faster?
Click to expand...
Click to collapse
Well sure in theory make the phone run faster. I imagine having more free ram available to be used in the cached application section and not the "running application section" will help make apps load quicker too. My friend had a desire and the amount of ram she had did drastically effect her phone performance.
But also because I'm curious about where is that extra 200 or so MB of ram is being used from?
Linux shares ram within apps/processes in a very complex way where even the experts have difficulty explaining exact tallies on ram levels. This is why different apps report different free ram values like os monitor vs system panel vs stock settings etc. So i wouldnt wprry about how android OS shows your ram value in settings, its not gonna add up and its a tricky question to ask.
RogerPodacter said:
Linux shares ram within apps/processes in a very complex way where even the experts have difficulty explaining exact tallies on ram levels. This is why different apps report different free ram values like os monitor vs system panel vs stock settings etc. So i wouldnt wprry about how android OS shows your ram value in settings, its not gonna add up and its a tricky question to ask.
Click to expand...
Click to collapse
Hmm alright. So basically it's not something I should worry about? It's quite a large discrepancy. I guess I'll worry about it once I have errors that are "low ram" or something to that effect.
Thanks anyway
It's the discussion like there was in the galaxy s forum. The not displayed ram is used by the kernel it self and by the GPU. And besides it's a good thing to have a full ram in Android, because then many apps are pre loaded in the ram and can start faster this way.
Sent from my Galaxy Nexus using XDA
ellimistx99 said:
Hmm alright. So basically it's not something I should worry about? It's quite a large discrepancy. I guess I'll worry about it once I have errors that are "low ram" or something to that effect.
Thanks anyway
Click to expand...
Click to collapse
Its always been like this on my android phones, i wouldnt worry. For example if you kill all current apps, you wont see free ram increase at the exact level of the total of all closed apps. Too much overlap and ram page sharing i think.
Don't worry about it. Some ROMs e. the stock ROM, don't have a seperate RAMDisk.
So, basicly, the ROM dumps some cached processes on to the RAM directly "clogging" it. If you however, have a custom ROM, eg. CynagonMod, the system uses half of the RAM it would use as a stock ROM, because cm uses a RAMDisk, which uses a minimal amount of space, on the device's memory.
But, there's absolutley nothing to worry about
Enjoy the phone and leave the RAM, as it is
Can anyone here tell me how to partition my sd card to create 1 ext4 partition to increase internal memry, 1 simple fat partition for daily use, and most importantly gto create 1 swap partition to increase my RAM and how to use it as RAM in galaxy fit ... Plz provide me a tutorial
Sent from my GT-S5670 using XDA
abhinav2196 said:
Can anyone here tell me how to partition my sd card to create 1 ext4 partition to increase internal memry, 1 simple fat partition for daily use, and most importantly gto create 1 swap partition to increase my RAM and how to use it as RAM in galaxy fit ... Plz provide me a tutorial
Sent from my GT-S5670 using XDA
Click to expand...
Click to collapse
The Galaxy Nexus doesn't have an SDcard. You can't partition it up like that.
Also, think you're in the wrong forum.

[Q] Low Ram

Is this normal?. my ram is really low and im only running what you can see?
Any advice please:fingers-crossed:
I wouldn't say that's too low. So you can sit back and relax
Sent from my One V using xda app-developers app
oh rite thanks!
Yes show me ur cached process es
Mine is alot more like 144 mb free
Sent from my One V using xda premium
View attachment 1505207
Sent from my One V using xda premium
Sorry for the late reply. I was root/s-off a friends desire for him
here it is.
EDIT:::: I have 0 ram free now!
striped121 said:
Sorry for the late reply. I was root/s-off a friends desire for him
here it is.
EDIT:::: I have 0 ram free now!
Click to expand...
Click to collapse
Reboot, delete some useless apps, close out of your programs more often.. etc
Sent from my HTC One V using xda app-developers app
that's too less mate.. i never have less than 70mb ram
even though i use SwiftKey and whats app
what i use is titanium tweaker app from the market
go to voltage set it to - 150 (for battery)
note set to - 150 only if you're oc to 1024
if higher don't do.. The phone won't respond..
then go to advance/turbocharger lmk
select megaram2
done see the difference
Sent from my One V
dude unless u play games mine always shows 144 mb, remove **** that u dont use
download this from the market
https://play.google.com/store/apps/details?id=com.rs.autorun.pro&hl=en
the paid one is awesome,but there is a free one also!, diavle the startup of junk bloatware and reboot!
4 bucks for a 87KB app? xD
Lowest ram I had was 51MB, and I use Sense 4.1. I would say using task killers help if your one of them people who want to see your ram high. If your device feels sluggish after use, use a task killer, or reboot.
I'm sure CM has that low mem problem though ither way. I saw someone posting bugs about it.
Sent from my HTC One V using Tapatalk 2
Curiousn00b said:
4 bucks for a 87KB app? xD
Lowest ram I had was 51MB, and I use Sense 4.1. I would say using task killers help if your one of them people who want to see your ram high. If your device feels sluggish after use, use a task killer, or reboot.
I'm sure CM has that low mem problem though ither way. I saw someone posting bugs about it.
Sent from my HTC One V using Tapatalk 2
Click to expand...
Click to collapse
use the free version then!
Suppose ill just ignore it then as my phone is smooth and fast anyhow. just curiious to why really. it's at about 70 now on average.
striped121 said:
Suppose ill just ignore it then as my phone is smooth and fast anyhow. just curiious to why really. it's at about 70 now on average.
Click to expand...
Click to collapse
i said it numerous times... android is NOT windows. your free ram in linux => your system fails to work. your free ram in windows => you can open up more programs until the ram is full.
in linux it is better to have the whole ram full, not free. if you want more infos, you can search on the net.
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
Click to expand...
Click to collapse
and
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.[65] 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
source: Wikipedia
1ceb0x said:
i said it numerous times... android is NOT windows. your free ram in linux => your system fails to work. your free ram in windows => you can open up more programs until the ram is full.
in linux it is better to have the whole ram full, not free. if you want more infos, you can search on the net.
and
source: Wikipedia
Click to expand...
Click to collapse
Thanks for giving everyone who isn't aware some knowledge :highfive:Getting tired of these kinds of topics.
"More doesn't always mean better"
1ceb0x said:
i said it numerous times... android is NOT windows. your free ram in linux => your system fails to work. your free ram in windows => you can open up more programs until the ram is full.
in linux it is better to have the whole ram full, not free. if you want more infos, you can search on the net.
and
source: Wikipedia
Click to expand...
Click to collapse
but 1ce keeping them in the memory drains battery also right? so i prefer just remove some bloatware auto start aps
rockstar_26 said:
Thanks for giving everyone who isn't aware some knowledge :highfive:Getting tired of these kinds of topics.
"More doesn't always mean better"
Click to expand...
Click to collapse
if your tired of these kind of topics then simply dont read them.
I Thank you for the info and understand perfectly now as i've never used linux prior to android annd never wanted to.
cybervibin said:
but 1ce keeping them in the memory drains battery also right? so i prefer just remove some bloatware auto start aps
Click to expand...
Click to collapse
wrong. they remain in memory but they will not consume anything. that's what cache memory means.
1ceb0x said:
wrong. they remain in memory but they will not consume anything. that's what cache memory means.
Click to expand...
Click to collapse
I am backig up everything Ice wrote above...
Also if you need auto start manager(free) go check this two https://play.google.com/store/apps/...1bGwsMSwxLDEsImltb2JsaWZlLnRvb2xib3guZnVsbCJd
https://play.google.com/store/apps/...wxLDEsImNvbS5qcnVtbXkubGliZXJ0eS50b29sYm94Il0.
Much more then just auto start managers..enjoy

[Q][Disqus] "Dalvik.vm.dexopt-flag=???" - What are the best for performence

As the title state. And please get it together & keep it clean, as this is kinda important to all.
Any help & explaination would be much apprecited.
Regards,
Sdojoin
I used to mess wit this on the X10, and did find better values. But for the Xperia Play, at least on CM10, any extra or changed flags either causes worse performance or FC's.
The defaults I use are:
Code:
dalvik.vm.dexopt-flags=m=y
Which means "Map registration = yes" (this should always be on) and everything else at default (what the ROM wants to do).
90% of what you need to know (and what is safe to experiment with) can be found in the DalvikVM documentation. Give it a good read.
Re: [Q][Disqus] "Dalvik.vm.dexopt-flag=???" - What are the best for performence
Thanks. But i was wondering if mybe we can "force" the system/rom to optimize the dalvik.vm each time we use it.
Example;
Code:
dalvik.vm.dexopt-flag=o=y,m=y(optimize=yes, register map=yes)
Or
Code:
dalvik.vm.dexopt-flag=o=v,m=y(optimize=verify,register map=yes)
Will it make any diff?? I know it'll use more ram than usual, but will it increase performence??
Regards,
Sdojoin
o=v (-Xdexopt:verified) is the default, as is v=a (-Xverify:all). This means that only opts that are verified will be optimized (cached to dex files). Unverified code will not be optimized.
Disabling verification will make dalvik-generation faster, but it is less safe and also 0% faster once the dalvik-cache is generated. Apparently it has the possibility of decreasing RAM usage at the expense of higher IO or CPU cycles (which wouldn't be bad, since RAM is the main limiting hardware on Xperia 2011 devices) but I never noticed any difference.
The only real change you can make there is o=a, which means that it will optimize *all* dalvik opts - even those that fail verification. In the case of custom ROM's, this usually results in constant FC's and even reboots - and can even make the system slower because some classes are intentionally made to fail verification when, in the development process that they were found to have overhead in dalvik-cache reading making the unverified cache slower than just reading reading the dalvik (compiled Java code) directly. This is usually the case with simple Java methods that are heavily dynamic and rarely used (e.g. on a service startup).
Another option can be v=n o=a which means to verify nothing and optimize everything (potentially the fastest but also unsafest).
With all this said, I have not tried messing with these things since Gingerbread. All I can say is, experiment with these flags. Measure the size of dalvik-cache, the time it takes to generate, and the time it takes to load a large dalvik app (look for an app/game that has a very large DEX file in dalvik-cache, measure different parts of the app/game loading sections since some parts might be native instead of dalvik/java).
Re: [Q][Disqus] "Dalvik.vm.dexopt-flag=???" - What are the best for performence
How exactly do i do that test??
Fyi, i already tried the v=n,o=a sett. It kinda denied su perm or mybe unroot my device. Coz i cant get any root app running & i hav to revert it back via flashable .zip. But like u said, its un-safe to use.
In-conclusion, "it can increase our perf & decrease it at the same time.". Erm...
Oh yeah, is it posible if i were to flag it like this??
Code:
dalvik.vm.dexopt-flag=m=o=y(map registration=Xdexopt=yes)
Just curious.
Regards,
Sdojoin
sdojoin said:
How exactly do i do that test??
Fyi, i already tried the v=n,o=a sett. It kinda denied su perm or mybe unroot my device. Coz i cant get any root app running & i hav to revert it back via flashable .zip. But like u said, its un-safe to use.
In-conclusion, "it can increase our perf & decrease it at the same time.". Erm...
Oh yeah, is it posible if i were to flag it like this??
Code:
dalvik.vm.dexopt-flag=m=o=y(map registration=Xdexopt=yes)
Just curious.
Regards,
Sdojoin
Click to expand...
Click to collapse
Nah, that makes no sense.
Read through this thread: http://forum.xda-developers.com/showthread.php?t=1622433
CosmicDan said:
Nah, that makes no sense.
Read through this thread: http://forum.xda-developers.com/showthread.php?t=1622433
Click to expand...
Click to collapse
Already read that actually.. I've already search & read through the web bout this still cant find any straight answer bout this. But then again there aren't any straight answer bout this, is there??
Another thing i would like to ask is bout vm.heapsize. Correct me if i'm wrong, the default value for all device is 32m, right?? And all my search state that 48m is the best value for both batt drain & perf. What do u think of that?? I really believe Play can do more & perform better in any case of situation. Dont matter either on stock or custom. Just need the right tweakin'.:fingers-crossed:
Well that first link I posted explains pretty much everything about the dalvik flags, and that thread I posted last is a good experiment for learning purposes. If it doesn't make sense I guess you need to know more about the Android technicals. But really, I think you can't wrap your head around it for one simple reason - there is no magical dalvik setting that will make the device faster. There is no "hidden setting" or "something Sony/FXP forgot to try" - the dalvik settings are fine, and while changing them may slightly increase performance in *some* cases, it will almost always reduce reliable and performance in other cases.
About dalvik heapsize:
The dalvik.vm.heapgrowthlimit property limits how large an Android application’s heap can get before garbage collection has to be attempted. The dalvik.vm.heapsize property defines an absolute maximum for the heap size for an application even when the largeHeap flag is set in the manifest. Google’s motivation behind doing this was clearly to limit the heap size to a reasonable amount for most applications, but also give some flexibility to app developers who know they’re going to need the largest heap size possible to run their application.
Should you change this setting? Probably not. The ICS default for a phone with (at least) 1024MB of RAM is 64m. You can check your specific phone’s value as the hardware vendor can override this themselves when they build the ROM. But don’t let the disparity between 1024 and 64 bother you; most mobile apps should not have any problems with 64MB of heap size unless the developers are naughty. When this limit is reached, a garbage collection routine will remove obsolete objects from memory reducing the heap size down considerably in most cases. It is extremely unlikely raising this value to reduce GC routines will have any perceptible effect. If anything, it could cause other apps or the general system to suffer from too many stale objects sulking around in memory. Garbage collection will inevitably occur either way, and when it does, the size of the heap will likely have a direct impact on the cost of the routine.
The point is, it is impossible for a user to optimize for every application using this system-wide setting. This responsibility falls on application developers to optimize their applications, not users. The largeHeap flag was created to allow developers to do just that. If you do feel compelled to experiment with this setting regardless, be mindful that an application could have up to two heaps at once. Thus, the heap growth limit value should always be, at most, a little less than half of the maximum allowable heap size.
Click to expand...
Click to collapse
In summary - heapsize = memory an app can consume before Android starts cleaning/pruning the app's memory for data that isn't in use. Lowering it to e.g. 40m can increase performance a bit but some games fail to load (because the OS starts GC when the app has not finished using the heap it requires; and also because so many game developers out there are lazy and don't do threaded asset loading properly)
Re: [Q][Disqus] "Dalvik.vm.dexopt-flag=???" - What are the best for performence
Hmm... Quite a mouthfull. Imma try & digest it slowly just so i could grasp everything properly.
A side Q, the 40m example u gav, does that really help?? I'm on GB btw. Only went to ics or jb when i got free time to test.
Do u recommend that example to be use or do u hav any other recommendation that would probably help me & other that read this thread??
Regards,
Sdojoin
Re: [Q][Disqus] "Dalvik.vm.dexopt-flag=???" - What are the best for performence
Experiment and see as long as you make backups, nothing can possiblii go wrong.
Sent from Xperia Play (R800a) with Tapatalk
Re: [Q][Disqus] "Dalvik.vm.dexopt-flag=???" - What are the best for performence
Right on. Thanks for ur time & for sharing ur experience & everything.
Salute.
Regards,
Sdojoin
No problem. Let me know if you find anything interesting. But you are on GB and I'm on JB, still I don't have much time to mess with this stuff - especially now that my linux machine is back in action
Re: [Q][Disqus] "Dalvik.vm.dexopt-flag=???" - What are the best for performence
Woo.. Guess we can expect smething new from ya?? And i think i found smthing thats kinda weird or mybe interesting. After i disable the bytecode verifier, any heapsize that i put on build.prop dosent stick. And when i run this code on terminal,
Code:
getprop dalvik.vm.heapsize
It always came up with the same value. So i decided to use that value instead. I dont know if its the best value or not. But it does shows slight improvement. I havent try any games yet. Hopefully it perform a bit better than be4.
Regards,
Sdojoin
Hey,
These have seemed to improve performance (mainly boot time and app loading) on Gingerbread. They are set in new Turbo UI Classic ROM, give them a try.
Code:
# was m=y
dalvik.vm.dexopt-flags=m=y,v=n,o=v,u=n
TBH, I really don't know a lot about how the dalvik flags tie together. But this seems to work well and stable.
CosmicDan said:
Well that first link I posted explains pretty much everything about the dalvik flags, and that thread I posted last is a good experiment for learning purposes. If it doesn't make sense I guess you need to know more about the Android technicals. But really, I think you can't wrap your head around it for one simple reason - there is no magical dalvik setting that will make the device faster. There is no "hidden setting" or "something Sony/FXP forgot to try" - the dalvik settings are fine, and while changing them may slightly increase performance in *some* cases, it will almost always reduce reliable and performance in other cases.
About dalvik heapsize:
In summary - heapsize = memory an app can consume before Android starts cleaning/pruning the app's memory for data that isn't in use. Lowering it to e.g. 40m can increase performance a bit but some games fail to load (because the OS starts GC when the app has not finished using the heap it requires; and also because so many game developers out there are lazy and don't do threaded asset loading properly)
Click to expand...
Click to collapse
Ther is one thing i don't understand: the default values of the Nexus 7 are:
dalvik.vm.heapstartsize=8m
dalvik.vm.heapgrowthlimit=64m
dalvik.vm.heapsize=384m
Especially the heapsize seems to be very high.
The defauklt settings of my Galaxy Note with CM10.1 are:
dalvik.vm.heapstartsize=8m
dalvik.vm.heapgrowthlimit=48m
dalvik.vm.heapsize=128m
So they are much lower values. Bothe devices have 1Gb of Ram.
Some people say higher=better, some say lower=better and I'm really confused now.
What are the "perfect" values for the Galaxy note (1GB Ram) or Note 2 (2GB Ram) ?
I hope somone can explain me these things :fingers-crossed:
xxLeoxx93 said:
Ther is one thing i don't understand: the default values of the Nexus 7 are:
dalvik.vm.heapstartsize=8m
dalvik.vm.heapgrowthlimit=64m
dalvik.vm.heapsize=384m
Especially the heapsize seems to be very high.
The defauklt settings of my Galaxy Note with CM10.1 are:
dalvik.vm.heapstartsize=8m
dalvik.vm.heapgrowthlimit=48m
dalvik.vm.heapsize=128m
So they are much lower values. Bothe devices have 1Gb of Ram.
Some people say higher=better, some say lower=better and I'm really confused now.
What are the "perfect" values for the Galaxy note (1GB Ram) or Note 2 (2GB Ram) ?
I hope somone can explain me these things :fingers-crossed:
Click to expand...
Click to collapse
There never exist "perfect values for dalvik".
It is how you want to allocate memory.
1. VM Heap Size is max Memory per one ram heal that can be given to an app.
2. Heapstartsize is the minimum size for a dalvik ram heap.
3. HeapGrowthLimit is a value for "normal" VM heaps, I reccomend setting VM heap size large and then HeapGrowthLimit at a good value.
Sent from my GT-I9300 using xda app-developers app
CosmicDan said:
Hey,
These have seemed to improve performance (mainly boot time and app loading) on Gingerbread. They are set in new Turbo UI Classic ROM, give them a try.
Code:
# was m=y
dalvik.vm.dexopt-flags=m=y,v=n,o=v,u=n
TBH, I really don't know a lot about how the dalvik flags tie together. But this seems to work well and stable.
Click to expand...
Click to collapse
Already tried n went back to m=y. It kinda hung up on some app that make'em fc. A diff sequence mybe??
Regards,
Sdojoin
sewer56lol said:
There never exist "perfect values for dalvik".
It is how you want to allocate memory.
1. VM Heap Size is max Memory per one ram heal that can be given to an app.
2. Heapstartsize is the minimum size for a dalvik ram heap.
3. HeapGrowthLimit is a value for "normal" VM heaps, I reccomend setting VM heap size large and then HeapGrowthLimit at a good value.
Sent from my GT-I9300 using xda app-developers app
Click to expand...
Click to collapse
No it's not. All the heapsize parameters are to do with GC, they have nothing to do with "how much memory" dalvik tasks will use but determine barriers/zones for garbage collection.
Besides, if you read the therad you'd see that this has nothing to do with what we're talking about. We're talking on *flags*, heap parameters should NEVER be changed and will only make device unreliable.
EDIT: Read documentation before repeating what others say on the internet - http://show.docjava.com/posterous/file/2012/12/10222640-The_Dalvik_Virtual_Machine.pdf
sdojoin said:
Already tried n went back to m=y. It kinda hung up on some app that make'em fc. A diff sequence mybe??
Regards,
Sdojoin
Click to expand...
Click to collapse
Hmm fair enough. Well I've only ever seen m=y on any ROM, stock or custom or otherwise (as long as it hasn't been screwed up by some idiot chef). So maybe it's just a case as most so-called tweaks - what it comes with is what it's designed to work with.
Perhaps with the Qualcomm-accelerated Dalvik blobs (I posted it a while back, check my threads) there will be different results.
sdojoin said:
Already tried n went back to m=y. It kinda hung up on some app that make'em fc. A diff sequence mybe??
Regards,
Sdojoin
Click to expand...
Click to collapse
have you delete dalvikcache and reboot on every change?
mpjoe2000 said:
have you delete dalvikcache and reboot on every change?
Click to expand...
Click to collapse
Same.. Thats y its weird.
@CosmicDan - can u giv the thread link?? Thx
Regards,
Sdojoin

Categories

Resources