zram or swapfile? - Galaxy S 4 Mini Q&A, Help & Troubleshooting

hi all, I have a little question on s4 mini duos I9192.
using "free" or "meminfo" commands displays memory informations, the phisical ram displayed is 1,3 gb but the phone is declared 1,5 gb confused , so I thought it will be some zram but analising the memory its not zram.
by the way there is a swapfile of 1gb.
please can someone confirm this? I am playing with swappiness value and I must be sure if I touch zram or swapfile
screenshot attached

I'm guessing your using stock os as that uses a 1gb swap file. Zram is kernel dependant and I don't think stock makes use of this. Although our phones have 1.5gb RAM some of this is stolen by Android OS. The same with our 8gb storage which part of is stolen by Android again leaving us with around 5.5gb.
Would like to know how you get on with different swapiness values, and which you decided to settle on.

RuffBuster said:
I'm guessing your using stock os as that uses a 1gb swap file. Zram is kernel dependant and I don't think stock makes use of this. Although our phones have 1.5gb RAM some of this is stolen by Android OS. The same with our 8gb storage which part of is stolen by Android again leaving us with around 5.5gb.
Would like to know how you get on with different swapiness values, and which you decided to settle on.
Click to expand...
Click to collapse
Thanks, yes I'm on stock.
I noticed that the 1gb swapfile is little used; with swappiness 100 swapfile is used about 200mb and with swpss 20 about 40mb both after 1 day of use;
Also the used part tends to accumulate and grow from boot but I shutoff phone at night so swapfile resets at boot.
My idea was to delete swapfile to recovery space bit I can't, swapoff doesn't work.
Anyway I think phone is smoother with low swappiness and with medium usage I never suffered lack of ram problems.

hi !
swap & Zram are completely useless for a device like ours .....because we have enought RAM and enought power .
thes two are develloped and used before for old low and middle devices
the best is to grenify or freeze unused apps and services for a more lighten rom....

Loulou-13 said:
hi !
swap & Zram are completely useless for a device like ours .....because we have enought RAM and enought power .
thes two are develloped and used before for old low and middle devices
the best is to grenify or freeze unused apps and services for a more lighten rom....
Click to expand...
Click to collapse
Yes, already greenyfied all and removed all bloat and useless apks.
My doubt is why stock rom has a so large swapfile, a waste of space

?????????7
may be some one can help you right here dearly .

Related

Ramdisk/swap

