I finally found a way to not have my apps killed all the time!
I am using a device with 2 GB of ram (Nexus 7 2013) and I experienced frequently that apps are killed. Quite often it gets so bad that it's impossible to have both dekko and the browser open at the same time. It always felt like it was an out of memory situation. Today I stumbled over this remark of ShadowEO on his github page to configure the lowmemorykiller. In my experience, I need two other tweaks in addition. So in total I did the following three things:
Increase the swappiness
Checking with
Code:
dstat --top-oom --top-mem --vmstat -s 30
and
Code:
tail -f /var/log/syslog | grep sigkill
I see which app the out-of-memory killer (oom) considers for killing and I see when that app is being killed. Also, I see that even though there is swap space available, it isn't being used. In order to make the system actually use the available swap space I increased the swappiness from 0 to 70:
Code:
cat /proc/sys/vm/swappiness
0
echo 70 | sudo tee /proc/sys/vm/swappiness
Increase swapspace
Now the swap is being used, but it doesn't seem to make a whole lot of a difference with the killing, so I increase the size of the swapspace.
Out of the box, if I remember it correctly, I only had 32 MB of swap:
Code:
swapon -s
The swap file being /userdata/SWAP.img. I increased it to 2 GB following these tips:
Code:
sudo swapoff /userdata/SWAP.img
sudo rm /userdata/SWAP.img
sudo fallocate -l 2g /userdata/SWAP.img
sudo mkswap /userdata/SWAP.img
sudo chmod 0600 /userdata/SWAP.img
sudo swapon /userdata/SWAP.img
Configure the lowmemorykiller
Now a little more of the swap is being used, but it still doesn't stop the killing. Seems on Android there is something called lowmemorykiller, which on my Nexus 7 had this original configuration:
Code:
cat /sys/module/lowmemorykiller/parameters/minfree
1536,2048,4096,16384
Where 16384 pages (4k each) corresponds to 16384*4/1024 = 64 MB. So, seems that once the free memory drops below 64MB, the killing starts. Inspired by ShadowEO's tip, I set it:
Code:
echo "1536,2048,4096,5120,10240,15360" | sudo tee /sys/module/lowmemorykiller/parameters/minfree
which corresponds to 20 instead of 64 MB. (I also set the last two levels to 40 and 60 MB - don't know whether that is needed.)
With all three things in place, I can now have the browser, dekko, podbird, filemanager, unav, uradio playing music, terminal and gedit and libreoffice writer running from libertine all open at the same time. I'm almost running out of apps that I care to run in addition
At times there was some stuttering, but of course nobody forces you to have so many apps open at the same time. However, now you can choose what you want to close to relieve the memory pressure Swappiness and lowmemorykiller I need to repeat after every reboot. Need to find a solution to persist this.
I'd be curious to hear whether/how this works for other people!
I'm running this now for a couple of weeks without noticing any obvious problems caused by these settings (actually I'm running swappiness=100)
Just now I figured out another aspect: The browser does a very aggressive unloading of inactive tabs. The bugreport here suggests that this unloading is related to a percentage of free memory.
By doing
Code:
echo $[ 300 * 1024 ] | sudo tee /proc/sys/vm/min_free_kbytes
My expectation is that it should keep 300 megabytes of free memory (which of course is a waste). It seems to actually keep some 600+ mb free and after testing this for all of 5 minutes I can successfully listen to a youtube video playing in an inactive tab, while writing this post in another tab!
doniks said:
Need to find a solution to persist this.
Click to expand...
Click to collapse
Ok that was easy. Put the two lines
Code:
echo 100 > /proc/sys/vm/swappiness
echo "1536,2048,4096,5120,10240,15360" > /sys/module/lowmemorykiller/parameters/minfree
into /etc/rc.local. I don't dare to put the min_free_kbytes setting in there just yet.
doniks said:
Ok that was easy. Put the two lines
Code:
echo 100 > /proc/sys/vm/swappiness
echo "1536,2048,4096,5120,10240,15360" > /sys/module/lowmemorykiller/parameters/minfree
into /etc/rc.local. I don't dare to put the min_free_kbytes setting in there just yet.
Click to expand...
Click to collapse
There is this OpenStore (I can't add link, google it 'OpenStore ubuntu') which have very nice app (UT Tweek tool) for tweeking the UT. It allows to prevent killing apps and it can be set per app, so no more annoying termination of i.e. terminal scripts when you switch the apps or youtube music kill. By this method you need no reentering of the code after every reboot and you have quite granular control over killing or not killing automatically the apps.
sem-geologist said:
There is this OpenStore (I can't add link, google it 'OpenStore ubuntu') which have very nice app (UT Tweek tool) for tweeking the UT. It allows to prevent killing apps and it can be set per app,
Click to expand...
Click to collapse
Yeah, I know it, and I use it, but to the best of my understanding that applies to a different kind of killing. I think the suspension itself doesn't actually terminate any process. It just freezes it. So with the UT tweak tool the process continues executing even when you switch to another app, which is indeed a good first step (yt playing in the background).
But there is another form of killing going on where UT seems to very aggressively try to keep some memory free and actually terminates a process. What is left is an a bit blurry picture of the last state of the app, that is shown in the task switcher and when you switch back. Then the app is restarted and its the job of the app to restore the state it was in previously.
My experience was that when I write an email and I'm switching to the browser to check something and back, the email app had been killed. It takes a few seconds to load and it doesnt perfectly restore the state (half written email, cursor position, selected text). Same the other way around. I'm typing a forum post but want to check that link I had in that email. Browser was killed, restarts, which takes a couple of seconds, and the halftyped posting is gone.
so no more annoying termination of i.e. terminal scripts when you switch the apps
Click to expand...
Click to collapse
true, with the terminal I didnt have the problem of actually be killed so often. The script you had running has just been suspended. You can revive it by typing fg, or use uttt as you suggested.
or youtube music kill. By this method you need no reentering of the code after every reboot and you have quite granular control over killing or not killing automatically the apps.
Click to expand...
Click to collapse
So, are you saying, with the uttt settings, you have no trouble using email and browser at the same time? Switching back and forth? Switching btw tabs in the browser? How much RAM does your device have?
Hi!
Sadly in the aquaris E5 ubuntu edition(That I own) the SWAP is in a partition, so isn't so easy to expand it. I create a second swap in a file but isn't persistent after a reboot.
Interesting. Where did you create the swapfile? What exactly isnt persisted? Is it just not used anymore or does the file go away? How did you attempt to persist it? In rc.local?
Related
I have picked up lots of bits of information about how to maximize space issues and maximize battery life for those of us who are in love with these amazing new NAND builds....especially those of us with European HD2 phones who only have 512MB to play with
I have compiled them below for ease of reference - I claim no originiality for these ideas...I am just bringing them together...so MAJOR THANKS TO ALL THOSE OUT THERE! You know who you are...
I have already posted this on the DFT thread as I love that particular build, but they should (might!) work for other builds and I post it here for further reference as it took me a long time to sift through the threads to find it all.
Space
1. Before flashing your phone, using DFT Stock Desire, for example, you can edit the flash.cfg file and change the following line:
cache ya 40M >>to>> cache ya 15M
This reduces the cache by 25M with no discernible impact on the speed of the build (imo).
This should give you in excess of 130MB free after a clean flash on that particular ROM. Expect that to drop to around 100MB once Market, Flash and a couple of other apps update themselves.
Some NAND ROMs will not even have this as an option, and others may look a little different. You can read about how the flash.cfg file is structured here.
2. Immediate install Z4 to root your device. You will need to get it from here. (Note: it may get stuck on 'Rebooting'. Wait a minute or so and then manually reboot - it will work fine and SuperUser will now work after the reboot)
Put it on your SD card and then install a file manager from the Market to browse to it and then install and run. Follow the details on the thread...
3. Install Move2SD. You can get it from the Market. Full details are here.
This allows you to move most (not quite all) apps to SD. It is the best option I have found to move most of those awkward apps.
I have now installed pretty much all of my apps that I used to run on non-NAND builds and have moved about 90%+ of them to the SD card. At time of writing I have loads of apps installed and still have over 70MB free
Battery
1. Install Battery Monitor Widget or Current Widget from the Market so that you have a way of tracking your current usage.
2. Install Set CPU - free for XDA members from here, but also available on the Market.
After setting your Main Screen to 'OnDemand' and 'Set on Boot', assign SetCPU a couple of profiles. I tend to use:
>> Screen Off: Max/Min 245000, Scaling 'OnDemand', Priority 50%
>> Battery <25% Max 384000/Min 245000, Scaling 'OnDemand', Priority 50%
You can play to your hearts content here, but these give me consistently 7ma in Standby.
Also, you can reduced the sampling rate to 20000 and 'Set on Boot' in Advanced if you like.
3. Avoid power hungry background stuff like animated wallpapers and turn off GPS, Wireless etc. There are LOADS of apps out there that can do this automatically for you free from the market, but I have found that making sure my GPS is off (I have a widget to show me) plus SetCPU is plenty. It may work for you though.
4. Some have reported that Darkstone's suggestion makes a major difference to their power consumption:
"To fix high power drain / usage in standby (60mA or 70mA) disable 'Use wireless networks' in Settings>Location menu. You will now get 7mA or less constantly. I discovered this as the main culprit last night. Also works in other builds."
Anyway, there you go - a few consolidated thoughts - happy NANDing!
MOD - just realised I have posted this in the wrong Q&A forum - please delete thread as I have put it in the Android one now...sorry.
Today I (supposedly) disabled lowmemorykiller by putting zero in minfree and adj files. I already have swap partition set up (size 1 GB) in a class 10 SDHC card.
Then I proceeded to open all the apps that I have installed and set them in a different state from default (like opening its settings, opening a file in case of officesuite etc).
These things happened:
1. After a max limit, older apps started to vanish from task manager to make space for newer apps
2. used swap space did not exceed 122 MB
3. when I tried to return to very old apps, some of them retained their last state giving an illusion of multitasking but a text message I was typing disappeared, did not even get saved as draft. ALL web browsers were killed. Some reloaded pages from internet, Opera Mini and Easy Browser failed to save last state (they always fail, so does Adobe Reader) so they were back to home screen with all opened tabs lost.
4. After an incoming call, when I returned to all the apps a second time, I found that all but the lightest of apps had lost their last states.
After setting minfree to zero and enabling swap with 60 swappiness Android is still killing apps without my permission.
<rant> I usually have less than 10 apps open and some of them can be memory intensive. Multitasking is better than default now, but still kinda random. I can't ever be sure that if I open this document now, I won't find my previous 20 minutes of research session lost upon returning to browser (history is messy for retrieving long sessions and very short in case of Opera Mini. Even Chrome browser sometimes crashes and gets reset not to mention always reloading all pages while Android Browser in ICS only renders crashes. My data limit is 3 GB/month). The three major handheld OS right now are Android, iOS, WM7 so don't tell me to stop whining and change OS; there is nowhere to go. At least Android is open source and there is a chance of someone legally implementing proper (like in PC) multitasking in it except multiple instances of same app which will probably be a little too much to ask for from a community but seeing that browsing the web is my main concern and all browsers already support multiple tabs, it will not be a deal-breaker for me</rant>
So my question is, how do I stop this T1000 Ninja Edition? Throw it into the chasm of Mount Doom?
On a serious note, any help will be appreciated. If you can't solve it but know what is killing my app sessions, please explain that.
SO I have come to the conclusion that ICS's maximum limit of Background apps is 18. As long as the app is not older than 19, it should be visible in task manager and should be in memory. I have set swappiness to 100 and use of swap memory increased to 221220. I'll put further pressure on it to see how it behaves when lots of tabs are open but I am afraid that 100 swappiness will make the device crash if too many tabs are open. It has already started to suddenly reboot time to time.
Edit:
It does not work that way. Android seems to really have its own will in this matter. There is no rule found by me so far that can predict when an app will be unloaded from memory. It seems time plays a role too.
At least iOS and WP7 clearly state that they do not support multitask. Google is the worst of all.
Edit:
Chrome Browser is not loading the pages from internet upon being recalled from task manager. It is loading the pages from swap but looks just like loading over 3G. Any changes in the actual pages are not being reflected until I manually hit reload. Not sure if other browsers will follow suit.
So, I have a Huawei H866c and it is rooted. I am using the stock Android 2.3.6 OS.
I have SD Maid and the whole reason I am going through this now is I want to keep my phone running at its best.
I deleted many of the bloatware stock apps (the Google Play Music, Video, Google Calendar, Google Talk, Gmail, etc).
What I still have stock would be easier as I can't remember all I deleted: Browser, downloads, Maps, Navigation, Contacts, Dialer, Call log Clock Camera, Gallery, File manager, Messaging, E-mail, Phone Calendar, All Backup, Notepad, Play Store, YouTube, Google Search**
Now I had a question about that, is this Google Search app all right to delete?
Anyway back to it, I have SD Maid pro and System Tuner, so to help make things easy with all stuff in one place
Phone:
ARMv7 Processor rev 1 (v71)
Linux version 2.6.38.6-perf
800MHz
SD Card:
PQI
4GB Micro SD
A1 SD Bench results:
• SD card:
3,774MB total, 3,260 MB free
Read 16.03 MB/s - Write 2.56MB/s
• Internal Memory:
165MB total - 54MB free
Read 0.00MB/s - Write 4.93MB/s
• RAM
173MB total - 27MB free
RAM copy 807.89MB/s
Now after I totally clear out everything with system cleaner using SD Maid Pro and reboot my phone...
Before I do anything, if I open and scan with SD Maid Pro, I get 10 files every time in Tombstones and 11 in Dropbox and often get 10+ in LOST.DIR directories.
System Tuner Pro tweaks:
• Build Tweaks:
dalvik.vm.heapgrowthlimit 64m
dalvik.vm.heapsize 256m
dalvik.vmheapstartsize 8m
persist.adb.notify 0
• SysCtl Tweaks:
None because this stuff I don't understand.
• CPU Tweaks:
Performance governor
CPU Frequency 800MHz
CPU Load varies as needed
• SD Tweaks:
Cache Size 1024MB
IO Scheduler cfq
• OOM Tweaks
Preset: Medium (Foreground Apps at 4MB and Empty Apps at 64MB, gradually increasing from Foreground to Empty)
FM Radio frozen
So what I have questions with are (and I know some of these may not be possible):
• How can I change my language to British English without changing my location? I need things like market to show up in USD not Pounds? I hate switching back and forth between US and GB English.
• What are various ways I can optimise my phone for best performance? I don't care about sacrificing battery life.
• Why do I consistently get [what I assume to be] the same 10 tombstones? The drop box always increases by 11 more files over time, even if the tombstones don't (which they never do). Is this something to worry about? It takes up no room, deleting them doesn't seem to harm my phone, and it is just irritating to have to clean them up all the time. Could they be in relation to the bloatware I deleted?
Other Useful Information
I do have some random coding experience (SecondLife [yeah I know, *shudders*], C#, Java).
I also have the Android SDK Eclipse Juno and some very minor experience coding in there (trying to make a music theory quick reference app).
anathematized_one said:
• What are various ways I can optimise my phone for best performance? I don't care about sacrificing battery life.
• Why do I consistently get [what I assume to be] the same 10 tombstones? The drop box always increases by 11 more files over time, even if the tombstones don't (which they never do). Is this something to worry about? It takes up no room, deleting them doesn't seem to harm my phone, and it is just irritating to have to clean them up all the time. Could they be in relation to the bloatware I deleted?
Click to expand...
Click to collapse
You can look at kernels that allow overclocking.
The tombstones are more comprehensive crash reports that get created when certain apps/system elements crash.
Two options:
You could either open them and see if you can figure out what is crashing from their content and then try to prevent the crashs creating those tombstones
Or you delete them all and change permissions on that folder so they can't be created anymore (works on some device and doesn't work on others), but it's a kind of crude solution.
The files in the dropbox folder are various logreports similiar to logcat but gathered from more sources, you have the same two options here.
There might be a third option where these two features can be turned off through a custom kernel / flags, but i'm not sure about that.
Removing/breaking logging features is never a good solution.
Dark3n said:
You can look at kernels that allow overclocking.
Click to expand...
Click to collapse
I will look more into that at another time.
Dark3n said:
The tombstones are more comprehensive crash reports that get created when certain apps/system elements crash.
Two options:
You could either open them and see if you can figure out what is crashing from their content and then try to prevent the crashs creating those tombstones
Or you delete them all and change permissions on that folder so they can't be created anymore (works on some device and doesn't work on others), but it's a kind of crude solution.
The files in the dropbox folder are various logreports similiar to logcat but gathered from more sources, you have the same two options here.
There might be a third option where these two features can be turned off through a custom kernel / flags, but i'm not sure about that.
Removing/breaking logging features is never a good solution.
Click to expand...
Click to collapse
Well, I looked at the log files and they were in relation to two specific programs, one of which I don't use (Adobe PDF reader). I forget the other (I only just now could get back on my computer and my phone doesn't have the power to open XDA in the browser). So these aren't a big deal, I can just clean them.
So another thing I was looking at was I have a better MicroSD card that I am going to switch out for my current one and I was looking into "partitioning" off some space for virtual RAM, but I don't know much about flash memory or even if this is possible on Android 2.3.6
For such a thing, I found this link (I would make an actual link but I don't have 10 posts yet) and it says:
One of the worst things on certain budget-friendly smartphones is not having quite enough RAM. This normally isn’t a big deal for many users who use their phone for the practical purposes of calling people, sending texts, and checking email. However for people who do a lot more with their devices such as gaming and heavy app usage, the shortage of RAM may be a bit more limiting. Running out of RAM can cause a lot of problems such as app crashes and large-scale lag.
[...] lower end devices can enable a swap file and partition thanks to a method written up by XDA Senior Member CarlDeanCatabay. This is similar to the pagefile used in windows, and while it isn’t nearly as fast as RAM, it may help certain apps that require a bit more breathing room.
[...]
What is SWAP : Swap is, in short, virtual RAM. With swap, a small portion of the hard drive is set aside and used like RAM. The computer will attempt to keep as much information as possible in RAM until the RAM is full. At that point, the computer will begin moving inactive blocks of memory (called pages) to the hard disk, freeing up RAM for active processes. [...]
What you need:
MiniTool Partition Wizard for SD Card Partitioning
A MicroSD HC 4GB or higher class 6 or class 10
MicroSD HC Card Adapter
A card reader (if your pc doesn’t have card reader built in | USB Mount is not adviseable)
Swapper2 from Google Play Store [DOWNLOAD]
ADB Shell or terminal Emulator (to check if swap is activated)
Make sure you have BusyBox installed
How to create Swap Partition
[...]
Click to expand...
Click to collapse
Does that look like something that is legitimate?
Is there any other/better way to virtually increase the RAM? I just tried that above method and couldn't even get it to work. I swapped to my other 4 gig micro SD:
• Samsung microSDHC
• Read 18.81 MB/s - write 3.56 MB/s
So it can't read as fast but writes faster, then again I also have it formatted with 3 different partitions from where I was going to try out the swapping but that failed so... who knows when I quit being lazy and reformat it to be normal.
Is there any other system besides minfree, which frees up memory in android? Have strange behavior of FBReader, which I set to OOM -17 (both processes), chmod to r/o oom_adj files to force it to stick and still cant hold it in memory. It seems to me, that after some time when I dont use phone (hour or two) it is just released and starting again instead of just resuming from memory. If I try to force FBR from memory just by running many other programs, it sticks there no problem. I can run everything it never happened to me that FBR is released and starting again. But when I sleep phone ane leave it, then after some unpredictable time, FBR (and other apps) are just released and starting again. It seems to me, that there is running other process, which just releases apps in Empty app state. Or maybe there is some timeout for empty app, which is then automaticaly ended?
I'm using Nik3r EX8 kernel with 192mb swap enabled, latest viper rom.
Wlk said:
Is there any other system besides minfree, which frees up memory in android? Have strange behavior of FBReader, which I set to OOM -17 (both processes), chmod to r/o oom_adj files to force it to stick and still cant hold it in memory. It seems to me, that after some time when I dont use phone (hour or two) it is just released and starting again instead of just resuming from memory. If I try to force FBR from memory just by running many other programs, it sticks there no problem. I can run everything it never happened to me that FBR is released and starting again. But when I sleep phone ane leave it, then after some unpredictable time, FBR (and other apps) are just released and starting again. It seems to me, that there is running other process, which just releases apps in Empty app state. Or maybe there is some timeout for empty app, which is then automaticaly ended?
I'm using Nik3r EX8 kernel with 192mb swap enabled, latest viper rom.
Click to expand...
Click to collapse
You`ve probably already heard this but android will automatically free up ram by killing of the launcher/system processes as a user app draws more ram, if you run out, android will kill the app using the most ram, usually the app you are trying to use hence crashing/stopping. You can tell if something is using too much ram when the launcher/Htc Sense frequently reloads. If you experience this flash the 256mb swap. Leave minfrees as stock, that way multitasking will actually work (with swap mod). If that doesn`t work, ARHD 6.5 has an enhance multitasking tweak in aroma, download the rom, unzip and in the aroma or extra folder just extract the mod and copy to your phone using root explorer.
I use the ultimate minfree setting in Viper settings, you have to disable usb debugging in developer settings for this to work i read somewhere, restart once set.
-smc
ryanjsoo said:
You`ve probably already heard this but android will automatically free up ram by killing of the launcher/system processes as a user app draws more ram, if you run out, android will kill the app using the most ram, usually the app you are trying to use hence crashing/stopping.
Click to expand...
Click to collapse
Sure, this is Minfree proces, but my problem is bit different. It seems to me, that system has enough ram and allows me to run quite a lot of apps without forcing my FBReader out of memory - when I try in one session. I even set FBR to have OOM value -17, which should force Minfree to ignore this process completely, same as it should do for launcher. But as soon as I leave phone for some time in sleep mode, there seems to be some other mechanism besides Minfree. And this one kills my app - and I dunno why and what is it...
somemadcaaant said:
I use the ultimate minfree setting in Viper settings, you have to disable usb debugging in developer settings for this to work i read somewhere, restart once set.
Click to expand...
Click to collapse
Trying to restart, because I set it without it before, but it didnt hold after phone wake up - already reported this in Viper thread. Lets see if it gets better with reboot - and it doesnt. You can easily check in adb shell by running
Code:
cat /sys/module/lowmemorykiller/parameters/minfree
Minfree is reset every time you sleep/wake up phone...
I confirm the problem.
Whichever ROM I use, I can hardly reply SMS/Whatsapp without loosing Browser or CoolReader.
Actually, I counted limit of 2 hot apps.
The scenario is:
1) I read a book or RSS-reader
2) I receive a text via SMS or WhatsApp
3) For answering I need a browsing for some fact-quoting. At the moment I open a browser, the first application (Book or RSS reader) is killed.
Scenario may vary, but when I open third app, the first one is killed for sure.
I tuned minfree as well, and detected that it is overwritten every reboot too. I usually have 160-200MB free of RAM, and minfree values, either mine (24MB) or default (80MB) are always lower than actual size of available memory.
I switched on "Developer mode" (touch 7 times something in About System. probably ROM version), and specified background limit "At most 4 apps" instead of "Standard limit" (unknown to me). It doesn't help either - third app kills the first.
And I never managed to obtain a solution.
Just adding my vote to the problem (thus bumping the topic).
Hi people!
i've found this
http://forum.xda-developers.com/showthread.php?t=2145133
tested it on my device and work fine with CM 10.1
waithing for the official release
How did you manage to make it work?.. i can update it with the cwm and neither the manual way.. with terminal it says not writable (but it is!)
uc370 said:
How did you manage to make it work?.. i can update it with the cwm and neither the manual way.. with terminal it says not writable (but it is!)
Click to expand...
Click to collapse
Try to change permissions using root explorer or es file manager
Sent from my XT910 using xda app-developers app
Permision were changed.. terminal still says only red file
uc370 said:
Permision were changed.. terminal still says only red file
Click to expand...
Click to collapse
I don't know why terminal see only read but if you do cat /proc/swaps you will see how swaps are working
Sent from my Folio 100 using xda app-developers app
And what should it look like?.. q tendria q salir.. aprox 51000 50000 -1
vince686 said:
Hi people!
i've found this
http://forum.xda-developers.com/showthread.php?t=2145133
tested it on my device and work fine with CM 10.1
waithing for the official release
Click to expand...
Click to collapse
I've been trying this patch (manually, not the complete script), but I have found this actually slows down the folio. There is a reason why flash-based devices don't have a swap. When writing large blocks to swap, the system will stutter heavily. The slow flash disk of the folio will not help in this. My test shows it is actually slowing down quite a bit.
Even with the low RAM of the folio, it is still faster to just start/restart an app than to swap it away in a swapfile (resulting in 1secs of stutter) and then getting it back anyway from disk.
ZRAM is something similar. Tough here I can understand some improved use cases, but:
- you take away precious RAM
- then you swap out programs and compress them (uses a lot of CPU)
- if you swap the program in again, you need to decompress. Granted, the decompress might be a little faster than restarting the app.
- because of the lower useable memory, programs do have an higher chance than before to be compressed (vs killed without ZRAM), so decompression (with ZRAM) statistically will happen more than restarting (without ZRAM), making the gains of ZRAM point 3 less.
- I don't think this works correctly with huge processes (e.g. browser), and will just see that less RAM is available, and will not swap out parts because the whole memory region is still in use (best case, it will continuously swap in & out parts, making it again slower)
I'm not completely trowing out ZRAM, as it is still beneficial with some workload combinations (I think a large collection of small apps is the most optimal case)