yashsingh1/xdaforums huggingface dataset:
[Magisk] ashish1989:
I have around 3 GB free ram, will the above can be a game changer for me?
[Magisk] knightofzealot:
Thank you for your work.

This module works like a charm on Xiaomi Poco F1 with crDroid 9.2 A13 with NoGravityKernel 4.3.1 ver 10.3.7. The System UI and Android Process freezing and also the frequent lag/stutter just vanished without a trace after using this module.

No issue as of now. Still cannot say anything about battery, will update soon.

Both of you are godsend.
[Magisk] donjoe0:
Excellent! Smooth as butter on LOS 15.1 with Magisk 23.0, installed instantly and I just had to reboot. No longer losing background browser tabs just because I'm tabbing around, or even when taking a look at other apps and coming back.
[Magisk] alex1kurdin:
This version works on A13 Los20, thank you so much
[Magisk] Sheepmister:
please make this module work for android 14 please
[Magisk] crok.bic:
It does.. what's your issue? Elaborate please. Did you try this "fork" already?
[Magisk] Sheepmister:
yes bro and it did not show in magisk module category i guess its not working
[Magisk] crok.bic:
Where isn't it show up exactly? What "category" are you talking about? Did you download the ZIP from that post, went to Magisk app into the lower right corner Modules section and hit install from storage then browse the zip and install it? It does work, Magisk installs it right away and after a restart it does it's job.
[Magisk] Sheepmister:
i install the module after that i reboot my phone and check if the module is installed because of old module zip file and it was missing there
[Magisk] Sheepmister:
and its not working because i check the swap is 4gb still there
[Magisk] crok.bic:
The linked onw works for me on latest Magisk (at the moment it is v27.0). Guess something is wrong on your side, can't tell what.
[Magisk] Sheepmister:
i installed it but not found in module list
[Magisk] ManWK:
How do we download the module
[Magisk] Spartacus500:
On S7 edge with 4Gb RAM, after installing the Swap Torpedo module, the phone lags very much 😯
[Magisk] rodken:
Did you review the OP to determine as to why you should not use the module?
[Magisk] Spartacus500:
It doesn't matter now, I removed the module and everything went back to normal.
[Magisk] crok.bic:
I made a "refresh" which you can find here.
[Magisk] Momin8454:
My friend Flashed your module on his phone and it worked, Thanks Bro.

Model: Infinix Hot 30i x669c

GSI Rom: Evolution X v8.3 Android 14

Magisk v27
[Magisk] Costa02:
so removing swap increases free ram?
[Magisk] EarlyMon:
On my 6 GB honor View 10 without swap - my favorite music apps stopped dying in the background, the lag spikes in EMUI went away, and I had consistent output to my external DAC / amp. With swap I was no faster than my phone with 4 GB running RR on a Snapdragon 820 - without it, the hv10 is faster all around.

Your mileage may vary but we definitely don't need extra processes running all of the time accomplishing nothing.
[Magisk] EarlyMon:
Not necessarily but removing swap decreases the constant CPU drain from unnecessary increases in memory management.
[Magisk] GreatLordAnt:
No, but you must remember free ram is pretty much wasted. If an app is already in ram it will respond instantly when you tap the icon, if it's in swap then you have a delay as it has to be moved to ram. It's great for devices with low ram but fairly pointless for multi gigabyte systems. That's the basic explanation, I'm not sure how to word a more complex answer.
[Magisk] Costa02:
just to make sure i should disable all tweaks related to zram and swap before flashing/enabling?
[Magisk] EarlyMon:
Doesn't matter.

Once it's turned off that's it, it's off.

That's what Swap Torpedo does - turns it off. No more, no less.

But yes, you can save yourself unnecessary mods to it.
[Magisk] Unreasonable_User:
Is there any benefit to be gained from using this over something like EX Kernel Manager to disable zram?

I have a Pixel XL and haven't gotten this to work because of a/b partition hell but I'm curious if I should keep paying attention to development here or just roll with what I got already.
[Magisk] EarlyMon:
Use whatever works!

Swap Torpedo has no pixie dust nor do I expect it to ever get any.

I've had to redevelop this solution for years, every time I or a friend got a new phone saddled with swap.

I made this module so I could stop reinventing the wheel and so that it would be easier for others to enjoy the benefits.

If you have something already that gets rid of swap, or if the Swap Torpedo doesn't work for you, definitely use the other instead.

Check out "EX Kernel Manager"

