[Q] Fine tuning swap usage - Android Q&A, Help & Troubleshooting

Hey guys,
I have an HTC One V, which is a pretty low-mem device at 512MB RAM. I've been using a normal 256MB swap partition on my SD card with swappiness set to 100 and default minfree settings. This has already given me fantastic results, now I can switch between 4 running programs without having to reload any of them. Before the swap script 2 was the maximum, and even that wasn't always true. Basically I had no multitasking.
Now, I've been checking my memory usage in detail. It seems that when idle, there is about 80MB of free RAM, and around 80MB of swap space is being used. It seems that even though I have 256MB of swap space available, Android never really goes above using ~80. Is there a setting I can fine tune somewhere that would lead to better use of the swap space? From my limited understanding, it seems that in theory Android could store at least two or three more background apps on the swap partition instead of killing them. Which, of course, would lead to much better multitasking.
I'm also aware that using the full 256 megs might actually hurt performance, but I still want the OS to use more than 80.
Please don't flame me if this question has been asked before, I tried to search, but I only found threads discussing the value of vm.swappiness.

TRY TO USE KERNEL TUNER.
AS WELL AS INCREASE SWAPPINESS TO 128 MB.
BUT OS TAKES ONLY AS MUCH RAM IT WANTS U NO NEED TO WORRY THAT IT IS NOT PROPERLY UTILISED.
Hit thanks.....

caius112 said:
Hey guys,
I have an HTC One V, which is a pretty low-mem device at 512MB RAM. I've been using a normal 256MB swap partition on my SD card with swappiness set to 100 and default minfree settings. This has already given me fantastic results, now I can switch between 4 running programs without having to reload any of them. Before the swap script 2 was the maximum, and even that wasn't always true. Basically I had no multitasking.
Now, I've been checking my memory usage in detail. It seems that when idle, there is about 80MB of free RAM, and around 80MB of swap space is being used. It seems that even though I have 256MB of swap space available, Android never really goes above using ~80. Is there a setting I can fine tune somewhere that would lead to better use of the swap space? From my limited understanding, it seems that in theory Android could store at least two or three more background apps on the swap partition instead of killing them. Which, of course, would lead to much better multitasking.
I'm also aware that using the full 256 megs might actually hurt performance, but I still want the OS to use more than 80.
Please don't flame me if this question has been asked before, I tried to search, but I only found threads discussing the value of vm.swappiness.
Click to expand...
Click to collapse
Disclaimer: This is somewhat speculative.
The vm.swappiness is in principle what you are looking for, talking about Linux swap. Unfortunately, for you right now, the Andorid uses "application level swapping", i.e. the Android ActivityManager (userspace task) kills of app's when the memory gets low. Since Android normally don't utilize swapspace, there's a possibility ActivityManager doesn't looks at the size of the total virtual memory (including backed by swap), but only the physical memory installed. If so, it will continue killing app's at the same memory threshold as before, despite of the increased virtual memory size, hence not utilizing the increased virtual memory particularly well. This sounds as what you are describing.
You'll need to check the source ApplicationManager.java to examine the internals here.

Related

How Can WALLABY Memory be increased

Wallaby has a 32 mb built in memory. How can this be increased. If so How MUCH & How?
Note i have installed a 128 mb SD card and have installed most of the softwares on it but my system shows low memory while the SD card is nearly 50% empty.
I have tried to use the slider in the settings to increase the momory but it slides back and is not releasing more memory for the system.
kindly advise how to increase the momory
regards
aamer sheikh
There is a company that adds physical ram to the phone but now that prices for the xda 1 are so low I would not consider that as a realistic option. You could maybe buy an xda 1 with 64 megs of memory and a broken screen and transplant the mother board to your phone.
I think he might not know that he might free up some memmory on his devices rom. If I were you sir, I would sync my data (not backup), hard reset, reinstall everything into where I wanted it, and resync. If you have experience with hot air rework, or have a friend, you might aquire the chips and do it yourseld. THen again, if you didn't know you could add memmory to a wallaby, then you probably shouldn't do that. Be careful and good luck!
PS I'm not responsable if you junk your device, I am only giving suggestions of what could be done, not telling you it should be done!
Even by physically adding the memory chips you can get only 64meg, anything above that has to be software driven paged memory I think, bit like using a fast sd card.
I know that 128+ mb requires a driver.... I wonder if you could get in 96 somehow???? anyone done that?
I think the hardware limits direct memory access above 64.
can the chips be stacked? I thought I had read that somewhere; cut a certain pin(s) and solder/joint a second chip ontop of the origionals?????
are the user accessable ram and rom on the same chip or are they seperate chips?
could the rom size be increased? (never looked into it)
Where would one acquire the chips?

