Changing LMK minfree values has no effect - Android Q&A, Help & Troubleshooting

I have a dual boot Android 5.1/Win 10 tablet (the Onda oBook10) that I recently managed to acquire root on (for any owners of this device that would like to know how, I'll be posting a guide soon). This thing has 4 gigs of RAM, but starts kicking apps out as soon as 1 GB is occupied. I've tried setting minfree using both Kernel Adiutor and by echoing manually to /sys/module/lowmemorykiller/parameters/minfree, but neither has any effect. I know that this change doesn't persist across reboots on any Android, but in this case, it has no effect even on the current session. What's even stranger, going by the default values that have been set, there shouldn't be any issues at all - it's actually less aggressive than most other devices I've seen. The values are:
Code:
13107,16384,19660,22937,26214,32768
According to Kernel Adiutor, that translates to (in MB):
Code:
51,64,76,89,102,128
Yet, running apps shows 2.8 to 3.1 GB free constantly, even though apps are reloading.
Does anyone know what might be causing this? It's an x86 device, in case that's relevant. I have access to the boot image (in case it's some kind of kernel flag), and can unpack to ramdisk and zImage, but I have no experience with kernels, and have no idea where to even begin looking; if someone could point me in the right direction, that would be awesome.
Thanks,
SirVer

Related

[Q] keymapping/apktool/pngout/minfree/other questions

Over the last few months I have gathered together some various questions I have been unable to answer for myself or by searching. I spend 99% of my time at SDX-Developers but most of the legacy developers have moved on, and so there are few left for people to post questions to. Anyways, here we go.
I will modify this post accordingly as answers come in or I have any more questions.
1) Is there anything else in /system that has to do with keymappings besides /system/usr? There is a bug on a certain 2.2 build for my phone that causes fn+period=.com instead of fn+period=comma, like it should. Replacing the kl and bin files with ones from another build that has correct keymappings does not fix this issue, so this leaves me wondering if there is anything else in /system that relates to keymappings.
2) system apks compiled with apktool will not allow a ROM that formats data to boot. I have heard something about apktool using 'full compression' and am curious as to why this is so?
3) In some decompiled system apks, there are a certain number of folders, obviously. But when recompiled, some of these folders 'disappear' from where they were when the apk was decompiled. Where did they go?
4) I have some custom wallpapers in a ROM, but the filesize for each is much larger then the stock wallpapers. I found pngout to decrease the size, but all it does is increase the filesize. Is there a combination of settings for pngout that will work best?
5) There is a bug on a certain 2.2 build for my phone; basically, Contacts.apk has horrible performance. Scrolling is laggy, Home ---> Contacts window transitions are laggy... everything that deals with Contacts.apk is laggy. Memory leak? Bad code? I did a logcat and no errors showed up, but I do not know how to look for a memory leak.
6) There are six numbers in /sys/module/lowmemorykiller/parameters/minfree. What programs do each of these individually relate to? I know that these numbers are in pages and when free memory drops below that point, the program related to that number is killed, I just have no idea as to what program each number specifically relates to.
7) I want to make a few preloaded appliations in my ROM uninstallable by the user, so they would not have to go through the trouble of manually removing it themselves, which can be a bit over-the-head for new root users. Anyway, I did this by creating /data/app in the root directory of my ROM and adding copy_dir PACKAGE:data DATA: to the update-script. The apps I put there (in /data/app) were in fact uninstallable in my testing, but reappeared after a reboot... so I am stuck. I am thinking I may have to set permissions as well in the update-script but am not quite sure.
8) What does everything in /proc/sys/vm do (individually)? What would the end user notice if these files were edited?
9) What is VR I/O schedualing, CIFS, LZ compression, BFS? And how would I go about removing certain available CPU frequencies (some kernels for my phone have 133MHz removed for faster wakeup), undervolting, and increase the USB draw? I have successfully compiled and booted my first kernel, but am unsure of how to apply different modification outside of what is available in the menuconfig.
10) Zipaligning apks is supposed to reduce their RAM usage. In testing, I zipaligned Browser.apk and it used no less RAM than when unzipaligned. What gives?
11) 0-compressing icons or apks? How to do this? I know that Photoshop lets you chooose the compression level but that reduces quality, so this must be different.
I hate to bump threads but I would really like a reply sometime. Otherwise I will simply post my questions in a different forum.