https://play.google.com/store/apps/details?id=flar2.exkernelmanager

Check out "Kernel Adiutor (ROOT)"

https://play.google.com/store/apps/details?id=com.grarak.kerneladiutor
[Magisk] problemathic:
i have the crossbeeder lite edition modules with all the modulea enabled. could i use this module also? minirum ram requirement please?
[Magisk] EarlyMon:
I've personally turned off swap on phones with as little as 2 GB of RAM and gotten excellent results. Anything less you'd have to try and decide for yourself.

I've not tried to load this module with all others enabled. It's designed to be self-contained so it ought not interact or interfere with others but I've not tested that case.

This module makes no permanent changes - once uninstalled, your device will behave as before.
[Magisk] GreatLordAnt:
These are what values kernel adiutor applies and they are working on my lineage 14.1. Thanks for the suggestion mate.
[Magisk] EarlyMon:
Outstanding! You're welcome. :)
[Magisk] problemathic:
thank you. so minimum ram requirement is 500mb right?
[Magisk] EarlyMon:
It depends.

I'm running a very basic Android with a full network stack including wifi and Bluetooth, 500 MB, typically 200 MB free, and no swap.

If you're trying to run the full Samsung Experience (formerly known as TouchWiz) in 500 MB without swap, then I have no idea. I'd be skeptical.

What's your target?
[Magisk] tsnm:
Thank you! :D
[Magisk] Unreasonable_User:
Appreciate the honest response. Already use EXKM so I'll stick with it. Keep up the good work.
[Magisk] Koont:
Works on V20 H918 Weta 5.1#2 w/Magisk.
[Magisk] Hadookie:
Just wanted to let you know that it doesn't work on Essential PH-1.
[Magisk] EarlyMon:
I have an Essential coming next weekend to stay for two weeks. Maybe I can get that one sorted out. :)

Meanwhile, try Kernel Adiutor - you may have to coax it to do what you want if it doesn't understand from the Virtual Memory page. For example, set zram up, then down, lower and raise swappiness by 1 so it notices - that sort of thing. Or you may just be able to set it. The On Boot page will show the swapoff command when it understands.

And that's nothing against the Kernel Adiutor developer - he's a great guy and he put in a lot of work to give the broadest support for suppressing zram as swap. The manufacturers keep making changes for change's sake and it's very difficult to keep up with them.

If it works, notice that you can control in settings when it will take effect. For example, the default says 10 seconds - for zram I've seen that setting take more than double that - so I would advise dialing that down.

Anyway, see if you can get an easy work-around for Swap Torpedo in your case, I think you'll enjoy the difference.

Let me know how you make out. :)
[Magisk] jack1142:
It doesn't seem to work on Resurrection Remix 6 for Redmi 4X (Android 8.1.0).

Screenshot from RAM Truth:
[Magisk] EarlyMon:
I've been reviewing the history of zram and swapoff development - it's *possible* I've found where the split occurred between kernels that do and don't work with the standard method I'm using for Swap Torpedo.

If true, I'll have a new test version to try as soon as I've run through private testing.

Today the Swap Torpedo became an official module visible in the Downloads of the Magisk Manager. :) :cowboy:

First and second posts have been updated appropriately.

The official version download in the first post is identical to the "-prerelease-2" version published earlier, except there's a difference in the packaging and Readme - it is otherwise identical.
[Magisk] sad25kag:
Not work on Xiaomi Mi 6 Global Dev. [emoji848][emoji848]View attachment 4458244View attachment 4458246
[Magisk] jack1142:
From what I see, you have 0 MB of swap in total, so it works. What make you think it doesn't?
[Magisk] sad25kag:
Yea because 0 mb and swap not work on my device. Iam using kernel auditor and result View attachment 4458350View attachment 4458351View attachment 4458352
[Magisk] jack1142:
I don't understand you, could you repeat it more clearly? :p
[Magisk] EarlyMon:
You've shown native swap with Kernel Adiutor resizing it as commanded and you have shown swap turned off in your earlier post.

Swap Torpedo is not designed to make it work. It's designed to make it turn off.

If Kernel Adiutor does that but Swap Torpedo does not, please use Kernel Adiutor for now. :)

If It's a different issue, please explain again.
[Magisk] tsnm:
The official launched version is not working in my Redmi note 3 pro. Only prerelease 2 work on my phone as I told you.
[Magisk] EarlyMon:
They're the same code - here's prerelease-2, please confirm it.