What are the possibilities of using our 2gb of ddr program storage and re allocating it as system ram?
Even if it isn't pure flash (slow speed) I imagine it would be better then nothing, we could always store programs on the sdcard.
Sent from my GT-I9000 using XDA App
android53 said:
What are the possibilities of using our 2gb of ddr program storage and re allocating it as system ram?
Click to expand...
Click to collapse
very good, this post actually explains how to make a swap file (on /cache which is fast nand!).
if you want a swap partition you could a) use part of the 2gb /data partition for a new swap partition which you create in a project-voodoo like manner -> not very easy to do as you would have to repartition /data before boot OR b) just make a 2nd partition on your external sd card to swap on. a lot of people (me included) actually did this with their htc magic.
but to be honest i don't think that you will gain any speed improvements with this, on the contrary your system will be slower an more laggy... i found swap even worse on the magic with ~90mb of user-available-ram. if you want to try it nevertheless, it think the swap file on /cache would be a good start!
jodue said:
very good, this post actually explains how to make a swap file (on /cache which is fast nand!).
if you want a swap partition you could a) use part of the 2gb /data partition for a new swap partition which you create in a project-voodoo like manner -> not very easy to do as you would have to repartition /data before boot OR b) just make a 2nd partition on your external sd card to swap on. a lot of people (me included) actually did this with their htc magic.
but to be honest i don't think that you will gain any speed improvements with this, on the contrary your system will be slower an more laggy... i found swap even worse on the magic with ~90mb of user-available-ram. if you want to try it nevertheless, it think the swap file on /cache would be a good start!
Click to expand...
Click to collapse
If we go for b, will the sgs detect and use the swap partition or do we need to do something else.. I still use my htc magic along side my sgs
Sent from my GT-I9000 using XDA App
i have tried using a swap file, but i didnt c any improvements, and the usage was about 500kb only
I recall that on liquid we managed to use a ramzswap module, which fakes a zipped swap partition in ram. It causes cpu to work a bit more, but it was still efficient.
Elvoski said:
If we go for b, will the sgs detect and use the swap partition or do we need to do something else.. I still use my htc magic along side my sgs
Click to expand...
Click to collapse
you would have to repartition our external sd to have a second (linux swap) partition.
then use mkswap to set the partition up and after that call swapon. swapon has to be redone every time you restart but you could place it in a playlogos1 script to automate that.
captive said:
I recall that on liquid we managed to use a ramzswap module, which fakes a zipped swap partition in ram. It causes cpu to work a bit more, but it was still efficient.
Click to expand...
Click to collapse
compcache?! ... i guess this would also be a good trade off for our galaxy s because the cpu is definitely not the bottleneck here...
btw. a good read about swap & compcache from the cyanogenmod wiki: swap & compcache
android53 said:
What are the possibilities of using our 2gb of ddr program storage and re allocating it as system ram?
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
Bad, bery bad idea, MoviNand is not in any way releated to DDR. It's waaaay slower.
Also, RAM is designed for virtually unlimited data read/write counts.
NAND memory is not.
What would be the benefit of using swap space? Nothing. Data is being read/written in filesystem in the end. No improvement in performance. (It could be seriously degraded).
This behavior is totally against Android core design principles. Android doesnt use swap because it doesnt need to. Programs not fitting into "RAM" are being closed with their state remembered. When program is re-launched it is loaded from filesystem and its state is being restored.
If we had "swap" space, it would become really messy. Just imagine:
System wants to close program X, resident in swap, it needs to:
- restore program from swap to RAM (talk about additional ram needed)
- close program, resulting writing state to FS.
i was talking about this sort of thing with Ryza and Voodoo guy they said it was too much work
i'm forward with the idea of using a Swap drive in RAM or external SD
to prevent over usage on the internal SD
This means external SD would need to be powered up at all times -> battery drain (it is present with APPS2SD - or whatever this name was)
Wuld this mean that we would have extra ram available for running apps...like SGS task manager will show more than 311Mb RAM ?
If this is the case then I am very interestied, since I don't care about speed so much. I just need to run an app that currently can not run due to out-off-memmory (needs 130Mb of RAM) for pure presentation purposes
There is a app in market called swapper2 which can make use of the swap partition or creates a swap file for use. I had been using this app since my HTC MAGIC and now on SGS.
I'm currently using swap partition that had been created earlier in my class 6 SDCard. Works on both eclair or froyo kernels on SGS. So far I am not complaining, with swappiness 20, there is not much of memory hog or lag due to opening too many apps or single memory hogging apps (like flash on browser) on my XXJPK, the swap memory gets allocated and deallocated as you can tell from the swapper info feature.
But the battery effects is something to think about though, sdcards are cheap so I don't mind sacrificing it. The other way is to create a swap file on the rfs and use it if you value your sdcard. The screenshot provided is a normal usage of my device with a few apps running at background (Still gonna be 300+ RAM, nothing magical about it though) and I had also used minfree tweak on the kernel.
You can try and see if it helps in terms of performance for a few days. I cant vouch for the swapper a lot as I'm using it myself - I am more uncomfortable without it though. What Xan said does makes sense but there are rare times when the things that doesn't makes sense gives us surprises.
A good read up and comments from people who had tried and used it in different scenarios...
http://zerocredibility.wordpress.com/2009/08/24/why-android-swap-doesnt-make-sense/
Sent from my GT-I9000 using Tapatalk

creating the "personal data" partition in sdcard instead of ram

