yashsingh1/xdaforums huggingface dataset:
[HTC Sensation] LocotesKilla:
Hello, try my rom cleaner script :) It should be compatible as both ViperS and Revelation rom are the same, just ViperS has extra stuff.

Just edit it to your needs and see how it goes. A proper script for Revelation is in the pipeline too.

Good Luck :)
[HTC Sensation] Sprint82:
Ah Ok I must clean up some apps from system to get 110 MB free on system? Otherwise it won't work?
[HTC Sensation] LocotesKilla:
Yup. Let me know if you use it and it removes enough for you... Post it on my thread please :)

Edit: Luckily for you... I have some free time right now so I am making the Revelation script!

The Aroma configs for ViperS and Revelation are surprisingly different... the scripts will really work well for both roms.

Will be posting it soon.

Edit: Revelation script now done :)
[HTC Sensation] hinxnz:
It must be to do with the priorities of swap, make a nandroid backup and upgrade busybox with some other options in the installer.

It is MultiSwap been edited and basically the same as v1 but you will run into lags with it. I'm releasing another update soon with improvements :)
[HTC Sensation] LocotesKilla:
Updated Rom Cleaner Scripts!

Big update actually...

Now added script for Revelation JB

Also new options and better descriptions added in ViperS script

Enjoy!

Both Roms are really different in what they install by default and what their Aroma installers remove... so it was really worth doing

Hizinx, update your OP post, thanks :)

Also, I wish someone would notice the updater-script with fixes for ViperS Aroma I've posted on their thread!
[HTC Sensation] hinxnz:
Cheers :) Added to OP. Send the updater-script to ivicask, either mention him in your post in ViperS thread by adding @ before the name or/and send a PM, he's the man for that. He'll add it if he thinks it needs be otherwise it may already be fixed for next release.
[HTC Sensation] LocotesKilla:
Ah, thanks :)
[HTC Sensation] Vegio:
Hi there, I'm on VipersS 3.1.2... The MOD is not working at all for me.

I have 140+ MB free space on /system and I format cache before flashing, but once I boot up the phone I can just type my PIN and then it reboots...

Any hint?

Thanks :)
[HTC Sensation] hinxnz:
Sounds strange. Maybe something went wrong in recovery, just use the removal zip to remove MultiSwap and see if phone boots up normally then, if so something went wrong during installation. It's possible and this is why I mention in OP and during installation to make a nandroid backup as sometimes installations can go wrong. If still the same then it was a coincidence this happened and just restore your nandroid. Instead of downloading and trying again straight away I will be releasing an update in about half an hour or so and try again then.
[HTC Sensation] Sprint82:
I haven't tried the rom cleaner yet, but I don't think it will work because I have 0 MB free on system partition and there should be deleted more than one app in that case. Hmmm
[HTC Sensation] Vegio:
I made two nandroids before flashing so this is not a problem...

I tried a few days ago with 3.5 and now with 4.1 but in both cases I have the same result... It just keeps rebooting!

I know it is strange but I have no clues... I don't have any strange settings, just a clear installation of ViperS

Thank you so much for your support ;)
[HTC Sensation] hinxnz:
Your welcome :) Still strange to me though as I am using this ROM too. You also can try the Sense version if you like, it's the same but without the modified LMK values added to the JB Sense version. Report back if you decide to try. I'll be uploading new versions very soon too.

You'll be surprised how much you can gain by removing that's not needed, just make a nandroid backup first. v3.x doesn't use System partition if you want to use or stick with that version.
[HTC Sensation] hinxnz:
OP updated with new v4 versions for all :)

- Now all the new v4 versions have 400Mb of swap, using 8 swap files with 2 different priorities (4 initial active swaps, then when needed the other 4 are used)

- All v4 new versions have swappiness set to 100% (can be change to 80% with flashable scripts supplied in OP)

- All v4 new versions have a raised LMK cost value of 64 (default is 32)

- Adjusted LMK adj value in the JB Sense version (4.2)
[HTC Sensation] cutejerk420:
I wanna ask an unrelated question now will undervolt work for revelations rom?
[HTC Sensation] rzr86:
it is not supported yet by the kernel
[HTC Sensation] Vegio:
All right mate I just flashed the latest version and now everything is fine and smooth! :victory:

Thank you again and congrats for the good work :good:
[HTC Sensation] sepsep 21:
Hi. Can I use this mod on one s s4? Tnx.
[HTC Sensation] rzr86:
i am not sure but probably not
[HTC Sensation] Sprint82:
I think the partition layout is different so the mods shouldn't work. Maybe?
[HTC Sensation] hinxnz:
I'm not sure at this point of time, the zip package probably needs to be made universal for other phones but in a terminal emulator enter code and either copy and paste the content or take a screenshot.

