yashsingh1/xdaforums huggingface dataset:
[G2 and Desire Z Android Development] rirozizo:
ok so for the OFF of dataswap, i should just flash your OFF zip file?.... YES

or maybe just remove the 80dataswap file and reboot, right?... + REMOVE /data/local/swap file and REBOOT

———————————————————

i didn't mean to mock you or to offend you in any kind of way
[G2 and Desire Z Android Development] robuser007:
Does is also work on CM10 ?
[G2 and Desire Z Android Development] rirozizo:
interesting to see that several apps showed as com.* files in settings-manage apps... that's after several reboots

so now i suggest not to use it on GB... but we could use some testers

EDIT: removed 80dataswap and the swap file, rebooted, the apps went back to normal, i will not use it again on GB until confirmed by another user

———————————————————

i didn't mean to mock you or to offend you in any kind of way
[G2 and Desire Z Android Development] kbeezie:
Not sure how dataswap would impact the apps, unless you're talking bout the sd-ext (but I don't think you even use sd-ext).
[G2 and Desire Z Android Development] kbeezie:
You'd have to test it (thus why good to make a nandroid backup). But I couldn't tell you for sure.
[G2 and Desire Z Android Development] kbeezie:
I'm looking at the possibility of turning the zip into an Aroma installer, so can pick and choose DataSwap (64MB, 96MB, 128MB, Off), and SD-Ext (On, Off, Uninstall). Course there wouldn't be the possibility of creating or removing the SD-Ext partition, since that would just be too risky to do appwise.
[G2 and Desire Z Android Development] rirozizo:
of course i talk about dataswap man! we've established that i don't use sdext

———————————————————

i didn't mean to mock you or to offend you in any kind of way
[G2 and Desire Z Android Development] dragon-son:
Hey guys I've been running CM 7 2012-07-08 NIGHTLY with EliteKernel 120319 for a bit now, and was going to install latest CM7 nightly tomorrow anyways. So if you tell me what files to flash I'm down to try the data swap+sd-ext stuff on GB. Only moved back to GB because ICS was driving me crazy with the 30+ reboots a day. I liked the performance boost this gave to ICS though, so I'm interested to see how it would improve GB if any. Still have my sd-ext and at 2Gb it should be fine.

My sdcard is 16Gb UHS class 1, though I've not really seen a boost in what that can do over the regular class 4 one I had at 8Gb.:confused:
[G2 and Desire Z Android Development] rirozizo:
thanks for testing, but don't tr the sd-ext thing, just the dataswap, as auto sd-ext isn't working yet...

———————————————————

i didn't mean to mock you or to offend you in any kind of way
[G2 and Desire Z Android Development] Mnementh666:
Two quick possibly silly questions...

1. I hope you meant class 10 ;)

2. Have you checked your sd card cache? Some roms default to small cache, which I've found bottle necks the performance. Could be just me though.
[G2 and Desire Z Android Development] kbeezie:
1) No I'm sure he meant UHS-1 which is higher than Class 10. They stopped going above Class 10, in which case they're using the newer UHS (Ultra High Speed) Classes beyond that, starting with Class 1.

2) What 'cache' are you speaking of? Are you talking bout the read ahead value? basically /sys/devices/virtual/bdi/179:0/read_ahead_kb (SD Card Read ahead) would typically be around 1024. SuperChargerV6 typically around 4096.

By the way I'm finding this may help with DataSwap if your OS's default is zero:

echo "3" > /proc/sys/vm/drop_caches
[G2 and Desire Z Android Development] rirozizo:
don't forget to do

echo "1" > /proc/sys/vm/drop_caches

to let android start caching again...

or you can use Superchager's "enigne flush" option to do it for you (along with some info too)
[G2 and Desire Z Android Development] dragon-son:
Yeah I've got the UHS-1, but even when I set cache to higher values, I really only see it operating at the same speed as the old class 4 that I had. Tried some SD speed test tools and they say its operating at 8.3MBs writing speed and 32.3 MBs reading speed. Sometimes the test sho it spiking to 12 for the write, but average has been about 8.

Also had an accident with my laptop today it literally fell apart... like I opened it and the support hinge for the screen crumbled. I was able to get everything back together now so starting the flashing process, albeit several hours later than I was expecting.

So I will be making a nandroid, wiping everything with super wipe, installing latest nightly for CM7, latest Elite mod kernel for CM7, and then applying the zip from the OP here. Will report back when it's running again.
[G2 and Desire Z Android Development] kbeezie:
Speeds are of course dependant upon the slot. But yes I see between 7.5 to 9 mb/sec for the write on most roms, but I can get up to 14.5 on read pretty easily (no doubt due to the read ahead values.)

