enabling swap - RAZR i General

Just to let you know that Razr I works beautifully with ZRAM swap enabled !
Moto Razr I comes with a 1G of RAM, but sometimes that is not enough. The Linux kernel uses swap space even if there is a lot of memory to page out allocated but rarely used pages, and move instead disk cache into memory.
I enabled a 256Mb ZRAM swap, and the difference in device responsivness is impressive - I can switch between applications with no lag, I get no freezes, and I'm happy with it.
To enable this, I sent a pull request to the Gamma kernel: http://forum.xda-developers.com/showthread.php?t=2217725
You will need to flash the next kernel image after the change is merged.

swap
ddalex said:
Just to let you know that Razr I works beautifully with ZRAM swap enabled !
Moto Razr I comes with a 1G of RAM, but sometimes that is not enough. The Linux kernel uses swap space even if there is a lot of memory to page out allocated but rarely used pages, and move instead disk cache into memory.
I enabled a 256Mb ZRAM swap, and the difference in device responsivness is impressive - I can switch between applications with no lag, I get no freezes, and I'm happy with it.
To enable this, I sent a pull request to the Gamma kernel: http://forum.xda-developers.com/showthread.php?t=2217725
You will need to flash the next kernel image after the change is merged.
Click to expand...
Click to collapse
A noob question: Is this similar to the swap partition in linux?

paulle said:
A noob question: Is this similar to the swap partition in linux?
Click to expand...
Click to collapse
It's a different beast.
http://forum.xda-developers.com/showthread.php?t=1851991

Can you post a tutorial?

ddalex said:
Just to let you know that Razr I works beautifully with ZRAM swap enabled !
Moto Razr I comes with a 1G of RAM, but sometimes that is not enough. The Linux kernel uses swap space even if there is a lot of memory to page out allocated but rarely used pages, and move instead disk cache into memory.
I enabled a 256Mb ZRAM swap, and the difference in device responsivness is impressive - I can switch between applications with no lag, I get no freezes, and I'm happy with it.
To enable this, I sent a pull request to the Gamma kernel: http://forum.xda-developers.com/showthread.php?t=2217725
You will need to flash the next kernel image after the change is merged.
Click to expand...
Click to collapse
I've enabled it also, it didn't help too much. Try to switch between Chrome and Skype and Hangouts, each time each app is killed. Memory management in Android sucks.

Related

compcache: some clarification please

