[GUIDE][HOW TO]How to control excessive use of ram in custom roms or stock roms - Moto G Q&A, Help & Troubleshooting

Hi ​
Before I mean that applications and tweaks that will give them are the ones I've used, tested and have worked for me, so if you have that you know could be so kind as to comment as you lack have managed to control the use of RAM.
I also want to say sorry if my English is bad, I had to use the Google translator on the one hand and on the other my little knowledge in English, I'm sorry.
Not if you have noticed but in the Custom Roms of our device we overuse of RAM, this becomes more noticeable even Roms based on Lollipop, as can be CyanogenMod 12 where we can see that sometimes bubbles Messenger chat can be closed or the music is turned off, so I write this guide to explain how to control this use with some applications that truth to me I have worked.
-Apps:​
The truth use applications to control the use of RAM is very embarrassing, since we are no longer in a device with 180MB of RAM, and have to use Tweaks or applications that optimize this, for some use some Tweak or application on this device is something good to optimize it a bit more, but we think 1GB of RAM and a 1.2 Ghz processor with 4 core.​
To control the use of RAM I recommend...
Root Booster(FULL VERSION):​
https://play.google.com/store/apps/details?id=com.ram.memory.booster.cpu.saver
The truth is that this application achieving control the use of RAM on my device, but I had to buy the full version, you can use the mode solves this problem, in short, once you buy the application must be enabled mode more stability and activate (Required root to use this application, it is a bit obvious that the application is called root Booster).
​
AutoKiller:​
Before knowing Root Booster using this application but really saw that I closed many processes necessary but the truth if I won a big improvement in the management of RAM, the truth if you run install I recommend you select the Ultimate mode.
-Tweaks:​
Truth does not recommend it Tweaks init.d but the truth if they help as much as elsewhere in scrolling speed or other you run.​
L-Speed:​
http://forum.xda-developers.com/android/software-hacking/tweak-l-speed-v1-0-02-02-2015-t3020138
This Tweak me if I worked well to improve the speed of scrolling and a little more open applications, RAM usage but saw no improvement truth in one or another section if that worked.
Now, this is the only tweak I can recommend for this device.
-Things not recommend:​​
Do not mix Tweaks:​
Many would say that mixing Tweaks will gain greater speed, but not really. In some cases this may cause system instability, causing not work normally, can cause terrible lags or even a brick, do not think for mixing Tweaks will gain greater speed, if your system already works well with you Tweak to mix with more.
​
Do not mix apps:​
I say almost the same as in the previous tip, if your device and works well with an application to modify that, the truth if mixed apps can cause applications to close or in some cases are playing something and that game middle parting closure.
​
Well, that's all I can tell you, as I said at the beginning of the post if you have any Tweak or application that worked them to control this might share? would help users much more control this big problem, I hope you enjoyed this post and wish them well controlling this great use of RAM in their devices,
Greetings.
​

Related

Another 'Which ROM'

I have now researched the various 'ROMs' (actually firmware), and have narrowed the field to four. I'd like input on these. Priorities are (in order):
1. Complete Stability. I've run TomTom on WM5 for 6 years, and outside of TomTom it's a real mess. WM is so buggy I can't use it confidently for anything other than nav.
2. Good Battery. I have a friend who just got an Evo, and he says battery lasts only ~3 hours. I'm sure that's because of the large display, but also I read that several ROMs and apps really sacrifice battery on the N1. One screen I want to have dedicated to some sort of CPU/Mem/Storage monitor, so I can easily check it.
3. Lots Of Cool Features. It seems that video at 720p might be problematic as I gather it's really 3Mp upsampled, and/or it disables the still camera/flash somehow? Kernel optimizations are nice, although "deodexing" is not defined -anywhere-. I'm unlikely to stray beyond the UI built into the ROM, as it could introduce instabilities.
a. CM6 - The Big Kahouna. This ROM will likely be supported for a long time and is likely to integrate the newest kool features over time.
b. MoDaCo - Its thing seems to be stability, although a feature-by-feature comparison with CM6 leaves me confused, much less comparative usability is impossible to determine. Kitchen allows preclusion of G**gle apps.
c. LeoFroYo - The guy seems to know what he's doing, so under consideration. Comes with G**gle apps tho.
d. Kang-o-rama - an innovator whose improvements have been co-opted by others.
e. RoDrIgUeZsTyLe - I like it, but it is clearly very ill given the thread comments. Rejected.
Really? Nobody knows anything about this?
it depends on which phone u have bro, u didnt even specify that