Also between English and Indonesian, let's agree that sometimes it takes a few tries to understand each other ok. ;)
[Magisk] dennisnexus:
Working great on OnePlus 3T running NitrogenOS 8.1. seems it is making it even smoother than it already was. I am using the magisk module.
[Magisk] tsnm:
Right now I reinstall the version on the repo and it is working. My phone is so crazy.
[Magisk] EarlyMon:
It confirms what I suspect - some phones are very sensitive to the exact time it gets set off during startup. In such cases, one reboot it will work, another and it won't.

I can't control the module timing but I think that I may be able to control the side-effects of what is going on and have it work every time, soon I hope.
[Magisk] exodius48:
[MENTION=2682748]EarlyMon[/MENTION] This module does not work on Xiaomi Mi A1 stock rom oreo 8.0.0, swap still present.

Any clue?
[Magisk] EarlyMon:
Yes.

Your phone has slightly different timing at startup than models where it's working.

I'm internally testing different candidates for the fix for that now and hope to release a public test very quickly.
[Magisk] thebonx:
works on Redmi Note 3 Pro -RR 8.1.0-

Thanksss
[Magisk] Had023:
I donn't know how to post the picture in this forum. But fir sure its work well on my redmi 4x santoni. Thank you bro. Keep it up ???
[Magisk] handers1234:
[MENTION=2682748]EarlyMon[/MENTION] sorry but i still don't understand even after read first post.So you are saying that swap/zram in device that had more than 512 mb ram is useless?Say i have kenzo 2gb variant so swap/zram is bad for my phone?
[Magisk] :
Quote from the op: "But if you have 2 GB of RAM or more, you want this." I think if you have less than 2 GB you need swap, else your system might run unstable or even unusuable. But that's just my guess.
[Magisk] GreatLordAnt:
It depends on a few things but it's worth trying and see what results you get. My phone has 3 gig and absolutely flies.
[Magisk] handers1234:
Actually i have more trust in people that give me technical answer and a solution rather than a company that add stickers instead fixing issue and said something good without any technical reason:p.After read your answer now i myself questioning why should i compress that precious ram of mine,but yeah i think i would do more search about this zram things.Thx btw for the time and typing energy you waste for me.Gonna try your module.:good:
[Magisk] cambr1an:
It works on Samsung Galaxy J7 Prime. Thanks! Will observe it for a couple of weeks and I'll give update.

Greenify is okay?
[Magisk] EarlyMon:
I can help you get started looking up who said what about zram. :)

All about Linux swap space | Linux.com | The source for Linux information

https://www.linux.com/news/all-about-linux-swap-space

Is it safe to turn swap off permanently? - Ask Ubuntu

https://askubuntu.com/questions/103242/is-it-safe-to-turn-swap-off-permanently

Zram parameter definitions

https://www.kernel.org/doc/Documentation/blockdev/zram.txt

KitKat, look under the first section, Making Android For Everyone

https://developer.android.com/about/versions/kitkat.html

More KitKat details for developers

https://source.android.com/devices/tech/perf/low-ram

Zram on Android today

https://source.android.com/devices/tech/debug/jank_jitter#page-cache

Lest we forget, this isn't just my idea out of the wild blue yonder

https://xda-app.blogspot.com/2016/07/we-destroy-myths-about-android.html?m=1

How much swap do you need before it becomes effective? Section 16.17.5

https://access.redhat.com/documenta...tion_guide/s2-diskpartrecommend-ppc#id4394007

Finally, Wikipedia

https://en.m.wikipedia.org/wiki/Zram

That just scratches the surface, gives fair time and attention to Google, and may help illuminate the reality of our situation.

Enjoy! :)
[Magisk] EarlyMon:
Looking forward to it. :)

I've never had anything for or against Greenify - unlike the usual task killers that I loathe.

You can work under the hood tuning job control in real time. It's a lot of work but in theory wouldn't confuse Android job control.

Task killers such as Clean Master and Battery Doctor claim to do that - they're lying. Plain fact. Bad stuff.

I've never needed Greenify to get good results so I just have no opinion on it - I've never investigated it like I have others.

Huawei/honor EMUI does aggressive job management unless you stop it - and I always do.

I recommend keeping an eye on power-draining wakelocks caused by bad apps (I'm using GSam Battery Monitor but I think most people prefer Better Battery Stats, and there are others) - and decide what you want to do with the bad apps. I always contact the developer first to see if they will work with me to fix the problem or find a better app.

Otherwise, talk to Greenify users and see what works best for you. Maybe look for positive and negative comments, consider where they were coming from, and make the best choice for you. :)

