[Q] Optimal VM Heap Size for Nexus S? - Nexus S Q&A, Help & Troubleshooting

Anyone know the optimal value of VM heap size for Nexus S?
It's default value is 32, but Galaxy S GB update set the value to 64.
Is 64 okay to Nexus S?

You can set the value to anything you want. It just says how much memory one app can use at maximum.
So there is no real need to raise it until apps start complaining about not enough memory.

They never complain. Android just shuts them down. So it depends on your usage when you notice that one app got killed while you started another bump up your heap.
Sent from my Nexus S 4G using XDA App

obsanity said:
So it depends on your usage when you notice that one app got killed while you started another bump up your heap.
Click to expand...
Click to collapse
Sorry, but that's not how it works. The memory usage of one app has nothing to do with the usage of another. We are talking about the maximum memory allowed for (in general) ONE app.
When your apps are well-behaved, i.e. well-programmed, then the max heap size should not make any difference, as long as it is big enough for the app to run in the first place.
It is more likely that the higher your max heap setting is, the fewer apps can run in parallel, because android will keep VMs with large heaps around.

Could anybody please comment on the VM HEAP SIZE since I am noticing that the latest 4.2.2 has 128MB in this setting!!! My device is still the same and i have not started using some crazy games with lots of requirements. Is this 128MB good for my device or not??? To me it sounds like it is not.
Could anyboyd tell me if they went back to the original 32/64MB?

Related

Low Available Memory