[Q] Memory?

Hi Everybody,
I have a question about the memory on the vibrant.
In the task manager, it says that I only have 304mb of total memory.
Why?
I've read some posts saying that the vibrant runs on 2.6.29 which does not support himem, therefore limiting the ram to only 304mb. But my vibrant is on 2.6.32, which is said to support himem, and still I only get 304mb. What is up with this?
Also at most I get 160mb of free memory, does anyone have more free memory? I know that android has great memory management, but I just want to check if I have the normal amount of free memory.
Thanks to all replies, bad or good ;-)
No one has more free RAM unless they have a loltaskkiller running in the background aggressively killing tasks.
The phone reserves 128 MB RAM for the GPU out of the 512. None of the Galaxy S phones have (or had) 512 App-Accessible RAM.
Verizon advertises the Fascinate as having 384 MB RAM which seems more accurate because phone reserves 128 for the graphics (512-128=384) and then reserves ~64 MB for the system (384-326 we see = 58).
It has 384 MB RAM, and 128 dedicated the GPU outside of the App RAM. Samsung just advertised it as 512 because they added them together and didn't make any distinction (which makes the advertisement legally legit) and they didn't feel like adding a bit more RAM to the device the way HTC typically does with their phones (extra 64MB in the HD2/HD7 and they put 768 in the MyTouch to compensate for pretty much everything).
HTH.
Oh, now it makes sense. So if 64mb is reserved to the system and I get 140mb of used memory with no apps running, does.that mean android uses about 200mb out of the available 384mb?
tincanman said:
Oh, now it makes sense. So if 64mb is reserved to the system and I get 140mb of used memory with no apps running, does.that mean android uses about 200mb out of the available 384mb?
Click to expand...
Click to collapse
Android uses about 120-150 MB as a base, the rest are cached applications, which allows them to starts up faster next time you run them, but the cached RAM will be freed up if the current running application needs it. You can try disabling free services to reduce the amount Android uses, although it doesn't free up too much.
It makes me wonder does the GPU really need 128 MB of RAM?!
It probably doesn't need 128 MB. They probably could have done well by just giving it 96 and letting the rest of the 32 go for the System (Apps), and then adding another 64 MB to the system on top of that to give the user more time ot multi-task non-game applications.
Not to mention most games load a lot of data in RAM and the lack of Application RAM can/does bottleneck the phone in some of them - making the "incredible" GPU not much of an improvement over phones with more RAM in them and comparable CPU performance (and a faster file system, as well).
Moved of: Samsung Vibrant > Vibrant General
To: Samsung Vibrant > Vibrant Q&A
Please put your questions to: Vibrant Q&A

[Q] Rezound memory usage

Hey guys, first I want to say I'm new to android so forgive me I got my rezound today and am a bit concerned with the memory usage. I'm showing that the phone has 817 megs of memory (thought this was supposed to be 1 gig?) and i'm showing the usage at 683 and really don't have anything installed yet.
Is this normal? If it's not, how should I proceed to resolve this.
Thanks!
In android, memory is used differently. Unused ram in android is wasted ram. I know this is counter-intuitive but it is true. Having no free ram won't impact the performance because android intelligently keeps things in ram so that they can be opened for faster access. If ram is needed by an application, things are automatically closed to free up ram.
It's normal, I have 704MB in use and 141MB free. Once we have perm-root and can debloat, I expect some more memory to free up.
You can also launch "Task Manager" and see what processes are running.
Keep in mind, Sense uses a LOT of RAM to operate.
Once the phone is debloated, a ROM is flashed that gets rid of most, if not all, of Sense, you can expect anywhere from 300-500 megs of RAM free.
I use fast reboot from the market and I consistantly have 390-415 mbs free.
I'm not asking in terms of memory usage, but do we really only have 817 megs of ram? Might as well call it 756 instead of 1024. Or is there ram being used by the system that doesn't show up there? Again, I know how android caches apps, I just want to see if the actual total ram is correct?

