Amazon tablet optimization. Memory load pressure cured. - Fire General

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.

Related

[Q] MyTouch 3G (Saphire) 32B with Ginger Yoshi 1.2 Questions

I'm Running Ginger Yoshi 1.2 and I'm still seeing a lot of lag with the dialer/phone (Takes too long to load and most of the time doesn't load the custom ring tone for that contact), also the following games lag and they where not lagging on the stock ROM (1.6 from T-Mobile)
Blow Up (Lite)
Bubble Buster Smileys
Regarding Performance Settings, I have the following questions:
What would be the best setting for CompCahce? I've read that it's recommended for this type of phone, would 26% be OK?
I have JIT Disabled since I've read it still very much unstable and might cause other things to fail, like the screen off/on animations, is this correct?
I have Disabled Surface Dithering, Is it worth enabling it?
I have enabled Allow Purging of assets, I've read that this really helps with the RAM limitation of this phone, is this correct?
I don't have Home or Messaging locked, are they worth locking?
Lastly, I have VM Heap size to 32M, is this the best for my Phone?
I've searched and haven't found anything clear enough for me regarding these questions, if they are answered somewhere just give me the link to the post.
Thank you all for your help and a Huge Thanks for Team Yoshi for there excellent ROM.
I flashed Ginger Yoshi 1.2 recently. I have a question for you. I am unable to get Wifi Tethering working with the same phone. Is it working for you?
I don't use Wifi Tethering
Sorry I don't use it since I don't have a Data Plan...
Quasi-Detailed Reply to YoshiMod Settings
ElConedeTJ said:
I'm Running Ginger Yoshi 1.2 and I'm still seeing a lot of lag with the dialer/phone (Takes too long to load and most of the time doesn't load the custom ring tone for that contact), also the following games lag and they where not lagging on the stock ROM (1.6 from T-Mobile)
Blow Up (Lite)
Bubble Buster Smileys
Regarding Performance Settings, I have the following questions:
What would be the best setting for CompCahce? I've read that it's recommended for this type of phone, would 26% be OK?
I have JIT Disabled since I've read it still very much unstable and might cause other things to fail, like the screen off/on animations, is this correct?
I have Disabled Surface Dithering, Is it worth enabling it?
I have enabled Allow Purging of assets, I've read that this really helps with the RAM limitation of this phone, is this correct?
I don't have Home or Messaging locked, are they worth locking?
Lastly, I have VM Heap size to 32M, is this the best for my Phone?
I've searched and haven't found anything clear enough for me regarding these questions, if they are answered somewhere just give me the link to the post.
Thank you all for your help and a Huge Thanks for Team Yoshi for there excellent ROM.
Click to expand...
Click to collapse
___________________________________________________________________
IMHO, Yoshi works for me, if it is set up correctly. Other than following the instructions in the "quasi-users guide" which really do help (http://forum.xda-developers.com/showthread.php?t=938848), some of these settings have helped for me - I have both 32A and 32B but I use the MT3G 1.2 w/3.5mm jack:
(presuming you have a 4GB SDmicro card [it's good, but higher is better if phone can handle it] and you can boot to a recovery that allows you to partition your SD card - Titanium Backup works if you want to save your apps, but if you want a fresh install, well, here it is):
1. Wipe, re-wipe and if you still are unsure... rewipe some more. Did I mention to wipe EVERYTHING (including battery stats, dalvik-cache, sd-ext... sorry for over-emphasizing this). Then use Ohsaka-Superwipe_v2 and reboot to recovery.
2. Partition SD card. I have a 4GB, so for me 512 MB a2sd space and something decent for secondary space is fine (the rest of my SD is 3.19 GB, so plenty of room).
3. Flash Ginger Yoshi 1.2.zip (works for 32A & 32B... I flashed the version with the 32A radio and IMHO I didn't like it), following whatever settings you choose (installed to partition, Zeam Launcher and 60 MB swap is what I did) then flash auto-boot-2.6.35.12-farmatito -32b-and-a.zip then reboot.
Preset settings right out of boot for my device are the following (I have tried to change the settings and reboot to weird instabilities - app lag, call-to-image lag, no ringer/vibrate, fc issues, etc., but this works for me):
CPU Governor: ONDEMAND
Compcache: DISABLED
JIT: Checked
Surface Dithering: Checked
Purging of Assets: Checked
Lock home/messaging: Unchecked
VM Heap: 48M
On average, I have 33 MB free out of 199 MB and usually the JuiceDefender stuff works to give me a boost most of the time. The phone works pretty zippy for me and reduced the call-to-image lag some folks get when receiving/making a call. Of course results may vary for you, but again, IMHO, it works for me.
Apologies if I am talking to u like if u r a noob or if I am editorializing too much. Force of habit I gotta drink the hell out of. Hope all this helps and take care.
I'll try it
Just a few questions about your recommendations:
1.- I understand that I should wipe
2.- I have a Class 4 8GB SD Card, does the class 4 good enough or should I first get a class 6 or even a class 10?
3.- I will also try these settings
Also, don't worry about talking to me like if I'm a noob, since I am a noob regarding custom ROM, Swap, Paritioning SD, CompCache, etc, etc...
For that type of device, IMO the Class IV is fine, but the Class VI or 10 offer better r/w protections for swap and functionality than a decent Class IV. If you have heavy usage, I would suggest getting something more than Class IV.
Hope this helps and post if the settings have helped you out. Later
Where's my CompCache?
I flashed auto-boot-2.6.35.12-farmatito -32b-and-a.zip and now CompCache is not showing up when I use the "Free" command:
total used free shared buffers
Mem: 112616 107964 4652 0 1492
Swap: 0 0 0
Total: 112616 107964 4652
Before flashing it, it showed numbers in the Swap now it's all 0, I've already tried disabling and re-enabling at didn't work...
Edit: I did a restore of my nandroid backup before farmatito and here is what free shows:
total used free shared buffers
Mem: 112608 100276 12332 0 332
Swap: 29272 14044 15228
Total: 141880 114320 27560
It would appear as if you might not have set the "install 60MB swap on partition" when you did the initial install of GingerYoshi. On my device, it looks like this:
total used free shared buffers
Mem: 203944 198784 5160 0 148
Swap: 60668 37708 22960
Total: 264612 236492 28120
If that isn't the case (not installing the 60MB Swap file), it is a separate issue from the Comp Cache, I believe. Try installing GingerYoshi with the install to partition, ZEAM (or LauncherPro... whichever one you choose), and THEN say YES to the "60MB on partition". You should be fine by then, but if not, let me know.
Thanks and hope it helps.
I hevn't started from scratch yet...
I'm going to get a Class 6 first before creating ext3/4 on the SD Card... In any case I'm a little reluctant on using the 60MB swap since I read too may times that it could affect the life time of the SD Card and that it's not much of an improvement... But as soon as I get a class 6 I'll try and do a clean install with an Ext3/4 with the 60M swap and see how it works.
Right now I have it like this:
Installed with: No Ext, No Swap (because of no Ext) and Zeam Launcher
In Performance I have:
CPU = Ondemand 128-576MHz (altoght I'm using SetCPU for this)
CompCache = 26%
JIT = off (since it messes up the Screen On/Off Animations among other things)
Surface Dithering = Off (I see no reason to have it on)
Allow Purging of assets = On (I see no reason to not have this on)
Lock Home and Messaging = Off (Again No reason to have this on)
VM Heap Size = 32M (seems more stable than 48M)
Edit: In any case, why does installing farmatito make me loose the CompCahche?
ElConedeTJ said:
I'm going to get a Class 6 first before creating ext3/4 on the SD Card... In any case I'm a little reluctant on using the 60MB swap since I read too may times that it could affect the life time of the SD Card and that it's not much of an improvement... But as soon as I get a class 6 I'll try and do a clean install with an Ext3/4 with the 60M swap and see how it works.
Right now I have it like this:
Installed with: No Ext, No Swap (because of no Ext) and Zeam Launcher
In Performance I have:
CPU = Ondemand 128-576MHz (altoght I'm using SetCPU for this)
CompCache = 26%
JIT = off (since it messes up the Screen On/Off Animations among other things)
Surface Dithering = Off (I see no reason to have it on)
Allow Purging of assets = On (I see no reason to not have this on)
Lock Home and Messaging = Off (Again No reason to have this on)
VM Heap Size = 32M (seems more stable than 48M)
Edit: In any case, why does installing farmatito make me loose the CompCahche?
Click to expand...
Click to collapse
In advance, I apologize. It was my belief that I said in advance that I am basing my findings on my 32A device that I physically use.
I forgot to give you the specs that I am running on my 32B device:
SAPPHIRE PVT32B SHIP S-ON G
HBOOT-1.33.0013d (SAPP30000)
CPLD-10
RADIO-2.22.28.25
Oct 21 2009,22:33:27
(Settings below based on a 2GB SDmicro... a size I would not recommend):
EXT, 60MB SWAP and ZEAM
CPU = ONDEMAND with 245 - 528MHz
CompCache = Disabled
JIT = ON
Surface Dithering = ON
Allow Purging of assets = ON
Lock Home and Messaging = Off
VM Heap Size = 48M
I ran the "free" command and I also see the 0 swap size. Hmmmmm... very interesting. I will do some research and look at the bug tracking to see if it is a GingerYoshi thing or if it is something in the way I am installing it on my device as well. As an added piece of advice, the farmatito zip is more beneficial for 32A devices like the 1.2 3.5mm jack device, so if I said to install to your device, you can generally disregard it and see if it gets you better results on the swap.
As an FYI, in terms of screen transitioning, have you checked out the "Spare Parts" included with GingerYoshi? Some of the settings may be for aesthetics or performance in tandem with your space, but perhaps it can free up more memory for the ring-to-display lag you are having. As for apps (Angry Bords, for example), the only one that works with some acceptable lag is the RIO version... blasted ARM processors.
Sorry for the confusion on my part and hope this helps.
I would love to have voice to text anyone know how I can add this to my phone or can yoshi add this to the rom?
Thanks,
Bukethead
Where's my CompCache???
Something changed and now when I run the Free command I get the following:
total used free shared buffers
Mem: 112608 106440 6168 0 2784
-/+ buffers: 103656 8952
Swap: 0 0 0
It has a different layout than before, but mainly under Swap I didn't have only 0:
total used free shared buffers
Mem: 112608 100276 12332 0 332
Swap: 29272 14044 15228
Total: 141880 114320 27560
Can anyone point me in the direction of how to troubleshoot what happened without having to wipe and flash the ROM again?
Thanks.
Edit: I had a backup of my ROM and did have the Swap numbers, So I did a backup of everything via Titanium and restored the Nadroid backup, then I restored apps, then the app data then the system data rebooting step by step and the swap still appeared, so I still have no Idea what broke the compcache but it's back now... If anyone has any idea on what could have changed, please let me know...
total used free shared buffers
Mem: 112608 105768 6840 0 32
Swap: 38280 19288 18992
Total: 150888 125056 25832
I am impressed with this rom I've been running yoshi for a few months now and I have no complaints. good job team yoshi!

Memory optimisation tweaks? How to get more free RAM?

Any useful tweaks or settings which I could use? There is many appn on the market and they allow to tweak internal memory management but I have no idea what settings to use.
No matter which I try, my phone always seem to stick to ~100MB RAM Free. Why so much? I'd prefer ~50MB RAM Free and more apps running without closing.
schriss said:
Any useful tweaks or settings which I could use? There is many appn on the market and they allow to tweak internal memory management but I have no idea what settings to use.
No matter which I try, my phone always seem to stick to ~100MB RAM Free. Why so much? I'd prefer ~50MB RAM Free and more apps running without closing.
Click to expand...
Click to collapse
you mean you want 100mb ram free but only have 50mb? you can check out a ram cleaner script. the link is in my signature called mods for virtuous unity. just download the zip file, back up your phone and superwipe, then flash your rom then ram cleaning script then reboot and your done
Actually it was the other way around, I always had 100 MB free and my apps have been closed often. I played with one of the tools to tweak internal memory manager and now my free RAM goes down to 60 and apps stay in memory, this is what I wanted. FireFox Nightly takes a lot on its own...
Will play with settings some more before posting them here.
Only app and root needed, no scripts or Rom flashing.
I'm runing CoreDroid port, I love its theme.
My opinion is if what you perceive as a lack of available memory is not degrading the performance of your phone, including the apps which run on the phone, then it's a non-issue as the latest versions of Android have a much better handle on memory management than the older versions.
I agree but in my case system had 100MB RAM free but when I launched another app it would close other app and system would still have 100 MB RAM Free. So imagine me opening media player and listening to mp3 and then I launch Firefox and music stops, yet there is still 100 MB RAM Free.
I have changed settings and it's better now, Free RAM drops down to 60MB so I can have more apps running.
Previously, Firefox would close whenever I switched out of it, annoying.

X8 optimization

Stable settings and addon's to optimize your CyanogenModed X8 for SPEED.
CyanogenMod Settings
- CPU: min 320MHz, max 748MHz
- COMPCACHE RAM: 26%
- JIT: On
- SURFACE DITHERING: On
- 16bit TRANSPARNECY: On
- ASSET PURGING: On
- VM HEAP SIZE: 48m
Download Swapper2 from the market. It's free. Making a partition for it is not necessary. (Tutorial Link)
After downloading Swapper2:
- Launch the app,
- Goto settings and set 'Swap Size' to 256MB,
- Set 'Swappiness' to 10,
- Check the box next to 'Run Swapper at Start',
- Restart your phone.
- After it reboots, go to your TerminalEmulator app, and type free. It should show a line saying you have 300MB+ of RAM, with XXMB's used, and XXXMB's free.
App to SD instructions:
- Move to SD the apps which you use the least.
- Do not move to SD apps you use to customize your ROM with.
- Do not move to SD apps which you use the most.
Use a Cache Cleaner. Plenty of them on the market. I use AppCacheCleaner
Use Supercharger if you play games on your X8. It might help.
READ these facts about RAM, CPU usage, and WHY YOU SHOULDN'T USE TASK KILLERS.
That's it.
If your X8 is still slow, then save some cash, and get a Sony Xperia S... I can't wait to get mine....
Please DO NOT COMMENT. Only add posts with ALTERNATIVE SETTINGS CONFIGURATIONS and ADD-ON's (LIBS etc.), AND EXPLANATIONS for them, if needed. Thanks!

MiniCM9

Ohai ladies and gentlemen , i created this thread to share our performance tweaks of minicm9 , we all use different
I use Nova launcher Prime , Supercharger , Swap 256mb and ES task manager
waiting on yours :d
Why do you use a task manager?
Your phone is supercharged!
Well may not be much but I've finally reached 22 hours with battery life I'm sorry that I can't give the specifics of what i did because I randomly did stuff (supercharge, oc, ram manager, optimizations, tweaking the light sensors) so idk what really gave me almost 1 day battery life with heavy use
New Way : Try Fruit Ninja
I used to play Fruit Ninja (The CHINESE VERSION having pomegranate at the end of the arcade mode) to check every type of performance.
Although i tried Benchmark which does not working properly due to no 3D hardware acceleration.
It shows 130 points for RAM
And goes only to 50 FPS on that spiral test.
But when i checked playing Fruit Ninja ,
Graphic Performance is equal to that of any light GB Rom say STARK Rom etc. without any special tweaks. Even while playing Music.
And when i minimize Fruit Ninja for any thing it does not get off close due to less Ram and on maximizing it do not lags for a while even and go on smoothly.
Also i tried Temple Run and it just running as in GB Rom
And also tried Trial Extreme Winter which is going awesome.
By the way , i am unable to understand that how a tweak can do something, and if they do why they are already not included on the Roms.
I used to format system myself and clear cache and wipe data every time and i disable the services like facebook, widgets, gtalk, gmail etc which starts automatically on any event, using AUTOSTART app , this is enough for me to get good performance.
Here's mine: supercharger, apex launcher, smartassv2 governor with min cpu set to 19 Mhz, max to 600Mz, Only get 12 hours of battery with normal use
Sent from my E15i using XDA
here's mine
ADW Launcher ex latest
KSM - On
Compcache - Off (speeds up a lot! As the os does less work to get data on and off the ram, compression increases ram access time)
Min freq - 19
Max freq - 748
Governor - smartassv2
Undervolt - Off
Full day battery with wifi nearly always connected!
And smooth and fast too...
Apex launcher
600-19 mhz frequency
Smartassv2
Ram manager pro hard multitasking
I got 12 hours max with medium usage.this rom is amazing,but i dont think its usable for daily usage yet.
1day 17 hours
no oc ,smartv2,delete and freeze some app, no undervolt( i found battery drain, dunno why) night sleep using air-plane drop 1%
oc 748.
no supercharger.
apex launcher.
ondemand governor.
1 - 2 days battery life.
nashshafrulrezza said:
oc 748.
no supercharger.
apex launcher.
ondemand governor.
1 - 2 days battery life.
Click to expand...
Click to collapse
My battery life barely stands for half a day....even when mostly idle.. :/
Sent from my XPERIA X8 using xda premium
To reiterate and expand on my post here:
SD card:
Do NOT make an ext4 partition with swap (and make sure there isn't one)
System setup:
Flash minicm9 and gapps as normal
Remove unwanted applications and services (e.g. for me, Google Talk, FM radio, etc.).
Remove DSP Manager.
If you like the dark ICS theme, you can replace your Contacts.apk, Mms.apk and Email.apk with the ones from here. Flashing doesn't work for me, but you can extract and copy them manually. Do not replace your music.apk.
Flash this zip to get SRS audio support if you want virtual surround when listening to music on earphones (stock player). Similar to what the DSP Manager can do for you, but a lot more lightweight.
Do not 'install a2sd' via console
System configuration:
Set up your autobrightness settings like this
Test your pulse notification light. If it stops flashing after a couple of seconds, go to system/lib/hw via your root file manager and delete/rename lights.shakira.so. Once you reboot, your notification light should work normally.
Disable Google's location service (GPS is okay)
Min CPU: 320MHz (important); Max CPU: ~? (I use 748)
Governor: SMARTASSV2
Disable zRam
Do not enable 'Allow purging of assets'
Do not enable Kernel samepage merging
Surface dithering: Yes
16bit transparency: No|Yes (up to you)
You should now:
Have a for the most part very fluid minicm9 (using Trebuchet). There should be no crashes or instablity, apps will not hang or FC. Memory will feel a little short, but apps should load quickly enough and be incredibly responsive once loaded. Stock browser will choke on low memory, I suggest Opera mobile as an alternative.
This is a very usable state of affairs, but if you want more and have a decent SD card, keep reading:
Performance tweaks:
Do NOT use Supercharger.
Move large apps that are not usually running to SD (e.g. Opera) via Settings»Apps»Move to SD. If this option is greyed out, follow this guide to move them anyway (NB: the command for the ICS platform is set-install-location rather than setInstallLocation).
Install SD-Booster and a SD card speed test of your choice. Adjust the cache until you get an optimal read/write speed (for me, this is at 4096KB) – more is not always better. You can uninstall the speed tester once you're done.
Install Swapper2.
Set swap place to somewhere safe on your SD card (do not use an ext partition)
Set swap size to at least 128M, I recommend 256M.
Set swappiness to 20
Advanced options» tick Recreate swap file and Reformat swap
Enable swap once (may take a bit as it writes the file).
When it says 'Done' open Terminal emulator and type in 'free'. You should now see the available swap (however much you set).
Go to your favourite file explorer and navigate to your swap file/folder. Make a copy of the .swp file
Back in swapper2 go to Advanced options again, and UNtick Recreate swap file & Reformat swap. Once you hit okay, it should say 'Swap file removed, all ok!'. Note that enabling swap will now fail as it can't find the file (bug?)
This is why we made the copy back in your file manager. Open it up and rename the copied swap file to its original filename.
Back in swapper2 (without touching the settings) click 'On'. It should now enable swap just fine. Verify in terminal, and you are done!
Note that to connect your USB storage, you will have to turn off swapper2. As you don't recreate/format swap every time this should be pretty much instantaneous (as long as you remember to do it!)
Your ROM should now still be running every bit as smooth as it was before, BUT you should have a lot more memory to work with, which means apps will no longer reload all the time (I would still suggest to free up apps via home button » swipe if you no longer need them).
Enjoy!
---
If you've set everything up properly, this should be about what you can expect in performance:
http://vimeo.com/42602916
(pass to view is xda)
epithetic said:
Remove unwanted applications and services (e.g. for me, Google Talk, FM radio, etc.).
Remove DSP Manager.
Click to expand...
Click to collapse
Hello,
how to remove those applications? I don't have "uninstall" button.
Use Titanium Backup or Root Explorer to delete these apps.
Sent From My W8 Using Tapatalk
^ this.
tethnekos said:
Hello,
how to remove those applications? I don't have "uninstall" button.
Click to expand...
Click to collapse
Open system/app in a root file manager and delete the .apks you don't use or need.
You can backup your system beforehand if you're concerned about deleting something important.
OK, let me add my experience. Not gonna talk here about self-evident things like remove apps you don´t need, watch what they do in background etc.
Two main things are of concern. Battery life and performance. Now I´m only gonna talk about the latter.
I was one of those unfortunates who used to stare more than 5 secs at the black screen when starting phone, contacts, messages, settings. Tried pretty much every possible combination of governors and CPU freqs to no avail.
Then one single thing that made it better - to some 2-3 secs - was to disable compcache.
The second step I took was experimenting with swap. Now my phone, contacts .. etc open almost INSTANTLY. I´ve got a class 10 32GB SD and I was using ext4 since Slade´s ZP kernel, but without swap. Now it was for the first time I´ve set up a swap in ext4 and for me that solved performance problems perfectly.
So, if you have a DECENT SD card, you may want to give it a try for yourself.
One more thing. If anybody is worried about ext4 speed and/or SD wear - there is a option to disable data journalling on ext4. More on that later if anybody´s interested, or try to google.
CosminAdriaan said:
Ohai ladies and gentlemen , i created this thread to share our performance tweaks of minicm9 , we all use different
I use Nova launcher Prime , Supercharger , Swap 256mb and ES task manager
waiting on yours :d
Click to expand...
Click to collapse
Dolphin Companion,Apex Launcher,root browser, Undervolt, max.600MHz and min.120MHz, ultra brightness all time, LIVE WALLPAPER(lexus)... 3-4days!
drfr said:
If anybody is worried about ext4 speed and/or SD wear - there is a option to disable data journalling on ext4. More on that later if anybody´s interested, or try to google.
Click to expand...
Click to collapse
Does that solve the problems with ext4 swap?
Because for me (see above) swap works great but as soon as there is an ext4 swap partition/swap file on ext everything comes to a grinding halt.

[Custom ROM] What to do with that huge cache partition

You may have noticed the ~1 GB cache partition on 3rd gen HDX devices that was used as temporary work space for chunky FireOS OTA updates. Typically <5% is used by Android which leaves a sizable block of space completely wasted. While it is possible to adjust partition boundaries to to expand either the System or Data partition that task is not for the faint of heart on an Android based device.
One option is to utilize a portion of the Cache partition for eMMC backed swap, especially since the stock kernel does not support zRAM. This can be attractive for those who run large or numerous apps that consume the 1.8 GB of available RAM. While Android's LMK will typically prevent OOM (out-of-memory) conditions under heavy pressure the constant recreation/reloading of killed activities can be annoying.
It is pretty easy to create a swap file in the Cache partition with an app like App2SD (just an example; not an endorsement). Suggest starting with 128 or 256 MB. You may want to crank down the swappiness value (default on most ROMs is 60) to limit write activity to eMMC which has a finite lifespan. Tuning LMK is also part of the game; lots of apps can handle that including the fan favorite L Speed or any of the popular Kernel Manager apps (EK Kernel Manager, Kernel Adiutor, etc).
eMMC backed swap has its pros and cons. While experimenting won't hurt you'll probably want to do a little research before making swap a permanent part of your config.
Enjoy!
edit: A tool like DiskInfo can help illuminate how partitions are allocated/utilized on your device.
FWIW - the following values returned acceptable results for my typical usage scenario:
- LMK thresholds (in MB): 16/32/48/64/80/96
- swappiness: 40
- vfs cache pressure: 70
Edit 04/18: Over time I have stopped twiddling with most VM parameters (accepting default values) as there was not a sustained, meaningful difference in performance to justify maintaining custom settings. However, I have found increasing the LMK "empty app" threshold provides a noticeable increase in response time with light to moderate multi-tasking. New LMK settings as follows:
LMK thresholds (in MB): 16/24/32/48/64/128.
I have found these values work well on most devices equipped with ~2 GB of RAM. In fact setting appropriate LMK values can all but eliminate the benefits of file based swap on this device. Obviously YMMV.
Quick follow-up: The config outlined in the OP remains on my daily driver and continues to enhance the overall enjoyment of this device. Over time I refined a few tunings for my workflow. Difference are subtle but yield better resource utilization. YMMV.
- swappiness: reduced to 20 to further discourage cache file writes
- VFS cache pressure: restored device default (100)
Davey126 said:
Quick follow-up: The config outlined in the OP remains on my daily driver and continues to enhance the overall enjoyment of this device. Over time I refined a few tunings for my workflow. Difference are subtle but yield better resource utilization. YMMV.
- swappiness: reduced to 20 to further discourage cache file writes
- VFS cache pressure: restored device default (100)
Click to expand...
Click to collapse
Hello Dave, I've follow your posts and managed to get 256MB for swap space but used only about 50KB. Is it work or not? How to check does a swap helps a system as android?
BR!
iksel said:
Hello Dave, I've follow your posts and managed to get 256MB for swap space but used only about 50KB. Is it work or not? How to check does a swap helps a system as android?
BR!
Click to expand...
Click to collapse
Likely working...give it time. You will see swap file utilization slowly creep up but will likely remain at a small fraction of the available space. Note: the swap file is reset (flushed) on reboot.
Setting swappiness to 20 discourages the use of the swap file except under high memory pressure. In most cases that is what you want as RAM is several magnitudes faster than eMMC. The benefit kicks in under high memory loads:
- older content in the memory cache can be (quickly) written out to the swap file freeing up RAM for current demands
- context of loaded but less frequently accessed apps is likely to be fully/partially retained avoiding a complete restart
Bumping swappiness to 40 or higher will increase swap file utilization and also change the composition of swapped contents. The default on many devices, especially on low RAM configs and/or those with zRAM, is 100. That aggressive setting will likely hurt overall performance on a 2GB device with no zRAM support (like the HDX).
Keep in mind the swap file resides in an area of permanent storage that goes largely unused on a HDX fitted with a custom ROM (FireOS uses this area for processing OTA updates). If that file were taking space away from the data partition this tweak would be of questionable value.
Davey126 said:
Likely working...give it time. You will see swap file utilization slowly creep up but will likely remain at a small fraction of the available space. Note: the swap file is reset (flushed) on reboot.
Setting swappiness to 20 discourages the use of the swap file except under high memory pressure. In most cases that is what you want as RAM is several magnitudes faster than eMMC. The benefit kicks in under high memory loads:
- older content in the memory cache can be (quickly) written out to the swap file freeing up RAM for current demands
- context of loaded but less frequently accessed apps is likely to be fully/partially retained avoiding a complete restart
Bumping swappiness to 40 or higher will increase swap file utilization and also change the composition of swapped contents. The default on many devices, especially on low RAM configs and/or those with zRAM, is 100. That aggressive setting will likely hurt overall performance on a 2GB device with no zRAM support (like the HDX).
Keep in mind the swap file resides in an area of permanent storage that goes largely unused on a HDX fitted with a custom ROM (FireOS uses this area for processing OTA updates). If that file were taking space away from the data partition this tweak would be of questionable value.
Click to expand...
Click to collapse
Good to know, thanks again!
Davey126 said:
Quick follow-up: The config outlined in the OP remains on my daily driver and continues to enhance the overall enjoyment of this device. Over time I refined a few tunings for my workflow. Difference are subtle but yield better resource utilization. YMMV.
- swappiness: reduced to 20 to further discourage cache file writes
- VFS cache pressure: restored device default (100)
Click to expand...
Click to collapse
Yet another update. After making modest tweaks to dirty/dirty background ratios I noticed a subtle increase in momentary (<1 sec) lag switching between previously loaded apps. Such behavior is symptomatic of increased memory cache pressure and potentially unnecessary swapping and/or LMK activity. Flushing the cache cured that (for awhile) but is clearly not the ideal solution. Ultimately bumping swappiness to 40 addressed the problem. Guessing the previous value (20) allowed stale application pages to remain in memory a bit too long increasing cache pressure which became evident when actively multitasking.
Bumping this thread as reminder/reinforcement of the beneficial effects for some workflows. In short, a small static swap file significantly improves the multitasking UX if returning to previous app context is important. Newer devices leverage zRAM for this purpose; HDX kernel doesn't support that.
Over time I have gravitated back to defaults for swappiness, dirty timeouts, cache pressure, etc as custom values did not yield significant measurable (or subjective) improvement to warrant changing. Less knobs to turn/tweak which is always good thing in my book!
This is what I usually do - just resize and move the extra space to userdata partition. If only the days of roms that are installed by simply extracting the files on to system partition still continues, we could get some space of the system partition out too :silly:
pipyakas said:
This is what I usually do - just resize and move the extra space to userdata partition. If only the days of roms that are installed by simply extracting the files on to system partition still continues, we could get some space of the system partition out too :silly:
Click to expand...
Click to collapse
Yep - done that too on some devices. Resizing partitions is not for the faint of heart which is why I opted to excluded it from the guide.
I had kown how deal with it ,we can rest our disk partition to make it change to data
I had kown how deal with it ,we can rest our disk partition to make it change to data or system to use!!!
Davey126 said:
Yep - done that too on some devices. Resizing partitions is not for the faint of heart which is why I opted to excluded it from the guide.
Click to expand...
Click to collapse
Why not provide that info? It is no different than flashing custom roms. You are warned by the devs that doing so brings a risk of bricking your device...proceed at your own risk.
I think it would be valuable to those that want to use that wasted space or optimize the use of the storage space available.
Hopefully you will reconsider.
droiduzr2 said:
Why not provide that info? It is no different than flashing custom roms.
Click to expand...
Click to collapse
lol - not comparable, at least with the vast majority of mobile devices that I have been exposed to. Including this one. Those who wish to muck with resizing Android partitions will find copious detail on the net...usually from those who have spent 100X the initial resizng effort trying to recover their device. Because, ya know, it is no different than flashing custom ROMs.
Davey126 said:
lol - not comparable, at least with the vast majority of mobile devices that I have been exposed to. Including this one. Those who wish to muck with resizing Android partitions will find copious detail on the net...usually from those who have spent 100X the initial resizng effort trying to recover their device. Because, ya know, it is no different than flashing custom ROMs.
Click to expand...
Click to collapse
I am pretty sure everyone on here that goes to flash a rom (change from stock) read the disclaimer and assume the risk that they can brick their device. If there were a tool or clear directions to optimize the use of storage space considering we are stuck with 16gb (no usb otg support, no external sd card) then being able to use every Mb much less Gb seems to be a helpful thing imo.
Also it's not about mucking around with just any Android device, it's about this specific device and what one would have to do.
If you are saying it is not an easy task then so be it.

Categories

Resources