df /cache /vendor/firmware/misc
[HTC Sensation] www69:
In system partition, only 2 swap has been created

u forget the dot "."
[HTC Sensation] hinxnz:
Thanks :o I must of over looked it and I'll fix it as soon as I get home and re-upload it. I can't edit it on my phone and will post when done so for others.

Edit: Okay CM v4.1 is now fixed and uploaded :good:
[HTC Sensation] Sprint82:
I have a problem with the swap as everytime I use a swap (this one and with the turbo Boost mod too), I get heavy lags after some time using the home key to switch the apps.

I looked at the terminal and could see that of 286 MB swap that was created, only used round about 150 MB.

Why everytime I get such big lags, very heavy so I must pull out the battery? (have to wait minutes till the device reacts to my commands!!)

I want to use swap but no matter what swappiness I try it's running not fine...
[HTC Sensation] hinxnz:
Sounds like you are running very low in RAM that causes this, try version v4.2 if you can. Are you running KSM? What apps are you running to cause this?

Sent from my HTC Sensation
[HTC Sensation] Sprint82:
Very low RAM? How can it run into low RAM if the swapfile isn't full?

I'm using already version 4.2 however it doesn't work at all, at first everything is fine, smooth and perfect but after some time it becomes more and more laggy.

I don't use KSM because I think it is useless if using swap, isn't it?

what apps? hmm.... several. Browsers, tapatalk, weather, message, whatsapp, and so on, nothing really heavy I think. I don't understand why it is with this mod and other mods the same problem on my phone, is it broken or what?
[HTC Sensation] hinxnz:
Nar not your phone it's the HTC One oom (memory) management implemented in the lastest version of kernel of JB Sense this is why I originally made this mod as it seems Seb thinks there isn't a issue with it :o Even though there's been so many reports and many don't report because it already has been reported but I find this mod helps a lot to avoid this. That's why I ask what apps caused this as you are having memory leaks that I'm not experiencing. I don't use KSM see if it helps but first edit the script 93multiswap in /system/etc/init.d/ and change the low memory killer 'cost' value from 64 to 16 and see if that does the trick, save it and reboot. What this does it speeds up the scanning process of the LMK and should free up RAM quicker. I raised it from 32 to 64 to improve multitasking in the latest versions. Report back your outcome.

Sent from my HTC Sensation
[HTC Sensation] Sprint82:
Ok, I will try it with editing the LMK cost value from 64 to 16 and report.

I thought everytime, that the swappiness 100 is to high, but every swap mod uses this value, so it must be correct. Decreasing the value to 80 or maybe 50 makes the feeling better but thats not the reason for lags I think, right? is the swappiness value important? so must it be at 100?
[HTC Sensation] LocotesKilla:
My Fiancée decided to play Can Knockdown 3... it's laggy as hell with the latest swap mod...
[HTC Sensation] Bornin:
Same with hill climb racer. Uninstalled mod and fps are up to pace again
[HTC Sensation] LocotesKilla:
I see, might try going back to 3.x and see what happens to it
[HTC Sensation] hinxnz:
Thanks for reporting will look into it, I tried making it more multitasking friendly but obviously had an impact on performance. Not much of a gamer but will test with these games too. Is v3 better?

Edit: Just installed and played Knockdown 3 and was smooth as, I'll play it again a few more times later on and see what happens.

Edit: Hill climb racing plays fine here, but will try later on again to see if it plays good in other scenarios.

Sent from my HTC Sensation
[HTC Sensation] LocotesKilla:
I am a moron, I had Power Saver turned on, killing the smoothness of Can Knockdown 3. Nothing to do with MultiSwap v4.x. Sorry lol.
[HTC Sensation] Bornin:
Hahah, and i installed swap again and guess what? Nog lag sir. Dunno but sorry :o
[HTC Sensation] Sprint82:
I decreased the LMK cost value from 64 to 16, rebooted and tested a few hours.

It feels fluid so far but I got a reboot of the sense Ui after closing a game. Is it right behavior of my phone and has to do with the LMK cost value?
[HTC Sensation] rzr86:
probably it doesn't stay locked in RAM and as a result while playing a game(which requires a lot of RAM)it gets killed by LMK