KSM, does it really improves performance ?

Well sadly i don't have an answer for that question yet...
I'm trying to think of a way to put KSM to the test on my android device.
As far as i understand it is possible that the kernel actually causes high CPU usage trying to map and unmap memory pages over and over again.
This issue is known for linux and other virtual machines so it is possible that the Same effect will be on the android vm
Testings that i found are not relevant to android.
For example:
The result is a dramatic decrease in memory usage in virtualization environments. In a virtualization server, Red Hat found that thanks to KSM, KVM can run as many as 52 Windows XP VMs with 1 GB of RAM each on a server with just 16 GB of RAM. Because KSM works transparently to userspace apps, it can be adopted very easily, and provides huge memory savings for free to current production systems. It was originally developed for use with KVM, but it can be also used with any other virtualization system - or even in non virtualization workloads, for example applications that for some reason have several processes using lots of memory that could be shared.
Click to expand...
Click to collapse
http://kernelnewbies.org/Linux_2_6_32
What i would really want to know is what would happen if each of these VMs Would run a different application/game/audio/graphics software at the same time ? or what if the same vm will run many different apps ? and also to compare cpu usage with and without KSM
Guess i'll need a tool for that. something like 'iostat' but for memory diagnostic and another tool to see a per process CPU usage but 'top' is not good enough for that.
Any way, the best test should present clear results with precised data.
I'll keep looking for legit way to put it to the test.
If you can think of a way to test KSM with android, please let me know.
This is a technique that relates mostly to processes like virtualisation. For example, when you load 5 windows XP VMs, you'll have a good 10 - 20 services that are practically the same in memory in each VM. Instead of each service using 10mb (ie, 10mb x 5 = 50mb), you only need say 15 or 20mb using KSM. If you use different applications, it is very unlikely that anything would be saved FOR THAT APPLICATION. However, the main elements of a Windows XP System would still be there (drivers, explorer, firewall, logon, search and so on). Means little in one setup, but when you have several VMs it is shown to be a huge advantage. As we know a simple XP install can use 500mb of RAM actively, and this is fairly uniform across instals.
With android, i don't know if there are specific RAM savings to be had. Don't know enough about the inner workings and the sandbox android puts its apps in or how apps interact with system services. Sadly, i can't think of a good way to test it out either, but i'll be keeping an eye on this topic for someone (much) more knowledgeable to come along.
Harbb said:
Sadly, i can't think of a good way to test it out either, but i'll be keeping an eye on this topic for someone (much) more knowledgeable to come along.
Click to expand...
Click to collapse
Enter bedalus, stands there with a vacant expression on his face. Harbb looks disappointed.
kernels ; battery ; ROM ; gov/sched
That entire paragraph was dedicated to you bedalus, we both know that.
Lol
I hope someone can answer this though.
kernels ; battery ; ROM ; gov/sched
Wait for someone............
Sent from my Nexus S using xda premium
KSM does not improve performance on Android just like that - all enabling KSM does, is enable SUPPORT for the Feature but Applications would have to make use of the feature, which they don't.
You can easily verify this like that :
echo 1 > /sys/kernel/mm/ksm/run
<wait and/or run the Applications of your choice>
cat /sys/kernel/mm/ksm/pages_sharing
IF the above shows a value > 0 then you are making use of KSM else it's just available, without anyone using the feature.
Here's an interesting Article that gives a little more insight :
http://www.linux-kvm.com/content/using-ksm-kernel-samepage-merging-kvm
By the way, the same is true for ZCACHE. If you really want to make better use of your Memory (RAM) then using ZRAM as a Swapdevice does work (and may often make sense, too).
That all said : There appear to be efforts to make use of KSM http://forum.xda-developers.com/showthread.php?t=1464758 - so things may well change ...
any update on this...?