[HOW-TO] ASUS system boost - root required - v0.4 UPDATE!

Hello, last two days I thought about I/O performance of great Asus Transformer Prime.
It is actually PDA so it means that device is not in the real power off state so much.
It can be used for ANY kernel and ANY rom!
Works with ANY ASUS TRANSFORMER MODEL!!!!!!!!!!!!!!!!!!!!!
Sooo let's tweak it for better performance!
We will reduce write times to SSD drive, no more hangups, ARNs etc.
I am using it on my own prime for one day and I have no delays at all.
For this test I need huge amount of volunteers to tune numbers in the script.
This change is only for actual session
If you want to save it after reboot use SManager for script autorun.
Here is script, run like. su
So download script on sdcard to root of sdcard, unzip and run:
Code:
su
cd /sdcard/
sh tune.sh
It is safe and it will not harm your system or break OTA update
The worst scenario is softresetting your device after
hang up (but it should be ok).
PLEASE I NEED RESPONSES FROM YOU!!!!
+ Faster system
+ less hangups (none on my Prime)
+ You don't have to flash new kernel
+ It is for actual session only, after reboot you have to run script again
+ Better battery life!
+ Longer life for internal SSD drive!
- If you reset your prime you can loose some of your datas
- If your system hangs you can loose some of your datas
- It is for actual session only, after reboot you have to run script again
EDIT: :::::::::::::::::: Ok version 0.2 is out. ::::::::::::::::::
With previous values I had problem with gmail.
With little tweaking I have no issues now and there is ALMOST no drop of permormance compared to version 0.1.
Changelog:
Code:
changed value for dirty_ratio from 90 to 70
changed value for dirty_background_ratio from 70 to 50
If you haven't gmail issues you don't have to install version 0.2
Nvm it seems that gmail issue had nothing to do with these changes
EDIT: 25.6.2012
Tune script is included here:
http://forum.xda-developers.com/showpost.php?p=27862975&postcount=149
:::::::::::::::::: EDIT 2: 26.6.2012 New version out v0.3 ::::::::::::::::::
+ tweak for battery (audio is suspended earlier when it is not used
+ some tweaks to cfs scheduler should be more responsive
Let me know your experiences with this version!!
::::::::::::::::::8.7. 2012 NEW VERSION OUT! v0.4 ::::::::::::::::::
Some of ideas taken from here ! http://forum.xda-developers.com/showthread.php?t=1205259
Optimalized for Prime
+ Added three types of scripts
+ 1st script = tune.v0.4.sh.zip = safe optimalization = only safe tweaks which will speed up IO operations a little bit
+ 2nd script = tune.v0.4.drive.sh.zip = drive optimalization = same like 1st script + optimalizations for internal ssd drive
+ 3rd script = tune.v0.4.max.sh.zip = heavy performance mode = 1st + 2nd script + "old" checked by users tweaks with background ratio, swapiness etc. + io mount tweaks + kernel tweaks + internet tweaks = max. perform. (for best turn sio TOO!!)
+ Longer life for internal SSD drive! Because noatime,noadatetime = less writes
- Somebody reported battery drain, so these relative functions were removed
Please for correct testing remove ATP application and run this script with SManager or manually (if you won't uninstall ATP it will change values...) If you don't want to remove ATP you have to wait for new developer of ATP when he will add these version of scripts to ATP !!!!!!!!!
If you have some problems after this script PLEASE try to remove ATP first, it seems that on some devices it has problems with running this script.
ok i m running it right now.
what are the default values?
Sent from my Transformer Prime TF201 using Tapatalk 2
Sorry I dont remember. Reboot your prime and you will see defaults.
batoo said:
Hello, last two days I thought about I/O performance of great Asus Transformer Prime.
It is actually PDA so it means that device is not in the real power off state so much.
It can be used for ANY kernel and ANY rom!
Sooo let's tweak it for better performance!
We will reduce write times to SSD drive, no more hangups, ARNs etc.
I am using it on my own prime for one day and I have no delays at all.
For this test I need huge amount of volunteers to tune numbers in the script.
This change is only for actual session
If you want to save it after reboot use SManager for script autorun.
Here is script, run like. su
So download script on sdcard to root of sdcard, unzip and run:
Code:
su
cd /sdcard/
sh ratio.sh
It is safe and it will not harm your system or break OTA update
The worst scenario is softresetting your device after
hang up (but it should be ok).
PLEASE I NEED RESPONSES FROM YOU!!!!
+ Faster system
+ less hangups (none on my Prime)
+ You don't have to flash new kernel
+ It is for actual session only, after reboot you have to run script again
+ Better battery life!
- If you reset your prime you can loose some of your datas
- If your system hangs you can loose some of your datas
- It is for actual session only, after reboot you have to run script again
Click to expand...
Click to collapse
Tempie007 said:
ok i m running it right now.
what are the default values?
Sent from my Transformer Prime TF201 using Tapatalk 2
Click to expand...
Click to collapse
Hi, it will be interesting to see how this works. swappiness=0 will cause less swapping to disk (it will only happen when it needs to). Default for swappiness=60 in our Android and mainline Linux kernels. These settings here are aggressive in trying to reduce swap disk i/o, so it will be great to see if it succeeds and whether or not OOM errors occur when RAM is running short when using RAM hungry applications or doing extreme multi-tasking.
I have also been testing something at the vm level in the kernel that I found in the HTC OneX source. It is something the HTC engineers added that would actually set the default to swappiness=100, the complete other direction from what you are doing here. This theory is to clear out the stale RAM and open up the RAM for something more useful. While this may be counter-intuitive to I/O performance since swapping equates to more disk i/o, the code change also implements some changes to the block, fs, and mm portions of the kernel. Essentially, from what I can tell, it flags and handles disk operations (aka "bios") differently if they are involved in swap operations (going to or coming from swap). A "bio" is essentially a manifest of an ongoing I/O block device operation, what sectors and memory locations it contains etc. Once the RAM is freed up, I have also been increasing the Dalvik vm settings in the build.prop to allow for more RAM consumption. So far, this combination (at least for me so far) has really given me good UI performance and I haven't had to kill the browser often like I did before. I have yet to play with vm.dirty_ratio and vm.dirty_background_ratio, but I am wanting to do this as well to see what combination can work the best for us.
Anyhow, thought I would share. I think you are looking at some important things here with the tuning of virtual memory to see how they can affect disk performance and more importantly application fluidity.
Cheers
Hi
I'm using it for about two hours and I had one reboot when I opened File explorer (before this never happend to me on .28) Im using also IO Sio from Your other topic (it seems to be alright...everything seems to work smoother). On tune.sh I have better write to sd speed in antutu. Now I have 8 mb...before 2 mb. Thx for that.
_motley said:
Hi, it will be interesting to see how this works. swappiness=0 will cause less swapping to disk (it will only happen when it needs to). Default for swappiness=60 in our Android and mainline Linux kernels. These settings here are aggressive in trying to reduce swap disk i/o, so it will be great to see if it succeeds and whether or not OOM errors occur when RAM is running short when using RAM hungry applications or doing extreme multi-tasking.
I have also been testing something at the vm level in the kernel that I found in the HTC OneX source. It is something the HTC engineers added that would actually set the default to swappiness=100, the complete other direction from what you are doing here. This theory is to clear out the stale RAM and open up the RAM for something more useful. While this may be counter-intuitive to I/O performance since swapping equates to more disk i/o, the code change also implements some changes to the block, fs, and mm portions of the kernel. Essentially, from what I can tell, it flags and handles disk operations (aka "bios") differently if they are involved in swap operations (going to or coming from swap). A "bio" is essentially a manifest of an ongoing I/O block device operation, what sectors and memory locations it contains etc. Once the RAM is freed up, I have also been increasing the Dalvik vm settings in the build.prop to allow for more RAM consumption. So far, this combination (at least for me so far) has really given me good UI performance and I haven't had to kill the browser often like I did before. I have yet to play with vm.dirty_ratio and vm.dirty_background_ratio, but I am wanting to do this as well to see what combination can work the best for us.
Anyhow, thought I would share. I think you are looking at some important things here with the tuning of virtual memory to see how they can affect disk performance and more importantly application fluidity.
Cheers
Click to expand...
Click to collapse
Ice increased my dalvik vm also through build.prop. Like the heapsize, growth limit, startsize etc...how much can you increase those vm to where its still safe? On stock kernel.
What values are you running at? IM also using that dalvik jit mod.
demandarin said:
Ice increased my dalvik vm also through build.prop. Like the heapsize, growth limit, startsize etc...how much can you increase those vm to where its still safe? On stock kernel.
What values are you running at? IM also using that dalvik jit mod.
Click to expand...
Click to collapse
Not sure how much room there is since I have only tweaked on the prime recently. I am running 8m, 64m, and 256m now. One of my other tabs used higher dalvik settings like this on the HC stock ROM (GT 8.9 or Iconia A500 can't remember). There are so many parameters to take into account for any given test etc., as they say "you never step into the same river twice" LOL.
I have posted my latest alpha kernel with the aforementioned changes. It will be interesting to see if folks like it or not. It is working great for me thus far.
Guys pls no offtopic and chat.
Ill try this new tweak once I get off work.
my first problem. cmclient has stopped.
first time I have seen this in weeks and it comes after 45 min of this tweak.
However it may be related to the fact that I have not used the default browser in weeks.
whycali said:
my first problem. cmclient has stopped.
first time I have seen this in weeks and it comes after 45 min of this tweak.
However it may be related to the fact that I have not used the default browser in weeks.
Click to expand...
Click to collapse
a reboot should clear it. did you enter in commands exactly like listed in op? it tells me file not found. when i unzipped the file, it gives me a tune.sh txt file or whatever. in the commands, is it supposed to be "tune.sh" instead of "ratio.sh"? i see i can just click the file and execute the file like that, bypassing the need to enter in commands. same like with overclock files. i could just execute them manually instead of using an overclock app.
have you noticed any other issues? what benefits have you noticed so far? you have me hesistant to execute the file now, since those commands give me error.
demandarin said:
a reboot should clear it. did you enter in commands exactly like listed in op? it tells me file not found. when i unzipped the file, it gives me a tune.sh txt file or whatever. in the commands, is it supposed to be "tune.sh" instead of "ratio.sh"? i see i can just click the file and execute the file like that, bypassing the need to enter in commands. same like with overclock files. i could just execute them manually instead of using an overclock app.
have you noticed any other issues? what benefits have you noticed so far? you have me hesistant to execute the file now, since those commands give me error.
Click to expand...
Click to collapse
PM'd you. it was just an alert. no need for reboot. hard to see or report anything yet.
whycali said:
PM'd you. it was just an alert. no need for reboot. hard to see or report anything yet.
Click to expand...
Click to collapse
Did you guys get this to work, I keep getting the file not found message
whycali said:
PM'd you. it was just an alert. no need for reboot. hard to see or report anything yet.
Click to expand...
Click to collapse
MRCANNADY said:
Did you guys get this to work, I keep getting the file not found message
Click to expand...
Click to collapse
If you want to try the OP's settings, you can easily change these and other virtual memory related settings graphically using the free app System Tuner under "SysCtl". This may be easier for those that don't like messing around with scripts. You can also optionally have the settings to be activated on boot if you test them thoroughly and want them to persist.
I ran
sh tune.sh
as the third command since that was the file name. nothing to report beyond the first one I posted here. I have not sodded yet and have folded my prime closed for a while since implementation.
im getting great results so far. no lag during app store apps updating and installing. plus the apps download and install so fast now. I think this mod along with SIO scheduler, build.prop tweaks, and overclock makes the prime scream speed. no negative drawbacks running this so far. i havent tested playing games yet.
whycali is correct. the filename in the command needs to be changed to what he posted, tune.sh
I am so sorry I changed typo in firat post to tune.sh, my test version had diff. Name.
i am going to try this based on the awesome feedback i have read. i will be testing alongside Chainfire driver and CFQ using ATP Tweak. i will report back. i do have some dalvik tweaks that may yield extreme lag free by forcing zygote to recognize 4 cores along with JIT.
Sent from my Transformer Prime TF201 using xda premium
I don't think that tweaking over heap size and experimenting with JIT will help so much.
This is the cleariest way how to speed up system.
swapiness is useful mainly with swap location but prime doesn't use swap at all.
It's true that these values are agressively focused on smooth UI but it's the point.
I am working on another tweaks.
These things can be of course written to startup scripts to the system, but I don't want to unlock my Prime and when I don't have CWM I won't risk some mistyping resulting to bootloop.
This is the most effective way how to safely reach good performance.
Don't blame Asus that they didn't setup these values, they need to keep some "safe" standards.
Anyway I will try to explore more effective ways.
Guys let me knows your experiences!!
I already tested some heavy applications like Nova 3 and it's working without problems...
Results are in
With out Tune.sh script and SIO at balanced setting:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Same but at Performance Setting:
Now with Tune.sh and SIO enabled at balanced setting:
Same with Performance Setting:
You be the judge. Running .28 ASUS Stock and LOCKED bootloader
Sent from my Transformer Prime TF201 Biotchh

[Q] Want to modify a device without access to bootloader or recovery

Hi all
I'm not sure what this would be called, so I'm not sure what terms to use in search that would return something specific to what I want to do...
I have a tablet that, aside from a few tiny references here and there, may as well not even exist at all. It's made by "Leader International" and is called "Impression 9.7" (model is i10). It runs version 2.3.1 and is a little quirky. I suspect the quirks are software compatibility issues and not driver/kernel related. Things like images scaling oddly at certain points (predictably and reproducibly) and apps force closing because they can't find certain system variables (like android.os.Build.SERIAL). Same apps run fine on my Gingerbread phone.
I have no means by which to swap out kernels, so I know I have to stick with Android 2.3.1 through and through. However, since I've rooted it, can I "side load" an entire OS (except kernel) onto it from another device? I'm hoping to "enable" certain features (nothing specific, just wanting to see what becomes available) as well as get rid of bugs. I think that as long as I'm keeping my kernel intact, drivers and hardware shouldn't be an issue. Am I right?
Any thoughts are appreciated.

Adreno 200 GPU Tweakable!

From Xperia Play forum, I've noticed following:
http://forum.xda-developers.com/showthread.php?t=2167228
If you add adreno_config.txt to /data/local/tmp/ with specific options, they will work.
If you want a real example to see that tweaking works, just put into txt following: "FPSCap=20" (or 10). Reboot, and you'll notice that FPS will be lower, which proves that this way of tweaking is working for our Xperias, too.
This should work on all GB/ICS/JB ROMs as far as I think.
All possible variables and values should be available in that thread. NOTE: Some tweaks may cause issues in general, so don't do it as it may cause hangs or bootloops (or soft brick).
Another config: http://forum.xda-developers.com/showpost.php?p=38478568&postcount=187
It may be useful for performance, or battery saving, but it's still unknown how it works. I've just noticed this feature today, I haven't tested everything.
you should share this in http://forum.xda-developers.com/showthread.php?t=1881984 , more people will look at it

Which system parameters (kernel/sys/anything) rule automatic suspending of cores?

Hello.
I think my problem is a general Android question, although - in my particular case - it is dedicated to Samsung Galaxy Note 3 (SM-N9005).
I would like to learn, which system parameters rule automatic suspending of single cores in runtime. This question is NOT deep sleep - related, I have no problems with that. My problem consists in cores not going offline, even if nothing is happening in the system (I wanted to post a link to a screenshot but I'm not allowed to). Imagine an Idle system - my phone has 4 cores, 3 of them should go offline. And that's what happens, when the system is in a "good" state. But after some time something is changed (I don't know what, yet) and even if completly nothing is running, all the cores stay online and they operate at their lowest speed (which is 300MHz in my case). I know, that it improves responsivenes, but, at the same time, increases power consumption. And it's not how it should work.
So, I'm looking for what triggers such behavior. Not for the initial cause (it must be one of the applications), but for the "intermediate" result. I believe that there are kernel parameters, probably available via the /sys/ subsystem, which may be checked and adjusted here.But... which of them? What to look for?
My phone is rooted, I'm quite fluent in bash programming and I'm not affraid of it. I also know Linux itself (I'm not a hacker, but I have few machines which I administrate). But I don't know Android-specciffic issues. Can anyone help me here?
Thanks in advance

Categories

Resources