How much ram your idle phone use?

Hi, i just wonder why this phone use ram so much high? (mine: usually at 1,7GB). At first time i use this phone it was used about 1.1GB of ram.
I'm trying to compare this phone usage with my previous tablet, samsung galaxy note 10.1 and it just consume about 700MB of 2GB ram it have and at first time i use it consume about only 500MB ram.
For your information, i use almost same app running in my booth device. But..
Why it come so much different? Z2 for sure have 3GB ram (bigger than other) but i think the system at least consume much more ram too than others. Are I'am right? Can u tell me what do you think? And tell us about your idle ram usage too if u can..
denny9unawan said:
Hi, i just wonder why this phone use ram so much high? (mine: usually at 1,7GB). At first time i use this phone it was used about 1.1GB of ram.
I'm trying to compare this phone usage with my previous tablet, samsung galaxy note 10.1 and it just consume about 700MB of 2GB ram it have and at first time i use it consume about only 500MB ram.
For your information, i use almost same app running in my booth device. But..
Why it come so much different? Z2 for sure have 3GB ram (bigger than other) but i think the system at least consume much more ram too than others. Are I'am right? Can u tell me what do you think? And tell us about your idle ram usage too if u can..
Click to expand...
Click to collapse
I think nothing of it
Linux is healthy to use ram unlike other OSs when ever you open an app your phone will free ram if needed, its not to hard seeing as how its managed
Your actual free ram is always 15mb but freeable is usualy always %90 of your total ram, ignore how much ram is avaliable
If you want to know more, look up linux ram management
Sent from my D6503 using XDA Premium 4 mobile app
Looking at RAM usage is entirely pointless.
Apps allocated RAM as they like but the operating system makes all kinds of predictions ahead of time to preallocate blocks of RAM to increase speed, eg when an app requests to allocate some memory the OS gets to instantly go "here you go; hehe sucker I already prepared that earlier".
The OS will more or less allocate as much RAM as you throw at it up to realistic limits. Eg once a tiny app has 1gb of ram the OS will take the educated guess that will be more than enough for it and not allocate any more.
If another app opens up and the OS is running low on memory it will rejig how much it has allocated to apps that never actually requested that much memory.
This happens on any modern OS and is why you should never really care how much RAM things are using.
In Windows under process manager if you looked you would find there is about 10 different ways to look at the RAM usage per app. Unless you really know what the numbers are saying they will all means basically zero in the real world.
Woa.. I never know it before.. Thanks for the info..
Mine 1.5gb used
More then enough
Sent from my D6503 using XDA Free mobile app
How do I see this?
Skickat från min D6503 via Tapatalk
mine is usually about 1.5 to 1.9GB
keep in mind it caches apps too incase you reuse them, at the top right of the usage screen hit the menu to see the cached apps.
Mine is usually 1.5 to 1.7GB, even I don't run any app...
BTW, I install the app Clean Master ( like CC clean on Windows). And I always do clean Junk file and Boost ram once a day.
Is it good to use this app everyday?
vdanh said:
Mine is usually 1.5 to 1.7GB, even I don't run any app...
BTW, I install the app Clean Master ( like CC clean on Windows). And I always do clean Junk file and Boost ram once a day.
Is it good to use this app everyday?
Click to expand...
Click to collapse
If it's another generic 'ram booster', it's next to useless, but it won't be dangerous to use unless the app is programmed poorly. As others have pointed out, if there's no problem with the system (e.g. memory leaks), the RAM it allocates is used for caching apps so they may load quicker. Simply put, this behaviour is intended.
Cleaning junk files will probably have next to no effect on perceived performance as well untill you've hoarded enough junk files that your internal memory is almost full. But I see where you're coming from; it's very satisfying to see memory freed.
And while I am at it, I'd like to recommend SD Maid for this purpose. It's one of the few apps that actually do something useful. You can delete orphaned folders by apps that are no longer installed, delete junk and duplicate files, bulk clean app caches as well as optimise internal app databases.

How much difference in RAM usage between 720p & 1080p display? Z5c RAM way too low?