if i am not wrong
[HTC Sensation] hinxnz:
Yeah it would as the RAM is being freed up quicker, it really depends on the game or app if it uses alot of RAM it can do this from the LMK adj values set. Also swappiness can be set to any percentage, using 100 will swap all pages out of RAM when needed, you can set it to any value under 100 even 10 but this will take less advantage of swap. You could try LMK cost values between that too such as 20 or 24 for example any number really though just depending on your usage and apps to try to get a balance.

Edit: Also if the LMK cost is too low this can cause the oom killer to free up ram before it gets a chance to write pages to swap which takes up ram itself.
[HTC Sensation] Sprint82:
And that means what? Set cost up to 24? It sounds complicated for me, I don't know if I understand all of the oom, LMK and swap settings and what they for.
[HTC Sensation] hinxnz:
It might sound a bit complicated but it's not really just matter of getting to know the basics of it, when I find some more time I'll try find some simple explanations or if someone knows of some nice and plain explanations already on any site on this subject so that I could add the links in OP to help people that unsure to understand better, it's always easier to know what things are for. I would suggest raising it up by 4 each time till you get a good balance of smoothness and not such a vicious scanning of LMK (oom killer) that kills background apps/processes. I'd start with 24, normally stock is set at 32. I set it at 64 to improve multitasking. The higher you go the less vicious the scanning will be.
[HTC Sensation] Sprint82:
and the more apps stay in RAM, right? with higher value it earlier could get memory leaks?
[HTC Sensation] hinxnz:
Possibly, leaks can be caused by apps/processes and kernel memory allocation.
[HTC Sensation] Sprint82:
ok, so I have to find out the best values for me. I hope anyone can explain me the things about LMK and so on....
[HTC Sensation] cupitoa:
"Multiswap removal" link at first post does not work.
[HTC Sensation] rzr86:
it does work from attachments;)
[HTC Sensation] cupitoa:
TRUEEEEEEEEE :D

Thanks
[HTC Sensation] hinxnz:
Fixed :)
[HTC Sensation] hinxnz:
OP updated with v4.3 for Sense JB ROM's :)

- Just a minor update with adjusted LMK cost and minfree values (For speed but slightly less multitasking. If your happy with previous version, no need to upgrade)
[HTC Sensation] Sprint82:
What are the values now?
[HTC Sensation] Gramzz:
I'm using 4.3 version on Viper 3.1.2 and i have to tell that IMO this is the best version. I've used all version of hinxnz MOD from the beginning and i've waited until now to give You feedback.

I have a lot of free ram 150-160 MB, i have very good multitasking and i didnt see any lags.

Thank You so much for You hard work hinxnz ! This mod is excellent.
[HTC Sensation] trabadura:
MultiSwap mod

Hello, I use ViperS JB 3.1.2. After installation of the Swap Mode 3.5,4.2,4.3 begins restart Sense, freezes the screen and any other bugs. If anyone can help?
[HTC Sensation] rzr86:
did you use the removal.zip before changing versions?

if not do it and then install whatever version you want
[HTC Sensation] trabadura:
MultiSwap

Each time before switching give wipe cach and develik, then removal.zip before changing versions.I have 111mb system free.
[HTC Sensation] rzr86:
do wipe dalvik + cache after multiswap installation

also do you have busybox installed?
[HTC Sensation] trabadura:
MultiSwap

Yes each time after installation do wipe dalvik + cache. I have installed BusyBox and update through Smart Install.
[HTC Sensation] hinxnz:
No need to install busybox updater on ViperS. Use the removal zip then reboot, then boot into recovery and install Multiswap again without wiping anything. Reboot and give your phone 5 minutes to settle, then see. If you are still having issues I suggest you flash ROM without wipe or use the restore option, remove the your unneeded system apps and then install MultiSwap without wiping anything and not installing busybox as the one that comes with ViperS is fine.

Edit: If you have KSM enabled in tweaks, disable it.

minfree:

9933,10728,14950,17510,20019,31385

cost:

30

Great, thanks for your feedback :)
[HTC Sensation] iphuang:
This swap mod works. I am running Revelation 1.0.2. and installed MultiSwap v3.5.

I am just curious why this mod works better than Turbo Boost (swaps on /cache, /system, and /data).
[HTC Sensation] hinxnz:
Possibly because of the LMK values added, multiple swap files, different read/writes cycles but not entirely sure as I haven't looked at it yet :)

Sent from my HTC Sensation
[HTC Sensation] iphuang:
To make things better, this mod is amazingly small. The zip file takes only 152k.

Although it is small, it makes a big difference.
[HTC Sensation] cutejerk420:
Yeah. Like people always say. Quality is better than quantity.
[HTC Sensation] Sprint82:
+1