Is it possible? i beieve the personal data partition which is 127 Mb takes place in the physical ram and it causes that we have only 300 and something Mb of ram for users.. since it s mostly taken by android apps users have about 120-150 mb of ram.. even galaxy tab with froyo has 444Mb.. so i thoght that 127 Mb part could maybe be created in sd card instead of ram.. it would be slower of course but with ext4 convertion this slowness could be ignored with the huge amount of free ram in my guess..
so is there a way to do that? or is there any unlogical part? because i really want to know why i cant use my whole ram for user (after switching to touchwiz 4and filling the screens with widgets the phone got really slower with freezes some times.. so it made me think about that)
Sounds like an awesome idea if someone knows how to pull it off
_delice_doluca_ said:
Is it possible? i beieve the personal data partition which is 127 Mb takes place in the physical ram and it causes that we have only 300 and something Mb of ram for users.. since it s mostly taken by android apps users have about 120-150 mb of ram.. even galaxy tab with froyo has 444Mb.. so i thoght that 127 Mb part could maybe be created in sd card instead of ram.. it would be slower of course but with ext4 convertion this slowness could be ignored with the huge amount of free ram in my guess..
so is there a way to do that? or is there any unlogical part? because i really want to know why i cant use my whole ram for user (after switching to touchwiz 4and filling the screens with widgets the phone got really slower with freezes some times.. so it made me think about that)
Click to expand...
Click to collapse
There is no personal data partition in RAM.
What you see in missing RAM is what is reserved for the kernel. He needs RAM to manage the system. And some RAM is reserved for special purpose (by device drivers), like video recording etc. That is why you see only 330 MB as maximum free RAM.
it might not be a perfect idea because the sd card partitition is so slower than RAM .. so moving dbdata (personel data) to there would slow it down ..
but i have just looked at a samsung galaxy tab again and realised it has 489 Mb of user avaiable memory out of 512 MB (with the turkcell turkish rom).. so it made me wonder what that 127 Mb part which exists in galaxy s but does not in galaxy tab is.. because i have read that personal data makes the device make/recieve calls and mesages.. i dont think so because galaxy tab also can do that without sacrofising 160-170 Mb of memory..
thanks for the asnwer.. so what exactly is inside of this missing RAM part? as far as i know to record video it needs the cache memory.. its something like 30 Mb.. thats ok.. and samsung galaxy tab is also missing nearly that amount.. but this 160 Mb is too much for only a kernel i guess? kernels are like 6 mb..
and why galaxy tab does not need to sacrofise such amount of memory? because they share the same ram, CPU and GPU.. so pysically they are same but why are their structures different..
I believe the Tab has actually more physical memory available than the SGS. If I remember correctly it actually has more than 512mb of ram and so the available ram is higher than in the SGS. Its possible they didn't advertise it because it would simply make it look like they made something wrong with the SGS architecture or advertisement.
i never thought it like that.. maybe..
but in every source i can find it says both have 512 Mb of memory.. so if samsung is not lying (i guess if they did someoe would find it out and spread the news) galaxy s has a software disadvantage.. besides we all know some kernels are expanding the memory from a few Mbs to 10Mb.. maybe there is a way to exapnd it even more without harming the working of the phone..
or maybe there is a way to make an entire new software and partitition structure (which reminds me of cyanogen mod, how much memory it gives to the user?) ..
i found this ;
"the samsung rom uses a ram disk for the os. that's not necessary. putting the OS on "disk" will free up a lot of ram. "
so i believe this software related situaton could be fixed (at least some of the ram could be saved) ?
I think there's a reason samsung didn't put the OS on the "disk".
Ram is lots faster than the internal SD card, so I think it would only slow the device down.
My little brother has a HTC Sensation, which has ~750MB of ram, but only 5xx is usable.
So i think it wouldn't be possible to have that much free ram...
i have checked.. in HTCs web page it says HTC Sensation has 768Mb of ram .. and samsung says both galaxy s and galaxy tab have 512 Mb of ram..
i assume everyone is saying the amount of the ram including the shared parts..
and i assume they all create their roms and kernels based on google sources..
so what is the reason of the difference between the ram amounts of galaxy s and galaxy tab? kernel needings can not be so much different.. they have lots of things in common...
i came back to stock rom (odexed) with stock UI and filled the screen with as much as widgets i could... then i tried everything to get it frozen but i couldnt even slow it down...
for the first time i felt like some hardware in my galaxy s was not enough after i installed touchwiz 4 with other sgsII apps (like e-mail, weather widget etc..) .. and i could not believe a UI could cause lagging (even freezing) ..
then i realised that galaxy tab had much more available ram.. i am still kind of obssessed about this and really wonder if this is possible..
http://forum.xda-developers.com/showpost.php?p=8587641&postcount=75
Like I said before, the Tab has actually 640mb of physical ram, more than the 512mb on the SGS. I'm guessing there really is nothing more we can do right now. Read up on the link I posted. If you want you can also read the whole thread that post comes from. There is lots of Dev talk on the subject.
i read all of them.. and it encouraged me to write and e-mail to samsung.. every source i can find says both deviced have 512 mb of ram.. (please nobady say samsung does not have to tell how much of the ram will be available for users, its like announcing an 1ghz cpu with a software which only forces it to work at 800Mhz) ..