[MOD][TWEAKS] Seeder (For lag reduction and performance boost)

Again since Sensation XE doesn't have people promoting seeder too much, I brought it here for those who are not familiar with this.
Please don't post negative things here. I only understand theory of this mod that's all. And I held no credit to any of the content.
Requirements:
1. S-Off
2. Custom recovery
3. Rooted
4. Init.d Support for flashable version
CREDITS FIRST:
lambgx02 (for the original seeder and APK format) http://forum.xda-developers.com/showthread.php?t=1987032
ryuinferno (for flashable version) http://forum.xda-developers.com/showpost.php?p=36479461&postcount=1924
FAQ:
What is seeder?
Its a mod that increases resource in your device so it wont suffer any starvation(lag).
Above is the easiest way to explain it.
What is the difference between APK and Flashable version?
APK version provides more options to tune method it provides resource and the frequency of it.
Flashable version will be automated in your device as long as your device have init.d support.
How can you prove it significantly improves performance?
Well I can't really tell, Dev's in sensation department is extremely good all ROM's are well tweaked. Its good enough without it, but IMHO it will be better with it.
To .zip version user only
Once you flashed it. Go to terminal emulator. Enter
su
seeder
A menu will show up. It will indicate if seeder is working in your device or not.
Thank the developers of this awesome invention, then Thank me if you think its good for me to bring it here.
Cheers!
TIP: Try on those high load games, the loading speed improvements are the best ways I can see after using this.
good
downloaded the app using the QR code and never installed. wheb you select it tin the task bar it doesnt go into the instalation menu. however when i went to the downloads in my phone it opened the installer. it tried too install but took a very long time. but in the end worked thansk made a slight difference to the lag on my phone. :good:
HTC sensation 4G
ROM: CM 10.1-20130212-albinoman887-pyramid
Although this improves performance slightly, the only thing it really does is run your CPU at a higher frequency. This'll cost precious battery life.
ridder215215 said:
Although this improves performance slightly, the only thing it really does is run your CPU at a higher frequency. This'll cost precious battery life.
Click to expand...
Click to collapse
Can't say you're wrong at the battery life part. But IMHO, it doesn't actually touches the frequency part. Frequency is something that runs instructions, but this thing provides additional resource aka fuel for your device. It don't make your engine combust quicker, it will only make your engine combust cleaner, and more fuel that's all.
KiD3991 said:
Can't say you're wrong at the battery life part. But IMHO, it doesn't actually touches the frequency part. Frequency is something that runs instructions, but this thing provides additional resource aka fuel for your device. It don't make your engine combust quicker, it will only make your engine combust cleaner, and more fuel that's all.
Click to expand...
Click to collapse
I'm just going to leave this quote from a CM maintainer here:
“IMNSHO the recent entropy pool fad is bull***. The only users of /dev/random are libcrypto (used for cryptographic operations like SSL connections, ssh key generation, and so on), wpa_supplicant/hostapd (to generate WEP/WPA keys while in AP mode), and the libraries that generate random partition IDs when you do an ext2/3/4 format. None of those 3 users are in the path of app execution, so feeding random from urandom does nothing except make random… well… less random.
The only conceivable reason some devices may feel faster is because by constantly polling the PRNG, it keeps the device’s I/O in constant use (which in turn, depending on device, will make the CPU stick to higher clock frequencies to keep up and/or ramp up the IO scheduler).”
Source
Don't get me wrong, if it seems to help for you, that's great. But I'm not going to use it.
ridder215215 said:
I'm just going to leave this quote from a CM maintainer here:
“IMNSHO the recent entropy pool fad is bull***. The only users of /dev/random are libcrypto (used for cryptographic operations like SSL connections, ssh key generation, and so on), wpa_supplicant/hostapd (to generate WEP/WPA keys while in AP mode), and the libraries that generate random partition IDs when you do an ext2/3/4 format. None of those 3 users are in the path of app execution, so feeding random from urandom does nothing except make random… well… less random.
The only conceivable reason some devices may feel faster is because by constantly polling the PRNG, it keeps the device’s I/O in constant use (which in turn, depending on device, will make the CPU stick to higher clock frequencies to keep up and/or ramp up the IO scheduler).”
Source
Don't get me wrong, if it seems to help for you, that's great. But I'm not going to use it.
Click to expand...
Click to collapse
I promoted this because it seemed great on my previous device. But in sensation the effect is much lesser than anticipated. Works in my friend's S2 though. Maybe its for low end devices only tsk tsk tsk.
But still, no harm experimenting on everything.
KiD3991 said:
I promoted this because it seemed great on my previous device. But in sensation the effect is much lesser than anticipated. Works in my friend's S2 though. Maybe its for low end devices only tsk tsk tsk.
But still, no harm experimenting on everything.
Click to expand...
Click to collapse
Seeder was designed for older versions of android. It is stated in the thread that it is solved in newer versions of android.