Me too, I have freezes (especially with swiftkey, it crashes and I have force to stop it because it stays on screen but I can't type anything) and random reboots, also the device is getting very hot after the freezes and reboots.

I use ver 4.3 For JB Sense.

Help :(
[HTC Sensation] hinxnz:
Install v3.5 it has slightly different settings and then see how it is and report back thanks, I haven't experienced this. If your getting hot reboots this maybe caused from your RAM getting to low, same with freezes etc.

Edit: Try your results by flashing this first if still on 4.3 -> http://db.tt/w54iCz0L

Edit: Try this on 4.3 -> http://db.tt/rEDUjTix If you still have an issue then try v3.5 to see if reboots persist. Otherwise I suggest you use the Sense based one as something in your configuration or third party app is conflicting with it. Make sure KSM is not running too.
[HTC Sensation] Sprint82:
I installed the zip from your dropbox and wanted then to download a app from the market it ends with a random reboot. Hmm...

Also I got lags as well and it closed foreground apps i am using. Now I uninstalled it completely.

3.5 is better you mean?
[HTC Sensation] McLongDong:
Mod Workaround

I just want to commend you on your excellent work. My phone is now a lot smoother, quicker, and last longer due to your mod. This mod is absolutely compatible with Vipers JB unlike Turbo Boost. The only problem I have is that installing this mod prevent adblock app from installing the binaries because of "insufficient amount of space in the partition". Any workaround?
[HTC Sensation] hinxnz:
Thanks for your feedback, here is a version linked below with slightly smaller swap files on system that will allow you to install the adblock host files, also slighty adjusted LMK adj values as I will be updating v4.3 soon with it too :)

MultiSwap v4.3.1 -> http://db.tt/sATDamBb

Edit: No need to use the removal zip either, just flash in recovery and the updater script inside takes care of the previous version.
[HTC Sensation] rzr86:
How much free space is required on /system partition in order to use this version?
[HTC Sensation] hinxnz:
100Mb but it also sizes down the swap files on cache too as these have to be even. How much space do you have on system available?
[HTC Sensation] rzr86:
Only 84mb free
[HTC Sensation] hinxnz:
Here you go :) MultiSwap v4.3.2 -> http://db.tt/gq8O3Wx3
[HTC Sensation] rzr86:
I realized you were probably planning to do something

i really appreciate it mate:cool:

Thanks a lot.I will install it tomorrow because now it is time for sleep hehe:)

Also don't you think it would be a good idea to make a few scripts for some values in /system partition since this is the one which has different free space for every user in viperS and revelation Rom?

Just an idea

Again thank you
[HTC Sensation] hinxnz:
No worries :) I could look into this for the future but at the moment is why there is 2 versions (v3 & v4).
[HTC Sensation] rzr86:
Yeah but in v3 AFAIK there are no swap files in /system

That's why I mentioned it;)
[HTC Sensation] hinxnz:
OP updated with all new v3 versions for all & v4 updated for JB Sense :)

- v4.4 for JB Sense has minor LMK adj values adjusted

- All v3 versions now have 6 swap files instead of 5

- v3 for JB Sense now has added adjusted LMK cost value & minfree values also adjusted
[HTC Sensation] McLongDong:
Alright. I will give it a go and report back when I have a chance. I will mention it again, this mod is far more superior than turbo boost on ViperS JB. Is this one the same with v4.4?
[HTC Sensation] topjohnwu:
Yay, rolling back to v3 since the LMK and minfree is updated :)
[HTC Sensation] Sprint82:
I had to uninstall it completely because my device seems to be unable to handle swap.

I took a look to my sensation after hours that wasn't used and the swap was filled up to over 230 MB of 287 MB. I opened an application and the device stuck and freezed, then it got hot. And of course I used a cost of only 20.

I had to pull out the battery for a reanimation. I don't know why it doesn't work for me and for others it seems to be fine.
[HTC Sensation] magic.hand:
Not sure if this makes sense or not, but ever since I installed V4.3, my battery draining out fast. I checked the utilization, most taken by kernel.
[HTC Sensation] topjohnwu:
I've tested and found out that v4 is much faster than v3. Is it because of swapping speed?? The performance differs a lot between both versions.
[HTC Sensation] hinxnz:
I haven't really noticed this at all but if you think it is, maybe of the LMK cost value lowered but wasn't much to affect battery life so much. You could try this flashable zip to see if battery life goes normal again but could easily be a placebo so try test with an battery measurement app if you can.