That's all I know, I hope it helps!
[Magisk] handers1234:
Oh thx for the sources,it convinced me further to turn off zram and swap.

But unfortunately my custom kernel prevent your module to do its job,i want to do it with kernel adiutor instead.Say i just need to set zram amount and swappiness option to 0 right?Do i need to turn off adaptive LMK too?

Oh sorry a bit oot but how your opinion about i/o scheduler/read-ahead.

As for i/o scheduler currently im using maple which is recommended by my custom kernel developer,before im using fiops.Whats your opinion?Should i use fiops or maple?
[Magisk] EarlyMon:
The i/o scheduler is outside of our scope here - but I will offer this. Like other control parameters and sensitivity coefficients, they often play together with the kernel and with your personal use - so my opinion being right without using your phone would be like a coin toss in all honesty. See what works best for you. Your friendly neighborhood rom dev is always a great place to start for advice - but trust what your phone tells you.

As far as my advice about Kernel Adiutor, I need to clarify that.

Just like this version of my module did not work out for you, Kernel Adiutor has not always worked out for me.

But - I found out that I had to play around with something else to get its attention so that it would recognize that I wanted zram changed. I know that is not true for everyone but I wanted to mention it in case it is true for you or others.

Honestly, that's all I did - play around until it heard me. This time on this phone I have, swappiness seemed to be the trick. Maybe you don't have to play around with anything, or maybe you have to play around with something else.

Don't give up, you don't have to live with zram.

I'm actively working on the new version of the module to solve this pain.

Statistically, this module works for the vast majority of phones. But I think I can do better yet.
[Magisk] handers1234:
Yeah guess i will test it myself,i almost forgot whats working with someone doesn't always works for others,but still i need some guidance thats why i asked,i will heed your advice to ask my device's devs.Really thx for the answer.:good:

And i hope you solved your module's problems.:D
[Magisk] EarlyMon:
This will give you an overview and point you to its XDA thread - other advice still applies -

https://androidmodguide.blogspot.com/p/io-schedulers.html?m=1
[Magisk] DB126:
Although I disagree with many assertions made in the expanded version of the above post I very much appreciate the technical breakdown and balanced view of the OP. Android 'tweaking' is an art whose beauty/benefit lies in the eyes of the beholder. Unlike many dubious hacks this one is nondestructive and easily reversible. If it makes you feel better using it on a 'high RAM' device then go for it! There are trade-offs to almost everything. How you use your device and the perceived value attached to various behaviors will likely determine your level of satisfaction.
[Magisk] EarlyMon:
I thank you. :)

Just so we're clear - this is not a placebo meant to make anyone feel good. There's a clear track record of this fixing real world problems.

That you would lump this in in the same sentence as dubious hacks is rather harsh and essentially untrue. ;)
[Magisk] DB126:
My post was not intended to be harsh or disrespectful. In contrast I responded primarily out of admiration for your careful explanations in laymen's terms. Nor was there an assertion of 'snake oil' (outright deception). Changing swap and other VM parameters will definitely alter behavior. Undoubtedly some will claim a benefit. For many it is a solution in search of a problem.

The swap/zram/VMxxxx. debate has been going for almost almost as long as those entities exist. It won't be solved here or in the dozens/hundreds of other threads that attract passionate commentators. In the end achieving zen with your device is generally a 'win' for all parties involved regardless of whether the numbers add up. By way of analogy it's why Kirk and Spock worked so well together. :)
[Magisk] godofsalt:
Hey there EarlyMon, in short, not only does this work, it seems that my Galaxy S5 ( past week testing 3 different Oero roms) that she's seemed to be much better, than without!!

Now, in a past post, you had mentioned, Kernel Auditor. In my trails with that app, I had the PRO version. At first, I was trying to add RAM to Z (Meaning I was trying to make ZRam almost twice the size) that a lot of settings just did not take. ZRam was the big one for me and so was Swap On (2Gbs of SD card formatted to swap).

No matter what I did, the phone never, "Seemed" faster or better. So looking into a ton of research how I could make it better.

You have done that for me. I have found, while using this module, shutting down ZRam, and no Swap on 3rd Partition of 2Gbs, she runs a lot better. A huge plus, IS, she does not seem to get as hot as before. Nor as many times in a day.