How much difference in RAM usage between 720p & 1080p display? Z5c RAM way too low?
I've read several times, that a 720p display uses less RAM than a 1080p, plus the Z5c has a couple of extra features, like 500MB of ZRAM, which should make multitasking quite good and not a thing to worry about, despite the low RAM.
But here's the thing: Can anybody tell me, how much exactly is the difference in RAM usage between 720p and 1080p? I was never able to find hard numbers. Is it 50% because of half the resolution? Is it like 5% only or something else? Or is it flexible, depending on the apps? Or, if it's a fixed amount of megabytes, how much is it?
I'd love to get the Z5c due to the smaller size and it is about 100€ less than the Z5, but I'm also a heavy user and struggling very much with only 2GB of RAM in my current Z1.
I have at least 10 different apps running in the background all the time, like weather widget, several messengers, xposed, data counter, greenify, etc.
Plus, I usually like to open a lot of tabs in the browser, 10+ is quite often and my browser either craps out completely and closes itself or the tabs have to reload all the time, this even happens with only 2-3 tabs.
Same with apps.
They are almost always reloading, most of the time I can't even visit my "friends" in Simpsons Tapped out because the game crashes when I try to visit their cities or it crashes in my own town because it is too large.
The music player stops working during browsing or one of my running apps closes itself due to lack of RAM.
Is this normal, is the RAM really too low or am I just expecting too much from smartphones? I treat them like small computers, like the ads suggests. I guess, they are just too unrealistic.
The ONLY thing keeping me from going for the Z5c is the low RAM and this would be the only reason for the Z5.
Also, 2GB RAM is a 2012 standard, it's now 3 years old. After a usual usage time frame of the Z5c of 2 years, it's 5 years behind. I simply can't seem to get myself to buy an already outdated device in terms of RAM. For me, 4GB would be very welcomed.
Can anybody answer my questions regarding RAM usage or someone with a similar heavy use case can relate their experiences with the Z5c and RAM problems?
The RAM is more than sufficient. I have been using this phone for some time now and I can keep any number of apps open in the background and they do not close.
---------- Post added at 05:38 PM ---------- Previous post was at 05:37 PM ----------
When I say "any number" I mean any number of apps that I need to keep running in the background. I've never run out of RAM on this phone. Whereas I see a lot of phones struggling with multitasking
I don't just mean many many foreground apps which I have started myself and switching between them, but also like 10+ apps which are running as soon as the phone has finished booting and which I want to run in the background all the time, without counting additional apps which I open on purpose. Apps always running are: Hangouts, facebook messenger, Whatsapp, weather widget, one handed mode, 3G Watchdog, onavo extend, proximity screen off, greenify, setcpu, automate it, afwall+, twilight. A total of 13 background apps plus many foreground apps. After everything has loaded after boot, I'm already down to 700MB free RAM, without any other open apps.
When RAM reaches 500 or below, the force closure starts.
How much is your available RAM after boot and with many apps running?
i don't know if you are aware of it, but xposed module "app settings" has an option to keep chosen apps persistent in memory. I cannot assure it works, but probably it does. You could enable it on the apps you need to be kept open and then fill your memory fully, then see if Android system kills other apps (camera, gallery,...) instead of your favourite ones. This might be a workaround for you, or might not: if you open lots of tabs on your browser, Android kills other apps, while Windows would become sluggish but keep everything open and use the swap file. Regarding the swap theme, Android has the Zram function, a kind of swap file in the ram, that compresses some RAM in the RAM itself (at the cost of some CPU power). This might also be useful but don't know if it is already supported by stock xperia firmware or it must be implemented in a custom kernel.
Well, available RAM really doesn't matter much. Lollipop especially is designed to take up as much RAM as possible. That makes the operations smooth and the processes run in the background. But I'll attach this here. I never clear the tasks and I always keep them running so I will have less RAM. But my apps don't close on me though
It seems 2GB ram doing fine on my Z5c, I guess because of it comes with ZRAM enabled in stock kernel(for the cost of cpu and battery). Yes, 720P spend much smaller amount of memory and cpu compared to FHD/2K. There are many reports confirmed on Z1/Z2/Z3/S6 board when people used resolution changer and found much more free ram available, you can try QHD 960x540 if you want even more free ram.
I got 1GB free ram after boot up and same with my S6 but since my S6 running 2K resolution with poor Samsung memory management, actually the Z5c performs better when deal with the killing apps problem. If you will use greenify donate ver to freeze all bloatware I think memory is good, the android 6.0 seems to have better memory and battery life as well.
Can you tell me more about the resolution changer? Is it dangerous and can lead to a bootloop or not booting at all?
Z have 2gb of ram and 1080p display and have no ram issue..
drsoran2 said:
Can you tell me more about the resolution changer? Is it dangerous and can lead to a bootloop or not booting at all?
Click to expand...
Click to collapse
http://forum.xda-developers.com/galaxy-s6/general/how-to-run-s6-1080-mode-t3124559
I don't use it on my S6. It won't bootloop or not booting but just some stock apps will have menu problem bcoz they are hard coded for native resolution, you may need to decompile those apks and edit some .xml files manually to modify the default resolution to make it works.
even my XZU with 2GB of RAM and 1080FHD is still perfectly able to multitask. no need to panic for such 2GB of RAM. yet. :fingers-crossed: well maybe when there's a game with big memory requirement in 2-3years time then you'll need more than 2GB but i bet it's not a game worth playing coz it's not mobile optimized and the devs are too lazy to optimize.
Default set at 507MB ZRAM, you can increase it to 1024MB if you wish
Yes, but only with root? And then you lose the warranty, camera functions, miracast and such because you need to unlock the bootloader.
A root exploit without bl unlock, like on my Z1, is what I'm hoping for. I also don't understand why manufacturers don't implement to gain root access via a simple reboot. Make the option available, display maybe 2-3 warnings and info screens before, then if you click yes, a reboot happens and you're rooted. Easy as this. No features lost, no exploits necessary which take forever to arrive, if at all, and involve downgrading and such. I think one manufacturer enables exactly this.
It would be unthinkable on a Windows or Linux system if there wouldn't be the option to work with full admin rights...so why is it the norm on Android and nobody bats an eye?!
Btw: I've tried the resolution changer and changed the resolution to 720p. Although this should have decreased the RAM usage, it actually increased it by around 100MB. How is that even possible?
drsoran2 said:
I'd love to get the Z5c due to the smaller size and it is about 100€ less than the Z5, but I'm also a heavy user and struggling very much with only 2GB of RAM in my current Z1.
Click to expand...
Click to collapse
I think you answered your own question here. If you need a whole lot of RAM, you should probably look somewhere else.
yes, it needs root and you loss warranty and DRM and such stuffs.
Linux like to cache things, if u got more free ram it might just cached even more. It won't used more 100MB ram in reality.
The thing here is the Android 64-bits.
1080p device with 2GB RAM in Lollipop 32 bit = more than 1000MB of free RAM (average).
720p device with 2GB RAM (and zRAM) in Lollipop 64 bit = more than 550MB of free RAM (average).
Now, the resolution mostly affect the used RAM when gaming, there is not a big difference outside games.
Sent from my E5823
thesebastian said:
The thing here is the Android 64-bits.
1080p device with 2GB RAM in Lollipop 32 bit = more than 1000MB of free RAM (average).
720p device with 2GB RAM (and zRAM) in Lollipop 64 bit = more than 550MB of free RAM (average).
Now, the resolution mostly affect the used RAM when gaming, there is not a big difference outside games.
Sent from my E5823
Click to expand...
Click to collapse
I have never seen free memory more than 1GB of RAM with my XZU. Right now it hovers around 600MB of RAM.
for gaming it is not an 'always' case so memory cleaning at the end should happened only 1% of the time you use the phone.
Who cares about how much free ram there is? The ram is meant to be used and Android is made to use the RAM for caching and so on.
Talk instead about how well it runs in practice.
Anyone that has experienced any problems that could be because of the device only having 2GB of ram? Let us know.
If not, then I guess the fact that the Z5C "only" have 2GB ram is not a problem...(?)
Here,me! I'm having a lot of problems because of low RAM and the whole purpose of this thread is to find out if the Z5c with its 720p display and zram and such makes a huge difference in RAM performance, if at all compared to my Z1 with also 2GB which is always reloading tabs, crashing games and apps, force closing apps due to lack of RAM, redrawing the home screen when exiting apps and so on.
If there's no big difference, then devices with only 2GB are not for me.
It's good that Android uses all the RAM for caching, but I strongly believe that in my case there is simply not enough RAM and that's why all my problems occur.
And also Z5c uses LPDDR4 RAM if I am not mistaken. So that's actually more efficient. Well I have faced ZERO problems with multitasking. But I dunno about you

Categories

Resources