Newbie Here! some questions?

So the first question is Which device I should go for which fulfills the following requirements of mine.
- Boosted Performance for Multi-Tasking like Browsing, Music, Downloading & HD Skype Calling etc.
- Long Battery like 4-5 Hours Skype Video Call
- Customizable Appearance of the UI.
- Sturdy to bear the Roughs with me & Sleek & Square Shaped may be...
The First two I would say are compulsory & later ones can be adjusted with...
As with me Now I have got.
GreenTel G9, its a Basic MKT Device with 512 Mb RAM & 6 Gb of Storage..
img.tapatalk.*com/d/14/07/24/asevevep.jpg
img.tapatalk.*com/d/14/07/24/a3ytaqej.jpg
img.tapatalk.*com/d/14/07/24/agy2uhu7.jpg
(Newbies cant post Links)
This is the Device bearing all my ruthless Experiments.
I rooted it and have modded somethings and tweaked the Performance using Xposed Module.
My Aim was to Port a MKT ROM & make it work on it which I have not succeeded yet because I do not know where to start and which things I should know about Flasing..
Ready to Take Deep Dip in the Ocean of Androids kindly give me leads to Exparimentations...
EmikSavage said:
So the first question is Which device I should go for which fulfills the following requirements of mine.
- Boosted Performance for Multi-Tasking like Browsing, Music, Downloading & HD Skype Calling etc.
- Long Battery like 4-5 Hours Skype Video Call
- Customizable Appearance of the UI.
- Sturdy to bear the Roughs with me & Sleek & Square Shaped may be...
The First two I would say are compulsory & later ones can be adjusted with...
As with me Now I have got.
GreenTel G9, its a Basic MKT Device with 512 Mb RAM & 6 Gb of Storage..
img.tapatalk.*com/d/14/07/24/asevevep.jpg
img.tapatalk.*com/d/14/07/24/a3ytaqej.jpg
img.tapatalk.*com/d/14/07/24/agy2uhu7.jpg
(Newbies cant post Links)
This is the Device bearing all my ruthless Experiments.
I rooted it and have modded somethings and tweaked the Performance using Xposed Module.
My Aim was to Port a MKT ROM & make it work on it which I have not succeeded yet because I do not know where to start and which things I should know about Flasing..
Ready to Take Deep Dip in the Ocean of Androids kindly give me leads to Exparimentations...
Click to expand...
Click to collapse
Hey try to search device on internet which fits your budget ...
For performance see processor frequency
For multitasking see ram memory size
And fit battery life see battery capacity in mAh
Suggested configuration
Processor 1.2ghz dual core or more
Ram 1gb or more
battery 2000 mAh or more
Hit thank button if this post helped you