[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.

Using a lot of RAM... for some reason?

Ok so I was running an app to check on CPU speeds (unrelated research) when I noticed that this same app was saying I only had 340mb of RAM free...
This seemed a bit strange, considering this tablet has 3GB of RAM on board, and I'm not really running anything at the moment.
I went into the storage setting page, and looked at running processes, and it says that I am using 2.5GB of my RAM.
but... if I add up all the ram usage on all the running processes, it only adds up to about 500mb....
So what is using up the other 2gb?
If anyone has any suggestions, it'd be nice, as at the moment it seems I only have 1gb of usable RAM in this device...
EDIT:
Nevermind, I think I solved it... sort of. I found that the ram clearing button is in a different place than I remember, and I have managed to clear out some more space... though even after a full reset 1.5gb of ram is immediately being used. Seems a lot.
Though this is a stock rom etc so I suspect thats normal.
electrical tcfpain
nirurin said:
Ok so I was running an app to check on CPU speeds (unrelated research) when I noticed that this same app was saying I only had 340mb of RAM free...
This seemed a bit strange, considering this tablet has 3GB of RAM on board, and I'm not really running anything at the moment.
I went into the storage setting page, and looked at running processes, and it says that I am using 2.5GB of my RAM.
but... if I add up all the ram usage on all the running processes, it only adds up to about 500mb....
So what is using up the other 2gb?
If anyone has any suggestions, it'd be nice, as at the moment it seems I only have 1gb of usable RAM in this device...
EDIT:
Nevermind, I think I solved it... sort of. I found that the ram clearing button is in a different place than I remember, and I have managed to clear out some more space... though even after a full reset 1.5gb of ram is immediately being used. Seems a lot.
Though this is a stock rom etc so I suspect thats normal.
Click to expand...
Click to collapse
You probably aren't using all 2.5GB for actual running programs.
Windows 7 does a great job of managing money. If it has any unused memory it will hold often used programs or data in memory in case it's needed. If a running program needs that memory it's quickly shifted. Otherwise when you reopen that program you recently closed, it may load quickly from memory rather than from the drive. I suspect Android does things similar.
Modern systems programmers consider "free" memory to be wasted, so they put it to the best use they can anticipate. That gives you the benefit of all memory as often as possible. If they only allowed the memory to be used for what's needed right now, your Note would only have about 1 GB memory, and would be considerably slower.
It's a little like having the cook wash your car while waiting three hours for the turkey to cook. You get both the turkey and the car wash.
jnichols2 said:
You probably aren't using all 2.5GB for actual running programs.
Windows 7 does a great job of managing money. If it has any unused memory it will hold often used programs or data in memory in case it's needed. If a running program needs that memory it's quickly shifted. Otherwise when you reopen that program you recently closed, it may load quickly from memory rather than from the drive. I suspect Android does things similar.
Modern systems programmers consider "free" memory to be wasted, so they put it to the best use they can anticipate. That gives you the benefit of all memory as often as possible. If they only allowed the memory to be used for what's needed right now, your Note would only have about 1 GB memory, and would be considerably slower.
It's a little like having the cook wash your car while waiting three hours for the turkey to cook. You get both the turkey and the car wash.
Click to expand...
Click to collapse
I'm guessing you mean android, not windows 7
Though I imagine both do the same thing lol
nirurin said:
I'm guessing you mean android, not windows 7
Though I imagine both do the same thing lol
Click to expand...
Click to collapse
I used Windows 7 as an example because I know how it works. Like you, I imagine Android 4.3 does the same thing.
I was wondering about this as well. On my Note 2, when I clean the ram, it will go to 480-500 / 1.75g on this tab, ext I could get is 1.33/2.75.......
I went through and turned off a lot of the apps, it helped free up a little bit.
Does anyone have a list of the apps that are safe to turn off?
:beer:
Sent from my SM-P600 using Xparent Cyan Tapatalk 2
I have LTE version with Snapdragon and when I start the tablet, it uses about 890MB of 2,35GB available (yes, it has 3GB RAM, but graphic processor uses some of this RAM)... When it loads all apps to RAM (about 50 of them, we know android do this) and I start few apps(FB, Gmail, Chrome, Hangouts for example), I still use only about 1,3GB of RAM... So almost 1GB is still free
In Android having too much free ram is not a good thing. Let your apps use it, you don't have to worry about not having enough ram, OS manages it well for you.
ddavtian said:
In Android having too much free ram is not a good thing. Let your apps use it, you don't have to worry about not having enough ram, OS manages it well for you.
Click to expand...
Click to collapse
+1
Android is a mobile OS which means that it can backup and restore not needed apps if necessary and the 3GB are only the runtime memory beside this it can use the whole internal memory for "running" apps. So long Android got enough memory it holds all apps in memory which speed up the whole device. Therefore it is positive that the Note use his whole 3GB memory and don't think that killing apps or free memory will be a good idea. It will slow your device and produce lags.
ddavtian said:
In Android having too much free ram is not a good thing. Let your apps use it, you don't have to worry about not having enough ram, OS manages it well for you.
Click to expand...
Click to collapse
Elim said:
+1
Android is a mobile OS which means that it can backup and restore not needed apps if necessary and the 3GB are only the runtime memory beside this it can use the whole internal memory for "running" apps. So long Android got enough memory it holds all apps in memory which speed up the whole device. Therefore it is positive that the Note use his whole 3GB memory and don't think that killing apps or free memory will be a good idea. It will slow your device and produce lags.
Click to expand...
Click to collapse
They are both right. Android is based on linux. Linux uses ram very effectively to cache apps and data to speed up your system. When something needs ram it removes a different app or data from the ram to keep moving. It works totally different from Windows. Check out this article.
http://www.androidcentral.com/ram-what-it-how-its-used-and-why-you-shouldnt-care
Every day since Android came out someone asks this question somewhere... Is Google offline?
Sent from my SM-P605 using XDA Premium HD app
If you want to change how your ram is managed, and you have root, you can use the v6 supercharger or a simple minfree setting app. V6 is in the developer section of the general android forum on this site. I've found that m ram fills up from cached apps. V6 will let you auto clear however often you want.

Can you lower the ram usage?

Hi there,
I have the ZF2 with 4GB of ram. After a couple of days of usage, it seems impossible to lower the ram usage below 1.8GB even when I clear the cache of all apps.
However, when I restart the device, my ram usage is below 1GB.
I have uninstall or disabled every app I could without rooting. & I don't want to root now.
Nonetheless, I would like to keep the ram usage of my device as low as possible (2GB of ram use seems a lot to me, especially when I have one or two apps open)
Did you find a tricks or ways to keep 2gb or more ram free at all time ?
Thank you.
Simply, there is no clear way and those numbers are normal. The best memory management is with native linux, not yet available on zenfone 2.
What's the point of always having 2gb of free ram? RAM is completely useless if you aren't using it.
yumms said:
What's the point of always having 2gb of free ram? RAM is completely useless if you aren't using it.
Click to expand...
Click to collapse
It's not a question of useful or useless. It's a question of is it possible and if yes, how.
Yes, keep the phone in deep sleep with all apps closed and disable everything in autostart , better yet, you can just power off the device
p.s: not even custom roms will run that low, I had cm12.1 with lg g3 3gb ram, I disabled basically everything and phone will still boot with at max 2gb free ram, maybe 2.2gb if you start killing launcher and sytem apps lol
4Gb ram with 2.2-3Gb free Ram is plenty for a cellphone. Its even plenty for a desktop unless you run hard core 3d games like crysis.
The lowest I have seen is 150Mb/1Gb usage with Nexus 7 v1 tablet yet it was hell slow. Note that the more Ram you have, the more the system will use it and cache in it. This will increase apps loading speed since they are directly loaded from Ram vs local storage.
I would love to have an app that lets you select what to cache in Ram, e.g. large high-resolution PDFs that take forever to open and load :crying: I have 300-800Mb PDFs that will take 1 min just to open.
Indeed, an option to decide what to cache would be great.
Can we expect less usage and caching with the 5.1 update or with a custom Rom?
Sent from my ASUS_Z00AD using Tapatalk

Categories

Resources