When my phone just started it is about 180, then it dropped to 90 after extensive use (20ish minutes).
That is even after using advanced task killer...
Anyone else experiencing this?
That's still plenty o' memory.
Keep in mind that there's a lot of folks getting good performance out of Droids, Milestones, etc, that have half the RAM (256) to start with, and hover around 20-30mb free in normal operation.
I was curious about this myself and was going to make a thread about it soon. Regardless of if it's enough free memory, I'm still a little confused as to where all my memory is going. When I close everything with TasKiller, I can get to about 175 MB of RAM free. I have a friend with an EVO that always gets well over 200 MB free, and I imagine that the HTC Sense UI would use a lot more memory than Launcher Pro (which is what I'm using)... but I could be wrong.
I can hit about 230 free after killing all tasks. I uninstalled all the ATT apps not sure if that had anything to do with it. I also use Touchwiz with only 2 Widgets accross 2 home screens.
maybe its android 2.1 that has a cap on the memory
Guys, a little piece of advice if you're new to Android. Don't sweat memory usage, if it's above 40mb free you're generally doing just fine.
And those apps that are using memory aren't using much if any CPU cycles or power, most are just cached in case you need them, and are wiped out of the cache if something else needs the memory.
On the other hand, if you're killing a lot of background tasks by reflex, those tasks are taking MORE time and power to reload again if they're no longer cached, plus there's the overhead of the Task Killer. It's especially bad if you have a Task Killer set to auto-kill apps, even more overhead as the task killer has to remain active to sniff for things to auto-kill.
Task Killers are the devil, and they're like crack. Just walk away.
labbu63 said:
maybe its android 2.1 that has a cap on the memory
Click to expand...
Click to collapse
Thats what some people are saying. They said we should see more avail RAM when the 2.2 update comes out. Or if someone can do some kernel wizardry.
The specs on the box do not mention any amount of RAM. I would be unhappy if ATT only put in 256! I didn't look through the manual maybe it says in there.
Bjd223 said:
Thats what some people are saying. They said we should see more avail RAM when the 2.2 update comes out. Or if someone can do some kernel wizardry.
The specs on the box do not mention any amount of RAM. I would be unhappy if ATT only put in 256! I didn't look through the manual maybe it says in there.
Click to expand...
Click to collapse
im going to look into this more cause thats strange but i dont think you should worry much about the ram cause like it was said before if u have 40mb free ur still good
labbu63 said:
maybe its android 2.1 that has a cap on the memory
Click to expand...
Click to collapse
Indeed that seems to be the case, many threads about the issue can be found elsewhere on xda or google. Also this technical article from google: developer.android.com/sdk/android-2.2-highlights.htm (I can't post links yet)
yep ur right says more mem support at near bottom http://developer.android.com/sdk/android-2.2-highlights.html
2.6.32 kernel upgrade
HIGHMEM support for RAM >256MB
so it seems cause of the kernel
Well that's interesting. So you're saying that no matter what, right now we're only accessing 256 MB of RAM? I hadn't heard that before about 2.1, but that would be cool if our RAM essentially doubled in 2.2 (along with the massive CPU speed gains seen).
Again, it's not so much being worried that I'm going to run out of memory. It's simply a discussion on what people think we should be seeing. I'm certain that I don't have enough running to use 300 MB of RAM, which is why the question was raised. So I think we have our answer now and can rest easy waiting for 2.2.
As for the task killers... I honestly am more worried about CPU cycles for things I've left in the background than RAM. I've noticed my phone basically hang for a few seconds every so often, and I can only assume that something in the background is causing it. I'm going to turn off auto kill and not kill tasks manually for a while and see if there is any difference during use.
labbu63 said:
im going to look into this more cause thats strange but i dont think you should worry much about the ram cause like it was said before if u have 40mb free ur still good
Click to expand...
Click to collapse
40? No. 40mb of free RAM is unacceptable with todays smartphones on the market. I own a Captivate as well as a Nexus One and my Nexus consistently has 200-250 avail RAM. However when they first released the phone they only released it with 256 avail making my phone normally read about 120- 130 avail RAM. Now its been opened up to the 512(unless it had already been rooted) and it is much quicker than before. I'm wondering if something similar has been done with this phone.
well if it does have more than 256 mb it will be able to recognize rest in 2.2 as you said about ur nexus one maybe its just that the software on the captivate thats showing less you never know just gotta wait till some dev figures it out hopefully not to long
My phone is reporting 325mb of RAM, so I'm not sure if this is the same kernel limitation. I would appreciate if anyone could enlighten me as to whether or not the full 512 I was under the impression this phone possessed will be available under 2.2.
Sent from my SAMSUNG-SGH-I897 using XDA App
ttalaoc said:
My phone is reporting 325mb of RAM, so I'm not sure if this is the same kernel limitation. I would appreciate if anyone could enlighten me as to whether or not the full 512 I was under the impression this phone possessed will be available under 2.2.
Sent from my SAMSUNG-SGH-I897 using XDA App
Click to expand...
Click to collapse
That's exactly the limitation being talked about. Yes, 512 will be available after 2.2.
Until then, don't worry about it. Don't install a task killer, they just waste your time worrying about it. The OS has built in levels of memory where it starts to kill off different types of apps from background idle, all the way up to foreground active if entirely necessary. It WILL kill the extra apps if you need the memory.
I have been running ATK constantly since I got my Captivate a couple days ago. Not really concerned with memory usage as much as battery life. So far I get one full day of use before recharge, but I expect that to go up once I stop turning on the screen every few minutes to play with it. Can auto task killing negatively affect battery life?

Rom Manager advanced settings

I know most are going to say if you dont know what it does dont mess with it. Just have been reading alot but curious how it may vary from phone to phone?
If I may I will list some basic stuff.
SD card boost, I have read about this and it depends on the speed of your card, so what is the standard card rated at or what do you set it at?I set mine at 1024.
Auto memory manager, 8,10,16,32,64
Sysctl tweaks, Have read alot about this over the years with different phones and it is never really clear so dont ever touch it.
Build. prop tweaks
I have my lcd density at 235, vm heap at 55m so far and dont really use wifi.Have thought about trying to adjust the vm heap.
Cpu slider I have tried both conservative and ondemand but havent decided. Ofcourse if you read the basic stuff as to if you want performance or save battery it explains it.
Last I have also read about configure apps to sd card or internal memory. Some of the non important apps I dont use all the time went straight there.
Well let my education or slamming begin.
I'd say that vm heap is too high. I know it's subjective, but I don't think you'll gain anything over about 48, and most rims i've downloaded on 1ghz/512 phones seems to be set at 42 or 48.
Sent from my SCH-I510 using Tapatalk
ilovesoad said:
I'd say that vm heap is too high. I know it's subjective, but I don't think you'll gain anything over about 48, and most rims i've downloaded on 1ghz/512 phones seems to be set at 42 or 48.
Sent from my SCH-I510 using Tapatalk
Click to expand...
Click to collapse
Depends. Some purposes need it higher. Team GummyCharged just released a patch to fix TSM Parts hot boot issues that increased the heap size to 80, and it seems to have done the trick. Last time I tried GC, I had multiple hot boots a day...haven't had one on the new settings yet.
I just saw something yesterday when I was on imoseyon page any had it about 80. Was doing alot of reading all over. Will play around a litte to see what may work.

virtual memory heap size

what should i have this set on its default at 32m atm and wanted to know what everyone else has theirs at
boroboy69r said:
what should i have this set on its default at 32m atm and wanted to know what everyone else has theirs at
Click to expand...
Click to collapse
I set mine at 64m.Some even set it as high as 88m on the new ICS Roms.. They claim it improves speed and performance.You can experiment with different values and see what works best for your Rom.
The higher you set it the more battery you end up using.
I have mine set to 64 as most people that I know do. Seems to be a good balance.

Your Average Free Ram

I'm curious about how much free ram everyone has on average after their rom has finished booting and stabilized! Post it here!!!
jookdakang23 said:
I'm curious about how much free ram everyone has on average after their rom has finished booting and stabilized! Post it here!!!
Click to expand...
Click to collapse
Say like fresh boot let it sit for 5 minutes??? Post what rom and kernels you are using as well, as some of us are on the mobile app.
EB build 3 ICS, built in kernel.
Sent from my LG-P999 using xda premium
mt3g said:
Say like fresh boot let it sit for 5 minutes??? Post what rom and kernels you are using as well, as some of us are on the mobile app.
EB build 3 ICS, built in kernel.
Sent from my LG-P999 using xda premium
Click to expand...
Click to collapse
you must have nothin running lol
jookdakang23 said:
you must have nothin running lol
Click to expand...
Click to collapse
it was a fresh boot, I didn't open anything just let it sit for a cigarettes length and then looked at it. Now that I have used the phone I'm at 191MB.
mt3g said:
it was a fresh boot, I didn't open anything just let it sit for a cigarettes length and then looked at it. Now that I have used the phone I'm at 191MB.
Click to expand...
Click to collapse
o ok, ics does manage ram better than gb anyway. im using weapon g2x
Just did a fresh boot on stock 2.3.3 (unrooted) and let it sit for five minutes. I have 1weather running in addition to a couple game push notification services. I have 238 mb free ram right now.
UCFJake said:
Just did a fresh boot on stock 2.3.3 (unrooted) and let it sit for five minutes. I have 1weather running in addition to a couple game push notification services. I have 238 mb free ram right now.
Click to expand...
Click to collapse
how about a screenshot? that's pretty good!
Here it is. It bumped down to 237mb by the time I thought to screenshot it.
i run about 40-80mb free on average just the way i want it.
Android uses ram differently than other operating systems like windows or linux,
it fills your ram with things that you have run already in hopes that youll run them again and it will be alot faster the second time. if it needs that ram for something else, it just kills a program and removes it from ram (this takes VERY little time)
so the more ram used the better
Klathmon said:
i run about 40-80mb free on average just the way i want it.
Android uses ram differently than other operating systems like windows or linux,
it fills your ram with things that you have run already in hopes that youll run them again and it will be alot faster the second time. if it needs that ram for something else, it just kills a program and removes it from ram (this takes VERY little time)
so the more ram used the better
Click to expand...
Click to collapse
I understand what you are saying but in some cases like mine, I only have about 5-8 apps that I use.
mt3g said:
I understand what you are saying but in some cases like mine, I only have about 5-8 apps that I use.
Click to expand...
Click to collapse
thats about all it holds. the VM heap settings are what causes this (in part) each app gets its own virtual machine to run in, this has a limited heap (ram) size of whatever is set in there.
so if your VM heap size is set to 48mb... 48 * 5 = 240mb and 48 * 8 = 384mb
add in whats needed for Android system, kernel, and various background processes that you need... its all gone
Klathmon said:
thats about all it holds. the VM heap settings are what causes this (in part) each app gets its own virtual machine to run in, this has a limited heap (ram) size of whatever is set in there.
so if your VM heap size is set to 48mb... 48 * 5 = 240mb and 48 * 8 = 384mb
add in whats needed for Android system, kernel, and various background processes that you need... its all gone
Click to expand...
Click to collapse
fair enough, never thought of that.
mt3g said:
fair enough, never thought of that.
Click to expand...
Click to collapse
it honestly was not that long ago that i was using a task killer, killing every freakin app running because i was mad it was using up all my ram... then i wanted to start developing stuff for android, and i quickly learned the error of my ways
so u dont agree with auto task killers and you saying the system runs better with lower ram?
that's what he is saying, that's been known since eclair was introduced to android though... I just never thought of the more ram being used the better.
This is what I have left! Running latest euroskank cm7. Was 130 right before screen shot
Sent from my LG-P999
jookdakang23 said:
so u dont agree with auto task killers and you saying the system runs better with lower ram?
Click to expand...
Click to collapse
that's what I'm sayin! if the OS already has the program your trying to launch in memory, it wont need to load it, saving time and power.
and if you kill programs forcefully, android (kinda) treats it like it crashed, and reloads it into memory soon after...
Klathmon said:
that's what I'm sayin! if the OS already has the program your trying to launch in memory, it wont need to load it, saving time and power.
and if you kill programs forcefully, android (kinda) treats it like it crashed, and reloads it into memory soon after...
Click to expand...
Click to collapse
ok so memory can go below 100mb without a problem because i always try to free memory around 150mb
jookdakang23 said:
ok so memory can go below 100mb without a problem because i always try to free memory around 150mb
Click to expand...
Click to collapse
it all depends on what your min-free settings are.
the apps that fall into each category are slightly different for each ROM, but whatever the highest setting is at is what your free memory should sit around, and it can and will fluctuate alot for seemingly no reason.
and before you all go out and change them as high as you can, just know that free memory is wasted memory, it takes NO power to keep things in memory, but it does take power to put things in memory every time you open it!
This explains it a bit better than i can.
Klathmon said:
it all depends on what your min-free settings are.
the apps that fall into each category are slightly different for each ROM, but whatever the highest setting is at is what your free memory should sit around, and it can and will fluctuate alot for seemingly no reason.
and before you all go out and change them as high as you can, just know that free memory is wasted memory, it takes NO power to keep things in memory, but it does take power to put things in memory every time you open it!
This explains it a bit better than i can.
Click to expand...
Click to collapse
makes sense, so basically task killers do the complete opposite? lol i will let services and apps stay in memory without a task killer and see how things go

[Q] Nexus 5: set the size of devices as you want

Hello,everyone!
I have a Nexus 5 whose ram size is about 2GB. Now, I want to change the ram size to 1G or anything else below 2.
Do you have any idea? If so, please share with us now. I'll appreciate that very much!
Someone told me that I might try the bootloader, but I havn't figured that out yet. Please help me out! Thanks again!
Hi,
But... Why do you want to reduce your RAM size????
RAM is allocated to user apps, system, GPU, etc... it's possible (for some devices) to re allocate the RAM for the GPU (a little more) for example at kernel level, but here you want to re allocate 1 Gb of RAM, seriously? Why? Even if it was possible, here what do you expect?
For other devices with an unlock bootloader it's the system partition size (I don't remember the exact name) you re allocate to be used for the user (apps), maybe it will be possible in the future for the N5?
But here, honestly, I don't uderstand why you want that
viking37 said:
Hi,
But... Why do you want to reduce your RAM size????
RAM is allocated to user apps, system, GPU, etc... it's possible (for some devices) to re allocate the RAM for the GPU (a little more) for example at kernel level, but here you want to re allocate 1 Gb of RAM, seriously? Why? Even if it was possible, here what do you expect?
For other devices with an unlock bootloader it's the system partition size (I don't remember the exact name) you re allocate to be used for the user (apps), maybe it will be possible in the future for the N5?
But here, honestly, I don't uderstand why you want that
Click to expand...
Click to collapse
Firstly, thanks for your response!
Now I'm doing a series of experiments on swap partition. For the ram size of N5 is a little too large to make use of the swap area I created.
So I want to make the ram size small enough so that the device could run out of memory and would swap things out to emmc(swap area).
Have I made it clear to you? Looking forward to your reply!:fingers-crossed:
Hi,
Yes it's a little clearer, maybe, but why do you want that? What kind of experimentation are you doing? It's totaly counter productive...
Some apps like Ram Manager for example (Play Store) can create a swap file, there is also some kernel like Faux123 with, grrr don't remember exactly the name, something like Zramswap or... not sure...
But you don't reduce the RAM size, on 2Gb, you have about 1,8 Gb free for the system, apps and that's all, you can't reduce this part. At the end with a clean and light system booted you have about 1,6 Gb free. What you want will virtualy increase the RAM size (with the swap file).
In any case with the app above, use it to create and use your swap file, open one or two "big" apps, a game and you will see that it is used...
Tweak also the OOM settings to run Out Of Memory earlier, see Google.
You want reduce the amount of free RAM not reduce the RAM size. For me it's not the same thing.
Or I don't understand again, and I'm sorry. But I don't see the point...
Sent from my LG-D802 using xda premium
viking37 said:
Hi,
Yes it's a little clearer, maybe, but why do you want that? What kind of experimentation are you doing? It's totaly counter productive...
Some apps like Ram Manager for example (Play Store) can create a swap file, there is also some kernel like Faux123 with, grrr don't remember exactly the name, something like Zramswap or... not sure...
But you don't reduce the RAM size, on 2Gb, you have about 1,8 Gb free for the system, apps and that's all, you can't reduce this part. At the end with a clean and light system booted you have about 1,6 Gb free. What you want will virtualy increase the RAM size (with the swap file).
In any case with the app above, use it to create and use your swap file, open one or two "big" apps, a game and you will see that it is used...
Tweak also the OOM settings to run Out Of Memory earlier, see Google.
You want reduce the amount of free RAM not reduce the RAM size. For me it's not the same thing.
Or I don't understand again, and I'm sorry. But I don't see the point...
Sent from my LG-D802 using xda premium
Click to expand...
Click to collapse
Well, actually it's quite simple. The Nexus 5's RAM size is too large(ok, it's about 1.8Gb free or less). Even After I have run a lot of apps, there are still serval hundred Mb RAM free(Maybe I can run more apps, but it doesn't worth. Or I should choose another device with smaller RAM size. But that's out of my budget). Yes, as you said I want to reduce the amount of free RAM. But reducing the RAM size can also work for me.
All in all, I want to see the benefit of swap area through the experimnt?
Ok, my friend, you have got that right? It's ok, if you still feel confused. I'm glad to tall with you!
Cant you increase swappiness?
-----------------------
Sent via tapatalk.
I do NOT reply to support queries over PM. Please keep support queries to the Q&A section, so that others may benefit
rootSU said:
Cant you increase swappiness?
-----------------------
Sent via tapatalk.
I do NOT reply to support queries over PM. Please keep support queries to the Q&A section, so that others may benefit
Click to expand...
Click to collapse
What do you mean?
Just now, I found a way out! Make large enough ramdisk in RAM. In that way, the RAM decresed!
Thank you all the same!
zxcoolid said:
What do you mean?
Just now, I found a way out! Make large enough ramdisk in RAM. In that way, the RAM decresed!
Thank you all the same!
Click to expand...
Click to collapse
For future info.
http://en.wikipedia.org/wiki/Swappiness
Just use scavenger pro and slight of hand pro. Then you never run out of memory and you can swap apps really fast!!!!
Sent from my SGH-M919 using xda app-developers app
rootSU said:
For future info.
http://en.wikipedia.org/wiki/Swappiness
Click to expand...
Click to collapse
Thanks for your message!

Categories

Resources