By the way if you are going to use his kernel then you should only need the dataswap mod from his ICS thread. Unless his kernel zip doesn't already support sd-ext.

Sent from my T-Mobile G2
[G2 and Desire Z Android Development] dragon-son:
Well it booted. Not sure how to check if the data swap and sd-ext are working. Market/Play Store is force closing. Tried fixing permissions in recovery, but still having issues with it. Going to install latest I can find on XDA, and see if that fixes it.
[G2 and Desire Z Android Development] kbeezie:
First post mentioned how to check with free and df command.

Typically need to clear cache and dalvik cache. And if persist, clear market cache via system settings -> manage apps.

If you're on gingerbread its less likely to work without some extra preparations of which I can't help much with.

Sent from my T-Mobile G2
[G2 and Desire Z Android Development] dragon-son:
Well I it looks kinda like it's working, here is what I got.

adb shell free

total used free shared buffers
Mem: 376624 372140 4484 0 26164
-/+ buffers: 345976 30648
Swap: 1114616 0 1114616

and

adb shell busybox df -hm

Filesystem Size Used Available Use% Mounted on
tmpfs 183.9M 32.0K 183.9M 0% /dev
tmpfs 183.9M 0 183.9M 0% /mnt/asec
tmpfs 183.9M 0 183.9M 0% /mnt/obb
/dev/block/mmcblk0p25
409.2M 114.9M 294.3M 28% /system
/dev/block/mmcblk0p26
1.3G 150.7M 1.1G 12% /data
/dev/block/mmcblk0p27
198.3M 45.7M 142.3M 24% /cache
/dev/block/mmcblk0p28
19.9M 13.9M 5.9M 70% /devlog
/dev/block/mmcblk1p2 2.0G 89.6M 1.8G 5% /sd-ext
/dev/block/mmcblk1p2 2.0G 89.6M 1.8G 5% /data/app
/dev/block/mmcblk1p2 2.0G 89.6M 1.8G 5% /data/app-private
/dev/block/vold/179:65
11.8G 2.2G 9.7G 18% /mnt/sdcard
/dev/block/vold/179:65
11.8G 2.2G 9.7G 18% /mnt/secure/asec
/dev/block/dm-0 20.3M 18.3M 2.0M 90% /mnt/asec/com.wulven.sha
dowera-1
[G2 and Desire Z Android Development] kbeezie:
Looks like it did on both parts, guessing you either had a small swap partition on the sd card or using zram for it to show roughly 110mb of total swap space instead of just the ~64mb dataswap.

Sent from my T-Mobile G2
[G2 and Desire Z Android Development] dragon-son:
That's a 1Gb swap on the sd card. Just checked that in recovery. Not sure the dataswap even took then. Also it shows 0 for used so not even sure it's using that.:confused:
[G2 and Desire Z Android Development] blk_jack:
Echoing 3 doesn't stop it from caching, if just dumps the cache. You shouldn't have to echo 1 to it ever..
[G2 and Desire Z Android Development] rirozizo:
ur the boss man!

but why the "ever"? does that make bad things to the caches?

———————————————————