i've been reading up on compcache and the way that it works, but i'm pretty confused on how exactly this works on the android platform... i can't seem to pull the exact definition of compcache for android through all the chatter from threads, and it seems my answer gets lost in translation...
so to put it simply, i'm assuming from all my thread reading that compcache is actually based off the ext partition that you have on your SD card, and not on the RAM itself on the device? is this right? this is where i get confused, cause the compcache writers and developers say that it creates a ramzswap in the ram itself and stores compressed pages on the device RAM, effectively increasing the efficiency of your onboard RAM... in android's case and all the cooked ROMs, does it work off your SD card and your ext partition? or does it work off the RAM itself...
i'm currently running cyanogen's latest 32b release on my mytouch and its running extremely fast WITHOUT apps2sd, but i would like the benefits of compcache to prevent losing information from my browser and other applications like gtalk, which supposedly compcache helps with... would i have to create a ext partition and utilize apps2sd in order to utilize compcache? thanks in advance
bump... would like to be learned
I'm also a bit confused
i would like to know as well as i've installed Cyanogen v4.0.1
i went into the recovery console and formatted my SD choosing the option of "Format SD: fat32+ext2+swap"
was this the correct thing to do?
either way if you format cyanogen's rom with just a fat32, or fat32 + ext + swap, it doesn't matter as his rom is compatible with either apps2sd or without...
the question is, where does compache compress its file pages? in the RAM, or in the SD card
Compcache uses xMB of RAM as compressed swap space. No ext2 or swap files or swap partitions are needed (though the latter two can be used as "backing swap").
So on a 32B, with RAM limitations already, how is that a good thing?
PsychoI3oy said:
Compcache uses xMB of RAM as compressed swap space. No ext2 or swap files or swap partitions are needed (though the latter two can be used as "backing swap").
Click to expand...
Click to collapse
thanks thats the answer i was looking for...
MikLSP said:
So on a 32B, with RAM limitations already, how is that a good thing?
Click to expand...
Click to collapse
how is it NOT a good thing? compcache compresses page files, effectively increasing your RAM's efficiency and "technically" increasing its storage size in the allocated ramzswap... according to the developer's tests on different machines, it effectively makes it seem like it doubles the RAM amount on your computer...
this is nothing but good, especially for lower end machines like netbooks, and phones that have limited RAM allocation to begin with...
heres a small tidbit from the google source page
http://code.google.com/p/compcache/
i don't mean to threadjack, but compcache will be active regardless of whether or not i partition my sd card to fat32+ext2+swap...?
and i only have to partition my sd card to fat32+ext2+swap ONLY if i want apps2sd to work correctly using Cyanogenmod's rom...?
please correct me if i'm wrong.
i'm really wondering because even though i'm using Cyanogenmod's latest rom on my MyTouch, i still get considerable lag throughout such as typing on the virtual keyboard, screen orientation rotation, etc. i also use TasKiller.
maybe i'm expecting too much...
probably... lag from orientation, keyboard, and small things like this are still very common... i've tested a lot of roms on both the g1 and mytouch, and cyanogen's is by far the fastest...
As I have understood it sort of compresses things stored in the RAM (like background apps)
I've done a good amount of reading on compcache and have found that its been causing problems in my 4.0.1 build of cyanogen... the best thread i've found on the issue is:
http://forum.xda-developers.com/showthread.php?t=547752
hopefully users continue to share their findings, as the the thread mentioned is for the G1, and i'm sure optimal compcache settings will differ on the mytouch 3G... i will be doing some extensive testing on compcache only (due to me recently buying a 32gb micro card, and don't want to mess it up with linux swap) and will report my results... if anyone would like to join in, please post your findings as well...

Always low on memory - Advice