So those that my find this hard to believe, (I was in that boat) THIS Module, will and should, make the system work better. More efficient, better in many ways. So, try it. If it does not do what you want, just Uninstall. That easy!

I truly thank you, for something that actually make my old phone so much better.

If you need a tester for Galaxy S5, you can count me in,... Of you need/want one!

Thank you
[Magisk] EarlyMon:
Fair enough.

As I have decades of experience developing and deploying real-time solutions, including designing and co-authoring operating systems when real-time Linux wouldn't do, I'll be Spock. :) :cowboy: :D ;)

We certainly agree with what I've said all along - this costs nothing to try, it's harmless in any case, and it's easily removed.

Magisk is a truly marvelous environment and a powerful approach to customization. I like it a lot. :)
[Magisk] EarlyMon:
Thanks for the kind words and you're welcome. :)

Also, you have a deal, I'll be sure to let you know when I'm ready to test the next update. :good:
[Magisk] DB126:
Magisk offers great flexibility and opportunity to independent developers at all levels. Nice to see that unfold as the trend in the consumer (and commercial) space has been in the opposite direction.

No need to cite credentials which were assumed. Save that for LinkedIn. We are all largely ignorant to the world that surrounds us with small points of light distinguishing individuals. You have yours, I have mine. Breaking out the magnifying glass on hotly debated topics just gets ugly. :)
[Magisk] EarlyMon:
I sincerely apologize. :(

I thought for sure you were doing Bones setting up a Star Trek comeback so I asked myself how Spock would react and that sounded pretty hilarious to me in his voice.

I promise that I won't do it again. :highfive:

So basically so far, you've pointed out your opinions of my comments in two posts and have repeated your opinion that this is a minority solution for some people.

I think that we all got it the first time.

Everyone else is either stopping in for support, letting me know where the problems are, or to say thanks.

I appreciate that you are in fact being a pretty nice guy through all of this and I admit that I'm being reactionary because I don't know what you want from me.

The only one mentioning a debate on its use here is you.

I've given equal time to both sides as you noticed and I believe in what I'm offering for reasons that I've stated as clearly as I know how.

The only material disagreement I can see is that I am certain that this is a solution for the vast majority of users and you see that proportion in opposite terms.

All of which would be a lot easier if you simply agreed that I'm right. :D

So - what's the question? :confused:
[Magisk] DB126:
Lol - I overlooked the Bones reference; my bad. We have now established a somewhat equivalent generational reference (Trek v1.0) for whatever significance that might hold. I think you should continue to develop Swap Torpedo as if you don't someone else will. I initially stopped in to offer a tip-of-the-hat to the balanced council that you have provided during initial exchanges with interested parties. Keep up the good work.
[Magisk] EarlyMon:
Ah. On my world we would say that I have been overthinking everything. :D Lack of sleep, getting ready for the holiday, and cross-switching to circuit B. :p

Many thanks my friend!
[Magisk] DB126:
Best wishes. Family first and always - especially during the holidays (double so if you have members of the previous/next generation sharing a meal at the same table; time passes far too quickly).

p.s. set phasers to stun :)
[Magisk] madbat99:
[MENTION=2682748]EarlyMon[/MENTION] nice work! See ya, Space Cowboy
[Magisk] EarlyMon:
Playing that Jupiter jazz! ;)
[Magisk] EarlyMon:
[MENTION=3694505]Telperion[/MENTION] [MENTION=3866104]yyz71[/MENTION] [MENTION=4281316]godofsalt[/MENTION]

And any and all others interested -

The new release candidate is at the bottom of the first post.

I expect it to work as usual for those without prior problems.

Now - it is possible that it still won't work for some. I can fix that but everyone will have to pay an extra second or two at boot time - so let's see how this goes.

Let me know and thanks for working with me on this! :)
[Magisk] EarlyMon:
Remember - if you think that the test version is still not working for you, check swap again after a few minutes.

Some phones WILL have a delayed or slower response.

Phones that were successful with version 1.0 ought to show no negative change in behavior with the test version.
[Magisk] EarlyMon:
Edit - unless something pressing comes up, test 11 posted above will be finished into the release candidate for the next version.
[Magisk] EarlyMon:
B

If you're interested, please try the release candidate at the bottom of the first post.

Thanks! :)
[Magisk] GreatLordAnt:
[MENTION=2682748]EarlyMon[/MENTION] still not working with either but your attempts are massively appreciated.