i didn't mean to mock you or to offend you in any kind of way
[G2 and Desire Z Android Development] dragon-son:
Well the swap is at least working, I was running the command right after a boot. After running it again after phone has been on and is being used, the used starts to go up. Now I just need to figure out if it's the swap on the SD or if it's the dataswap. I guess I could use the off dataswap from niker and check to see if the number decreases. What do you think?
[G2 and Desire Z Android Development] rirozizo:
here, datasswap is 64MB (in "free" it's 65 i think)... so if your sdswap is bigger/smaller, you should see the difference...

if "free"'s total swap is more than 64-65MB then sdswap and dataswap are both on...

if it was sdswap's space, sdswap is only on

if it was dataswap's space (64-65MB) dataswap is only on

———————————————————

i didn't mean to mock you or to offend you in any kind of way
[G2 and Desire Z Android Development] dragon-son:
Currently it's showing this. Will try the dataswap off and report back again.

adb shell free

total used free shared buffers
Mem: 376624 313752 62872 0 7988
-/+ buffers: 305764 70860
Swap: 1114616 80 1114536

After using the dataswap off I have this

adb shell free

total used free shared buffers
Mem: 376624 372976 3648 0 2692
-/+ buffers: 370284 6340
Swap: 1049084 0 1049084

So a difference of 65452 I know it's there. Now I just need to know if it's using the dataswap space. Re-applying the 64Mb dataswap now so that it's there again. I think the easiest way would be for me to erase the swap from the SD card.
[G2 and Desire Z Android Development] rirozizo:
that's the 1GB sdswap running... i think dataswap isn't running.

ether way, try the OFF and report back... i may be wrong

———————————————————

i didn't mean to mock you or to offend you in any kind of way
[G2 and Desire Z Android Development] nik3r:
1114616 => 1114616/1024 - 64 = 1024

He has 1GB swap (insane) and 64MB DataSwap on.

128MB swap on SD is bad enough, your phone will bite dust soon with swap of that size. No app wil ever get killed, they will just add up and slow the whole thing down to a crawl, not to mention the constant I/O on SD card is really heavy on battery.
[G2 and Desire Z Android Development] rirozizo:
just cuz you're paranoid with swap doesn't mean you have to make us paranoid too...

you encourage that in your rom (except it's dataswap... kinda the same).

oh btw, i'm flashing your ICS rom tonight, since you trashed CM7 and now give (awesome!) support for AOKP.

———————————————————

i didn't mean to mock you or to offend you in any kind of way
[G2 and Desire Z Android Development] dragon-son:
So would you suggest that I kill off the swap in the SD all together then? That was my plan anyways to see if the dataswap was working. I know it's there I just don't know if it's getting used.
[G2 and Desire Z Android Development] Mnementh666:
Ah. Interesting. I obviously haven't been keeping up.

Little bit of research suggests that UHS isn't really going to improve anything in a non-UHS device.

Yeah, the read ahead value. I've found it set from 256kb to 4mb, depending on the rom. Most I've noticed drop it right at 1-2mb.

But those speeds are pretty stellar. I have a class 10 16gb in now, and it's pulling about 14/8 read/write. I think file size and sheer hardware bandwidth starts to limit the throughput on these poor devices above about 12mb/sec. Maybe. I dunno. :o
[G2 and Desire Z Android Development] kbeezie:
Well one of the major difference is that the access speed to the /data partition is much faster than the access speed to the Swap partition on the SD card, and with it used far more often you ultimately slow down the phone.

The swap is supposed to be a 'buffer' for little peaks of memory and lil bit of memory that you may wish to reuse in another app in the background and so forth. Setting it to an insanely high level doesn't really help the phone do any garbage collection and such to stale processes. Something like 64-128 data swap would keep the I/O higher and refrain from maxing out the I/O on the SD card (ie: when Swap and Sd-ext is being used at the same time).

It's more of a matter of I/O distribution to make it smoother and better at multitasking. I might start using zRam in mimicry 1.3.2 once it's been made available and see if that works out better overall in the long run.

But I guess it depends on your style of usage. But still anything more than 128MB SWAP on the SD Card seems a tad insane to me.
[G2 and Desire Z Android Development] nik3r:
I am not paranoid :D

These are facts and a lot of pain I see in EM ICS thread is self-inflicted by not understanding how Android manages kiling of inactive apps. As a matter of fact, swap is part of the formula (look up linux insight VM section) and thus instead of thinking you have 380ish MB of total RAM, the calculations for killing are carried out as if you had 1400MB of RAM. Means the apps will never get killed (unless the swap write buffer is full over the top at the moment and kernel choses to kill something instead of clogging it even more, but that is rare and it needs my tweaks in order to work. Namely setting smaller number of simultaneously written page clusters and tweaking overcommit and min memory).

EDIT: even worse if you have multiple swap storages like SDswap + DataSwap, the load is evenly distributed. That is because Android is missing key subsystem for swap load-balancing. Normally under linux you can set priorities for individual swap points.

Well I guess you can try and see for yourself, it's safe anyway :)
[G2 and Desire Z Android Development] dragon-son:
Well killed off swap on SD card. I made a back up of my stuff first, good thing I did as it wiped my fat32 partition. Got all the files back on SD card with the card reader before booting. Applied the 64Mb dataswap, and now apps wont load at all. Though I feel this was likely because of the way that I handled the formatting of the SD card, that it removed all the app data that was on the 4ext partition. So now I'm just reinstalling ROM and everything from scratch.
[G2 and Desire Z Android Development] kbeezie:
It would help to know what you came from, what rom, if you were using an sd-ext or not and so forth (ie: repartitioning with only a fat32 would have killed the /sd-ext partition and any apps moved to it).

The content of /sd-ext wouldnt' be accessible from your computer normally, and would need to be backed up via recovery.
[G2 and Desire Z Android Development] dragon-son:
I booted into linux and used gparted and wiped the whole SD card. So 100% certain it was due to that. Anyways got ROM and everything re-installed. I am seeing the dataswap there now, but still only 0 for used, but have only had a chance to run the command after a reboot. Will run the phone a while and try again and see what I come out with.
[G2 and Desire Z Android Development] kbeezie:
Ideally it's kind of a good thing that it's not really used much right away (also depends on your rom's level of swapiness, in elitemod its usually 40, may be 20 in others). Usually you have to actually start using some stuff like multiple apps at once to really start seeing it swapping. PS: You technically don't want it to swap all the time, rather be there as a buffer for when it's needed.
[G2 and Desire Z Android Development] dragon-son:
adb shell free

total used free shared buffers
Mem: 376624 330776 45848 0 9136
-/+ buffers: 321640 54984
Swap: 65532 284 65248

So it's working with the CM7 2012-07-29-NIGHTLY with the EliteKernel 120319.

So after all the tweaking of yesterday and using it all day today heavily, this was the end result.

adb shell free

total used free shared buffers
Mem: 376624 372864 3760 0 2172
-/+ buffers: 370692 5932
Swap: 65532 1116 64416

I wish this was just bundled default into all the ROMs. Antutu score was 4285. I'm happy with this. Thanks to niker and kbeezie for this amazing piece of programming for our phones.
[G2 and Desire Z Android Development] kbeezie:
UPDATED Aug 2nd 2012

Changes from previous version:

Migrated to Aroma 2.50 Installer

Removed SD-Swap activation from SD-Ext Enabler Script

SD-Ext Init Script made smaller (Specific to HTC Vision/G2/Desire-Z now)

Now with the Aroma installer allowing for an easier selection of mods to be applied.

DataSwap Enabler

64MB DataSwap (Recommended for some Roms)

96MB Option (heavier multitasking)

Skip/Off (do nothing, skip to next mod)

Remove (removes the swap file and swap script)

SD-Ext Enabler

Enabled (detects and migrates /data/app and /data/app-private to /sd-ext)

Skip/Off (Do nothing, leaves as-is)

Revert (Moves all apps from sd-ext back to /data and removes script)

The SD-EXT Enabler no longer automatically enables SD-Swap (disabled in case you already have SD-Swap enabled, or have another means to do so, also cuts down some confusion since that ability was not originally advertised)

Original Post updated with new download attachment.
[G2 and Desire Z Android Development] kbeezie:
PS: I've tested SD-EXT support to work on Flinny's build #39 of the JellyBean rom, however DataSwap will not work (it will create the /data/local/swap).

Mainly because it has this error on the swapon command:

swapon: /data/local/swap: Function not implemented

So doesn't look like the swapon command is implemented yet on that, even though the swap file can be created.
[G2 and Desire Z Android Development] robuser007:
Can't migrate data with aokp (rom related?): all my apps are lost after installing this/s2e.
[G2 and Desire Z Android Development] kbeezie:
I need more information. df output, does /sd-ext show, partition type, what exactly you did, which rom, so on.

Far as SD-EXT installation goes, it only installs the script from the installer. It's the script that does the migration from data to sd-ext.

It's the Revert one that moves from sd-ext to data within the installer itself.

by the way your latest "AOKP" link in your thread goes to the JellyBean Test thread, which is NOT AOKP.
[G2 and Desire Z Android Development] rirozizo:
so if i understand correctly:

NOTE: i don't have sd-ext... this is just an example:

if 'a user' has sd-ext, and he flashed EliteModICS, which has the auto-sdext enaber script... so all his apps will go to his sd-ext... ok.

now if that 'user' doesn't want his apps on sd-ext, he just want's it in /data and wants to keep sd-ext empty (don't try to convince him). he could flash elitemodICS and then launch your AROMA and press the revert button? will that work?

———————————————————

pm me if you need any app... ANY app
[G2 and Desire Z Android Development] kbeezie:
On elitemod it would not work. Once the user booted up EliteMod again, it would detect the empty sd-ext and start migrating /data back to /sd-ext, only way to keep the memory internal would be to re-partition the SD Card to not have an sd-ext (and as a result not an swap partition either or it'd break, since it assumes the second partition is always an sd-ext).

Any other rom that only had the script to enable sd-ext in the first place, that would work because there would be no script to detect-and-install apps to sd-ext after the removal, but on elitemod, this functionality is built in and always there (I suppose you could remove the 04sdparts from /system/etc/init.d on elitemod before booting back up, but youd' also lose sd-swap support then).

In a nut shell there's no way you can do it on EliteMod without a little elbow grease involved (ie: manually removing or altering the init script that comes with it).
[G2 and Desire Z Android Development] kbeezie:
I've uploaded version 1.1 with the following changes:

Fixed a bug where 96MB option installed 64MB

Added 128MB DataSwap Option

Added ability to enable SD-Swap

With the Sd-Swap option, it's important to know whether or not you have an SD-EXT partition on the SD card, even if you are not using it. Because with the partition, the swap partition is the 3rd on on the card, otherwise it's the 2nd one. This distinction installs a different script based on that minor difference.

Also if your rom already supports SD-Swap out of the box, do not bother to enable SD-Swap for obvious reasons (EliteMod ICS for example does both SD-EXT and SD-Swap out of the box).
[G2 and Desire Z Android Development] ernestnwanu:
I'm currently on Elitemod, want to try out Mimicry. Does it support SD swap out of the box or do I need this? I have an SD-EXT. Thank you.
[G2 and Desire Z Android Development] kbeezie:
From what I can tell, mimicry doesn't support SD swap out of the box (blk_jack actually advises against using SD-Swap entirely as does nik3r of EliteMod, despite the latter still supporting it automatically).

Last time I bothered with SD swap was because I wanted to try out some heavier roms (virtuous infinity [full sense 4.0] for example) with swapping, so I had created a sd swap partition and manually enabled it in those cases. but in daily use I don't have a swap partition on my SD card at all. Seemed far more beneficial to use zRam (which is included in mimicry, sort of a redux compcache), or dataswap than it is to use the slower sd-swap.

PS: The SuperchargerV6 option in the mimicry installer installs the 'multitasking' profile for it, so it should take *some* advantage of swap space be it zram, dataswap or sd-swap, just not as heavily as it would without supercharger enabled. Ideally you want to refrain from swapping, the main reason to have it is for peak situations and you don't want to be force killing everything in a hurry.
[G2 and Desire Z Android Development] ernestnwanu:
You seem to be quite knowledgeable when it comes to these mods. Are you saying that I should just stick dataswap? (Used it on Elitemod). Do you recommend the set up in your signature?
[G2 and Desire Z Android Development] kbeezie:
Ultimately it depends on your usage style.

I might be disabling zRam and sticking with straight DataSwap. Right now with the 96MB + 10% zRam (approx 37MB), I have about 79MB of swap used in my free output after roughly 3 days of usage (it goes up and down depending on what's being used). But I'm finding that zRam with SuperCharger seems to have some issues as it's not treating it like a normal swap file (and is expecting the zram to be able to grow/shrink).

The highest apps using the swap space were:

(phone, kineto[wifi calling], smspush, swift key etc, mostly system-processes)

But yes if you plan on using just dataswap, the 2GB Sd-EXt approach on the SD Card compliments it. You may notice higher swap usage than say on EliteMod primarily because of the configuration differences he sets in the EliteKernel config (different swappiness, oom settings etc).

I do know that on mimicry under memory management, you do want to have "Kernel Samepage merging" enabled.
[G2 and Desire Z Android Development] kbeezie:
Updated to v1.2

v1.2 Changes from 1.1

Added addon.d support for supporting Roms

In roms that support /system/addon.d, during an upgrade (flashing a new rom) shell scripts in /system/addon.d would be utilized by the backuptool allowing the ability to upgrade the rom without having to re-flash the extra roms.

For example in my /system/addon.d/ folder there will be a 60-kbeezie.sh script when flashing version 1.2. If you were to upgrade your rom (for example Mimicry 1.3.2 to 1.3.3), the dataswap, sd-ext, sd-swap init scripts will be backed up, and then restored after the new rom has been upgraded (the same way google apps is preserved in the 1.3.3 upgrade, so no need to re-flash google apps).

So on any roms that support addon.d, you'll be able to upgrade your rom to the next version without having to reflash the dataswap/sd-ext enabler.
[G2 and Desire Z Android Development] rirozizo:
nice! how do you come up with these? where did you learn all that?

———————————————————

pm me if you need any app... ANY app
[G2 and Desire Z Android Development] kbeezie:
Well the addon.d support was something blk_jack fixed in mimicry 1.3.3 (currently only available for testers, it's RC4 right now), making it where it'll support the google apps script as well as the cm.sh script in addon.d, and as expected when upgrading from 1.3.2 to 1.3.3 it preserved both my hosts file as well as google apps.

So I thought well this would be nice for the sd-ext/dataswap enabler, more so for SD-EXT because I can only imagine the pain of upgrading, then booting up without remembering to re-flash the enabler and then be like 'crap my apps are gone lol'

Though naturally any rom that doesn't support addon.d (which seems to be a lot of them since you gota re-flash google apps afterwards each time) will still need to reflash the enabler.