Yeah I notice this in a way, they both act differently. I find v3 swaps faster but RAM drops lower with it, which is due to the partition used causing the phone to run slower making v4 quicker and more stable as RAM stays more at a safer and quicker level but swap is slightly slower. This is hard to measure though as it maybe the same speed and just a placebo but what definitely makes v4 quicker is that RAM doesn't drop so low. I may need to raise minfree with v3 or set two priorities to try speed it up. The byte size for read/write for swap is the same for both.

How come you have 287 did you check if all swap files were created and active?

Use the code below in terminal to check the individual swap files.

cat /proc/swaps

And to check the total in kilobytes enter

free
[HTC Sensation] Scramjet:
Sorry about this, but I read the OP; however, I still don't really understand how this improves RAM. Can someone please explain? Thanks in advance.
[HTC Sensation] hinxnz:
If you have JB Sense either ViperS or Revelation, I have added LMK values to help with RAM in conjunction with MultiSwap :) This is noted in OP too.
[HTC Sensation] smint86:
Tried to install CM v4.1 on CM10.2 by sultan (v 09/03), unfortunately it did not work. I checked free system space, which was above the wanted 220mb, around 400 to be clear. After flashing the zip in recovery, the free space in system shrunk to around 160mb or so (don't remember the exact value though). 'cat /proc/swaps' did give me a blank line as output, 'free' showed three zeros '0 0 0'. So I guess something went wrong, anybody knows what?

Swyped via Tapatalk
[HTC Sensation] Sprint82:
Here I made a Screenshot of the terminal. As you can see 287 MB swap.

I don't knowledge why the device is snappy the first time after install and after a few hours/days it becomes laggy, heavy lags so I have to pull battery (I still wrote about the phenomenon).
[HTC Sensation] rzr86:
redownload the script again and flash it
[HTC Sensation] McLongDong:
Really simple. You need copious amount of RAM for a phone to be stable, so essentially, more is better. However, Sensation is only packed with 512MB of RAM compared to the 1GB RAM in newer phones. So to compensate for RAM, swap files are created to extradite speed. There are many ways to create this but primarily manipulating cache, data, and system. Therefore by allowing the phone to run more smoothly helps improve battery life. Here's an analogy. When driving on the highway without any interruptions or stops will save you more gas opposed to running into traffic every 5 minutes or so.
[HTC Sensation] hinxnz:
The busybox you have installed doesn't support priorities so you need to update busybox, using Stericson Busybox Installer from Play Store and choosing the Smart install option once installer has loaded up. Then reboot after upgrade, then check in terminal. This was stated in trouble shooting in OP :)

You didn't check your free space in system before installing as mentioned in OP and in the installer. There wasn't enough free space in system to create both of the swap files, so you will have a different result as swap files weren't running how they are meant too. You need 110Mb free space in system, check this by entering code below in your terminal emulator. If your sure you can't remove anything else not needed in system with either using ROM Cleaner with the ViperS JB Cleaner Script/Revelation JB Cleaner Script or Titanium Backup, report back how much space you do have and I'll create one for your needs but you will need at least 80Mb free. You could also use v3.x but with your usage as it seems, you will need more required swap space.

df /system

Edit: I'll be releasing a new improved version of v3.x soon so maybe it will suit you better ;)

I got it going just as quick now :highfive: will release as soon as I can do them all...
[HTC Sensation] magic.hand:
Just reflashed vipers 3.1.2 again. My battery looks stable again. Didn't get the chance to try your fix earlier.

Edit: Additional question, do you. guys enable KSM (for vipers)?
[HTC Sensation] BrainRex:
Can I flash this mod on the miui ROM?
[HTC Sensation] Sprint82:
Hmm I can't free up 110 MB in system, I don't know how. With the Rom cleaner it didn't work. Don't know which apps I can remove so the system is still working without FCs.

And without those free space it won't work?
[HTC Sensation] hinxnz:
Yes you can, just choose the appropriate one if it's Sense or CM based, if your going to choose a v3.x version I will be updating this version soon.

Yes it won't work properly if installing v4.x version with not having enough space but I will be releasing a new version soon for v3.x as I said earlier so you can install that when I release it soon. Then you don't need to worry about clearing system space for it.
[HTC Sensation] Sprint82:
Thanks man! I hope the new version will be fine for me (my device).
[HTC Sensation] hinxnz:
OP updated with new improved v3.x versions. Enjoy! :)

- Now they have 8 swap files too

- Two priorities now set

- LMK cost values adjusted for Sense & CM versions

- Removal zip updated for new v3.x versions