Hi all,
I'm always low on memory on my phone, I run quite a few hungry apps so looking at suggestions now please. I'm a linux-person but this one baffles me on the right way to go ahead.
I'm on CM-4.2.3.1 pretty much as standard, no tweaks to note on it.
Advanced Task Killer shows me at generally around 17Mb available memory, but in my logs I often get:
Code:
11-12 13:33:43.102 I/ActivityManager( 322): Low Memory: No more background processes.
So I'm thinking I need to do something. I've not got swap enabled, nor have I got compcache as far as I'm aware, so what should I go for here and is there a simple guide on it? As I have done a few searches and its overwhelming the information that comes back.
Thanks in advance everyone
You could try the free app "automatic task killer" see if that helps. I've personally came to the conclusion that CM 4.2+ ROMs are RAM hogs themselves. Try flashing a ROM with the 10 meg RAM hack if it bugs you.
You're supposed to be low on memory.. That means your phone is using the it to the greatest efficiency.. Empty memory is wasted memory. Unless you're experiecing long load times and loads of caching, its normal.
goldenarmZ said:
You're supposed to be low on memory.. That means your phone is using the it to the greatest efficiency.. Empty memory is wasted memory. Unless you're experiecing long load times and loads of caching, its normal.
Click to expand...
Click to collapse
qft, this is typically how linux runs anyways.
Do you have an ext partition on your SD for apps2sd? How about a linux swap partition (enabled)?
mikedmeyer said:
Do you have an ext partition on your SD for apps2sd? How about a linux swap partition (enabled)?
Click to expand...
Click to collapse
I second the suggestion for using a linux swap partition!
Agreed, and yes I have a swap partition correctly formatted, however thats the problem there are too many "guides" of how to enable/use the swap on CM, so if anyone can point me to the right entry (couldn't find it on the CM wiki either), or how to enable any of the other memory enhancements (compcache or whatever)
Thanks!
You can dl user.conf app from the market. explanations are given in the help section

[Q] Re-Partition System Storage?

I have used to use Kaiser and Topaz for now. I think these devices made by HTC has a single chip for storage for use of both Ram and Rom.
I do not use the program memory generally, i have ~150mb of free space of it, however, i have only ~60-70mb of ram which is not enough.
Is it possible to partition this chip to change the size of ram module by picking up a little from the program partition?
As I know, It uses different modules, you can see them in this topic: http://forum.xda-developers.com/showthread.php?t=669871&page=2
And the RAM and ROM cannot be the same, because RAM forgets everything what is loaded into that if you restart/shutdown.
And you know the RAM means Random Access Memory and ROM means Read Only Memory. We can write the ROM because it has to be programmable, but it doesnt forget its data.
So I'm sorry, I think its impossible
Sorry for my English, I hope you understand.
ccaparli said:
I have used to use Kaiser and Topaz for now. I think these devices made by HTC has a single chip for storage for use of both Ram and Rom.
I do not use the program memory generally, i have ~150mb of free space of it, however, i have only ~60-70mb of ram which is not enough.
Is it possible to partition this chip to change the size of ram module by picking up a little from the program partition?
Click to expand...
Click to collapse
disable push internet .exe. it takes up 10mb ram. disable lock screen 6mb ram. disable start menu,use kenia1234 alternative for sense 15mb ram. disable htc tabs you don't use. disable htc phone skin dialer, 15mb extra ram. use these, you will get lots of free ram.

[Warning] Never set VM Heap size too low on Galaxy Note

I had been playing with the VM Heap size. My note was working fine with the value of 128m and 64m. However after tried changing down to 32m the Note's re-start stuck in glowing SAMSUNG logo with no choice but to re-flash ROM.
So guys be careful playing with this tweak. I won't touch it again and leave it at default setting.
LowDef said:
I had been playing with the VM Heap size. My note was working fine with the value of 128m and 64m. However after tried changing down to 32m the Note's re-start stuck in glowing SAMSUNG logo with no choice but to re-flash ROM.
So guys be careful playing with this tweak. I won't touch it again and leave it at default setting.
Click to expand...
Click to collapse
I actually always put it on 128Mb to have a smooth experience!
VM Heap is the maximum memory allocated for an application to run smoothly!
zylor said:
I actually always put it on 128Mb to have a smooth experience!
VM Heap is the maximum memory allocated for an application to run smoothly!
Click to expand...
Click to collapse
I checked VM Heap size on my stock rooted ICS last night and found that it's 256m. So I think the 128m is not optimum for Note.
My bad.. 128 is for SGS2 lol
you are right my friend
LowDef said:
I checked VM Heap size on my stock rooted ICS last night and found that it's 256m. So I think the 128m is not optimum for Note.
Click to expand...
Click to collapse
Just because it's the stock setting it is not said it's the best setting. If stock settings were always the best settings there would be no need for custom Roms and tweaks.
Gesendet von meinem GT-N7000 mit Tapatalk 2
Kanalcommander said:
Just because it's the stock setting it is not said it's the best setting. If stock settings were always the best settings there would be no need for custom Roms and tweaks.
Gesendet von meinem GT-N7000 mit Tapatalk
Click to expand...
Click to collapse
Now what is the right value then?
Don't just leave everything upon the cookers settings since so far their ROMs have never been being the best.
Honestly what app needs 256mb? I always set mine to 128mb.
Sent via carrier pigeon
What is the benefit for reducing it to 128m? or even increasing it higher?
Although your thread title is right, your information can be a bit misleading.
The heap is a Java term that is used for storing application related resources into memory. For instance layouts, Java-code, strings or arrays with information. But in all versions below Android 4 (ICS), The default size an application needed was about 3MB for this. Bitmap's were placed outside the heap for some stupid reason. That's why one could get away with an heap size of 32MB or even lower. At the time this was probably a good idea because devices tended to have small internal memory (256MB or 512MB) and so Bitmap's could be swapped by the OS.
Anyway, with current devices and the current state of Android, the Bitmap's - which are a large portion of the allocated memory - are placed inside the heap. Also if you turn on to force GPU an app will use an extra of 8MB internal memory. So if you would add things up, you would at least need about 11MB for only starting the program. About 1MB for random values and quite a lot of memory for 'non-compressed' images. I guess about 16MB if your device would want to draw the entire screen without any compression with one 16-bit image! After which your app would use about 40MB of memory.
Now, take the Android launcher for example, that's an app with loads of images cached in memory. So my guess is that an app like that would use around 70 - 80MB of heap size just to run in GPU mode. This shouldn't be a problem with today's devices as we have more and more internal ram and processor speed available to use. So I think the ideal sweetspot for todays apps should be 128MB, as you could fit about ~6 apps running at once in the main memory. If you put the heap size at 256MB you could run about 3 apps at once. Including drawing.
Hi!!
alex3305 said:
Although your thread title is right, your information can be a bit misleading.
The heap is a Java term that is used for storing application related resources into memory. For instance layouts, Java-code, strings or arrays with information. But in all versions below Android 4 (ICS), The default size an application needed was about 3MB for this. Bitmap's were placed outside the heap for some stupid reason. That's why one could get away with an heap size of 32MB or even lower. At the time this was probably a good idea because devices tended to have small internal memory (256MB or 512MB) and so Bitmap's could be swapped by the OS.
Anyway, with current devices and the current state of Android, the Bitmap's - which are a large portion of the allocated memory - are placed inside the heap. Also if you turn on to force GPU an app will use an extra of 8MB internal memory. So if you would add things up, you would at least need about 11MB for only starting the program. About 1MB for random values and quite a lot of memory for 'non-compressed' images. I guess about 16MB if your device would want to draw the entire screen without any compression with one 16-bit image! After which your app would use about 40MB of memory.
Now, take the Android launcher for example, that's an app with loads of images cached in memory. So my guess is that an app like that would use around 70 - 80MB of heap size just to run in GPU mode. This shouldn't be a problem with today's devices as we have more and more internal ram and processor speed available to use. So I think the ideal sweetspot for todays apps should be 128MB, as you could fit about ~6 apps running at once in the main memory. If you put the heap size at 256MB you could run about 3 apps at once. Including drawing.
Click to expand...
Click to collapse
Ok thanks .....
Im creat a video ok? And I am upload to youtube.
lol yeah just bricked my phone...
kacs said:
I have got an Xperia Play
I am rooted this .
One day I am buy the Rom Toolbox Pro
Well I am go to the build.pro tweaks and I am set the VM Heap to low ..... after its asked to me DO you want to reboot your phone and iam reboot it.
And its stuck in the where i can write the PIN Code. But i can not unlock my device in the lockscreen because its reboot but i dont know why
Well what i need to do whit my device?????
PLS help me
ANd sorry for my bad english
Click to expand...
Click to collapse
Not sure if trolling, or just stupid.
Sent from my GT-N7000 using xda app-developers app
kacs said:
I have got an Xperia Play
I am rooted this .
One day I am buy the Rom Toolbox Pro
Well I am go to the build.pro tweaks and I am set the VM Heap to low ..... after its asked to me DO you want to reboot your phone and iam reboot it.
And its stuck in the where i can write the PIN Code. But i can not unlock my device in the lockscreen because its reboot but i dont know why
Well what i need to do whit my device?????
PLS help me
ANd sorry for my bad english
Click to expand...
Click to collapse
I had that problem oso wit my xp3r14 pl4y.. U n33d 2 m1cr0w4v3 it 2 f1x 1t.
Sent from my Galaxy Nexus using xda premium
exb0 said:
I had that problem oso wit my xp3r14 pl4y.. U n33d 2 m1cr0w4v3 it 2 f1x 1t.
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
Me too
From the man hiding in the attic....
Galaxy Note I : I did a big mistake... please help
Hi, guys.
It's a pity I didn't read your advice earlier, before I make my mistake.
I have the Galaxy Note I, rooted, and everything was working fine.
I had this evening the bad idea of trying to tweak VM Heap Size.
Previously set at 64m, and I tried to set it up at 36m. The application asked me confirmation for reboot, and from that moment, I cannot complete the boot anymore. I'm stuck at SAMSUNG logo, and that's all...
I didn't install CWM recovery or anything like that...
Do you have any idea of how I could get rid of that, please, without loosing all my data ?
(I'm posting from France, I'm sorry for my English, I hope you will understand my questions)
Constantin.
maybe factory reset if NOT on stock ICS kernel...
just a thought. I never tried it..
Recognized Distributorâ„¢
thanks
I'll search for more informations about that, and then I'll try it if I can ever find somewhere that it will not harm
Thank you
When you mess with this stuff just never set it to set on boot, so you can reboot to get back to normality
From box 13......
Hi,
for build.prop modif problem like this and you are stuck at boot.
If your device is rooted,you have the ability to recover this noob modification!
If you use flashTool or something like that(maybe odin)
start the program and connect your phone stuck at boot logo.
The program reconize your phone.
now ask for root permission(for ok response,you need to have register your device before in the program,if not the ask could not be done and you are dead at this point !)
now you have root acsess there is an option in the program to write in build.prop/edit file
So load it and give the right path in and change thing you have made wrong(VM=64/128/256)
Save it and reboot
Done!
Yeah brick it down stuck logo

Amazon tablet optimization. Memory load pressure cured.

Favorite rom -
Faux clock / any kernel tuner -
Enable kms - (setting recommended from Google for low memory device)
Set kms page_to_scan to 100
Set kms sleep_milleseconds to 500
Enable set io scheduler from 2048k - 4096k
Ram memory pro - (this setting help with memory swap when using kms, zram, and swap file combinations)
Enable at boot setting
Set balance tuning for apps and multitasking
Setxperia - (not available in store for tablet/must find and sideload) (setting recommended from Google for low memory device)
Enable zram with 400 MB size (zram have priority before using swap file / that where the magic at) (least used data get page out to zram and then to the page file)
Set swap file to data partition with 200 MB size
Set swappiness set to 100
Create swap. Total swap setting aside should equal to 615 MB
Use zramcc to check if zram/swap working. Swap total size should be 615MB. (reduce swap file size from 400 to 200 to minimize lag when all available swap are used up)
Link2SD - no need for explanation. I used this with a fast flash card to hold my titanium backup and app linkage. This app allow me to have all my apps that I used.
Seeder 2.0 - no need for explanation. This just classic lag free app. Check the entropy resources before and after usage before complaining how old and useless this app is.
Misc -
Unload/uninstall any memory hogged app, like Facebook Messenger (takes up almost 50MB), that like to stay in the system memory permanently. Can't even kill it with task manager. DO NOT USED ANY MEMORY CLEANER OR ADVANCE TASK KILLER. This will cause a swap overload. Let android manage the memory task. Reboot the tablet once all the settings have been applied. The tablet will behave very well and feel like a more expensive tablet.
I have the stock opengapps replace all the core stock rom app. Afterward, I removed any gapp that I do not use.
My Amazon Fire experiences:
My launcher is loaded with widgets and I can pretty much open any application that I used without any freeze or as little lag as possible. I game on this table now and no longer use my phone. Brave frontier and valkyrie crusade.
https://01.org/android-ia/user-guides/android-memory-tuning-android-5.0-and-5.1
Sent from my KFFOWI using Tapatalk
Kms or Ksm???
Update on information
Is all of this information still up to date? Any new additions/tweaks?
Also for some reason, after using zramcc I don't see 615 I only see 415 total.
svvparakala said:
Is all of this information still up to date? Any new additions/tweaks?
Also for some reason, after using zramcc I don't see 615 I only see 415 total.
Click to expand...
Click to collapse
Err...not really...although much of the guidance is reasonable albeit not optimal IMHO. Check out "L Speed" if seeking a quick tuner with a large following and solid reputation. Tweak one thing at a time and assess benefits before moving to the next item.

Categories

Resources