ROM and kernel flashing guide for beginners

XDA Kernel and ROM flashing beginners guide.
If you are reading this, you’ve found your way to the famous XDA Forums. The place where developers and users contribute to the spirit of open source Android development.
If you already have TWRP setup and running and just look for the next ROM to flash, this guide isn’t for you. If you wonder what this TWRP thingy is or what exactly the three letters, R O M mean, that float around these forums all the time, then read on.
This paragraph is about the basic geek terminology, used by developers. ROM stands for read only memory, which basically is the system partition of your device, which can only be read, not written. In everyday usage scenarios, where you browse the web, download some apps, or chat und Telegram, you will never get in the situation, where you have to write on your /system partition. If you plan to get your hands on one of those amazing custom ROMs, that add battery life, performance and beauty of use to your OS experience, the ROM is the smartest way of accomplishing this goal.
What a custom recovery is used for:
This is where the recovery comes into play. The recovery partition is pre installed by the manufacturer of your device. It is used for OEM software updates, wiping your cache and dalvic or performing a factory reset. Enough functionality for the average Joe, but this is XDA developers. Things get interesting, once you unlock the full potential of your device. To do so, you’ll need a custom recovery. Team Win Recovery Project (TWRP) is most common these days. It is fully optimized for touch screen input and offers various features, that even come in handy, if you don’t want to modify your phones software. Nandroids for example.
This is where things start to become really interesting. There are various recognized XDA Developers like Francisco Franco or Flar2 who focus their efforts on bringing custom Kernels to their supported devices. What is a kernel? Do I even need it and why should I bother changing it?
To say this clearly, the kernel is the heart of your software. You might use your phone with a broken Bluetooth driver, without caring to much, without a kernel installed your device won’t be able to boot. So what does the kernel do, if it is so essential for a proper working phone? We can describe it as the bridge between hardware and software. That latest processor and the wickedly fast RAM won’t do anything without something telling it how to unleash it ‘s potential.
That’s where the kernel comes into play. You can imagine the kernel as a moderator between the hardware and the software of your system. An example: You touch the screen to launch your favorite game on your Droid. This game is really challenging your hardware, so the processor has to run on a high clock frequency, otherwise the game would take ages to load. The kernel detects your input and ramps up the frequency by it’s in input boost driver. This is often a pre configured value, that is used as soon as some (touch) input is detected, that’s why it is often called touchboost. OEMs choose a middle frequency offering a good balance between power consumption and performance.
For our gaming scenario this isn’t enough, we need the full potential of the CPU and the GPU should get busy rendering all those pixels as soon as possible. This task is accomplished by the kernel. It is balancing the system frequency based on the load of the system, but that’s just an easy to explain example of what a kernel does. The kernel is doing a lot more things on your device. How should the phone know, how much RAM it can give to that messaging application you open every each five minutes? Simple answer, it doesn’t the hardware of your phone is just silicon ready to do your work. You can compare it to a young guy doing an internship at a company. The guy has some potential, but he gets lost in a moment, if there is nobody showing him what to do. This is where the kernel comes into play again. It calculates which task requires which amount of memory and decides, which task should be kicked out of your recent access and memory and, which is there to stay. The messaging application I just mentioned a few lines back for example should remain in memory. You use it all the time, so it doesn’t make any sense to generate some unnecessary CPU load, which eats up your battery in the long run.
As you can see the kernel is more than a boring piece of code. It basically drives your phone, so you really want a stable kernel.
Which different kernel development approaches exist?
There are various recognized developers who focus on UX features. This means they take the official stock kernel (be it a OEM or let’s say the one made by Lineage) and they add their features on top. For example a fading notification LED or a backlight dimmer, that allows to lower the minimum screen brightness further than the stock kernel allows.
These features focus on adding userspace features on top, which don’t touch the core functionality of the kernel, like CPU scaling or RAM management. These kernels are chosen by users who want additional kernel functionality without leaving the stability of the stock ROM in favor of a custom ROM.
On the other hand their are developers and users who want bleeding edge functionality, which brings new stuff to the table, but is to new and not deemed stable enough to be used in the mainline OEM kernel. A good example for such a feature is f2fs support. F2fs is a file system developed by Samsung. It’s main focus is to suite flash storage (like the SD cards in our smartphones), in terms of write speeds it is significantly faster, than the established and rock stable standard ext4. But it comes with certain downsides for example a ROM won’t boot with a data partition formatted to f2fs if the kernel doesn’t have the required f2fs commits. A year back their also were some major issues with root, which made a lot of users switch back to the stable ext4. However if you want to squeeze the last bit of performance out of your phone, the kernel is the way to go.
Kernel tweaking: A custom kernel allows you to modify certain parameters, which aren’t accessible for the using an official kernel. Some developers ship with their own app, which is optimized to tweak their own kernel. This ensures maximum compatibility, one of the reasons why those kernels are so successful across all XDA sub forums. You don’t have to use a kernel managing app to modify your kernel configuration, you could also use an init.d script, but this requires further knowledge. No matter how advanced your knowledge is, it doesn’t get any easier than using an application to set up the configuration of your choice.
Kernel tweaking fills another guide and their is already a really good one, that you should check it out. Further links will be put at the end of this guide.
To root or not to root?
Another controversial topic is rooting. While a lot of OEMs try to prevent you from doing so by locking the bootloader, a lot of enthusiast swear on the power root access unleashes. Often android root is compared to administrator privileges under Windows. This is an illustrative explanation, but isn’t accurate. Root goes far beyond what Windows Admin rights allow. The main difference that jumps right into your eye: Microsoft allows Administrator access out of the box. Root is blocked by all OEMs, you have to enable it manually (by flashing a root solution of your choice. More about popular root solutions and their main advantages and disadvantages down below.
So what does root do? It gives you full control over your device. One of the main advantages is to gain write access to your system partition, which normally is read only. The power of root is defined by the knowledge of the user, the more you know, the more you can make out of it. For beginnners root apps like Titanium Backup, Adaway, Better Battery Stats or SD Maid are interesting. They utilize the potential of root for you without having to dig to deep into the topic. However root isn’t enabled by default for a reason. Most big custom ROMs, don’t ship with root out of the box anymore these days. Back in the day root basically just gave you more control, without any major disadvantages. This however changed with the introduction of Safety net by Google.
The company developing the OS we all love, is trying to make Android safer and they are pushing this approach forward these days. If you just flash SuperSu, Safetynet gets triggered which results in being unable to use apps which use Safetynet to verify the integrity of your system. Mainly banking apps, but also Snapchat for example or that stupid game, that generated all the hype in summer 2016. You got curious about root or came to this forum, to figure out how to root your phone? Then the next paragraph deserves your attention.
Most XDA users used SuperSU developed by XDA legend Chainfire during the last years. A while ago Magisk by XDA Recognized Developer and contributor Topjonwu. It became very popular, when Safetynet started to break certain Apps. It allows to hide root from safetynet, but it includes much more. One of the key features is mounting modules systemlessly to your boot partition, that way your /system stays untouched and removing a certain module, doesn’t require more than disabling it and rebooting. What about the disadvantages of magisk? It isn’t as compatible as SuperSU, since that root solution was the standard for years. All the developer arranged their work around SuperSU, but most famous root apps, have already adopted to Magisk, so you won’t run into issues unless you are using really outdated apps, which is never a good idea.
Which one to choose is a decision you can make. Both work flawless and it really comes down to personal preference.
Since nobody is willing to read through 50 pages, I’ll just thank you for your attention. This Guide is on going WIP, so if there is anything you’d like to see being added, feel free to let me know, but make sure to tag me, otherwise I might miss your message in the storm of ongoing notifications. Have a great day and keep flashing.

Categories

Resources