yashsingh1/xdaforums huggingface dataset:
[G1 Apps and Games] ex87:
Hello! Sorry for delaying with answers, haven't much time, too much other things to do...

After restart all system settings are back to default.

There is no default swap file.

I haven't tested this, it's theoretically working, but I haven't made mod myself. I'm now waiting for new SDHC class 6 card from ebay, will mod and test it. At the moment I have slow SDHC card. Swapper + mod will be too much for it :(

If you can, please check (after launching swapper swap on), do you have file named swapfile.swp in /system/sd.
[G1 Apps and Games] happyface_0:
This works great, I'm using 16mb/10swappiness on a class 2 and it works great with no crashes thus far!
[G1 Apps and Games] G1-evolve:
is this bad for your SD card? Because it says " * SD card will be used as swap space. It can (and will) shorten SD card lifespan. "
[G1 Apps and Games] karloe:
Yes, it is bad for your SD card, you "quoted" that sentence from the OP.

SD cards have a limited write cycle (10.000 or 100.000 times per "sector"), using it for swap in a specific region will shorten your card life.
[G1 Apps and Games] bmk789:
Is it's speed partially limited by the swap being on top of a filesystem? Would it work faster if it used a separate swap partition on the card or is performance only limited by the speed of the card?
[G1 Apps and Games] bengrulz:
will this app be updated to support android 1.5 (cupcake)??
[G1 Apps and Games] ollip79:
version for 1.5 would be great.. i hate how using the browser kills services like meebo all the time :(

it was way better with swapper
[G1 Apps and Games] Gimpeh:
The program seems to work fine with 1.5 dudecake.
[G1 Apps and Games] Gimpeh:
There has not been a update on this app in quite some time.
[G1 Apps and Games] Gimpeh:
So it in fact is not working correctly with 1.5. I thought it was since my system appeared to work better with the settings I set but I was incorrect. I sure hope we get a 1.5 compatibility update soon.
[G1 Apps and Games] Sistum Id:
I thought it was working as well. But after two wipes and a complete wipe (back to rc29) and a few damaged sdcard messages. I'm under the impression that its not that safe for 1.5... Unless I'm using it wrong.
[G1 Apps and Games] MartinFick:
compcache

It would be interesting to see if this could be extended to use compcache:

http://code.google.com/p/compcache/
[G1 Apps and Games] Gimpeh:
I was just reading up on that and I concur. That would be a pretty awesome app to have. First things first, we need 1.5 compatibility.
[G1 Apps and Games] MartinFick:
OK, so what is actually wrong with it with JF1.5. As you said, it looks like it works. Am I going to suddenly see my apps crash, are airplanes going to fall out of the sky, will I suddenly have women flocking to be with me, or what? ;)

Strange a search reveals that at compcache was in the JF1.3/1.4 builds:

http://andblogs.net/wp-content/uploads/ChangeLog-RC30.txt

but yet I don't see it in the JF1.5 builds. Could it have been removed because it didn't work in 1.5?
[G1 Apps and Games] ggolemg:
*bump*

We need to at least give this a go on rosie, I couldn't get it to work at all.
[G1 Apps and Games] ex87:
1.5 compability

Hello!

I'm now "back", will soon set up 1.5 sdk and will try to make swapper 1.5 compactible. Sorry for this long delay.

I have got some interesting ideas how to improve swapper speed too.

Main thing that I need is mkswapfs binary, because 1.5 builds rarely contains it(haven't tried to push 1.1 version binary, it's possible the best solution for now).

I think I'll rewrite program to create swap file once and swap recreation will be optional (swap starting time will be less than 1 second but file will be in intensive use).

Other thing what users requested was autostart. Is it nessesary?

I hope update will be available next week :)

About compcache - if anybody can help with it ,I could integrate it in swapper.
[G1 Apps and Games] Gimpeh:
Thank you so much for your hard work and contribution to this community!
[G1 Apps and Games] Seoulboy1:
I've been waiting for an update of this and I'm so glad your back to update this. :D Thank you ahead of time for your hard work.

I was wondering if the you write the program to not create swap file each time, how would that affect the sd's internal wear lvling? I'm sorta clueless on how sd's work, but curious nontheless.

Also it seems that most dev's that are working on new updates for their roms are moving to ext3, which is what I'm on with cy's 3.3.6, and was wondering if this new update will be built with ext3 option possibly. I guess it's not completely necessary unless ext2/3's performance is faster compared to using fat32 for swap since I can just stick the swap file on my fat32, but I'm not sure if it is or not.
[G1 Apps and Games] dwang:
How about an option to have swap space reside on the internal flash?

Since I have apps2sd, I have plenty of internal flash space that isn't being used.

Putting the swap space in flash would reduce the sdcard wear.

The current version doesn't seem to work with swapfile in /data. It creates the file but its not used or something.

Another option would be for the swapper file to reside in the /cache directory.
[G1 Apps and Games] MartinFick:
Hmm, seeing as this will wear either one, and the sdcard is at least replaceable, putting this on internal flash would be a really bad decision.

Again, due to above, you are much better off putting your apps back on the internal flash and using your card for swap. The apps should cause a lot less wear on your internal, hard to replace, flash than the swap will.

I believe that /cache is just a RAM disk, if so, putting swap there would kind defeat the purpose of swap. ;)
[G1 Apps and Games] ex87:
As far as I know - /cache is mounted from internal flash, it's not RAM disk.
[G1 Apps and Games] MartinFick:
You are indeed correct, I just checked /proc/mounts. Obviously, the same "wear" problem should be of concern if using /cache then. I "ass"-umed it was RAM since it is cleared on reboot. :)
[G1 Apps and Games] MartinFick:
Hmm, this does lead to another thought though... since /sqlite_stmt_journals IS a RAM disk, a desperate soul could move that to the sdcard (or internal memory: really bad wear). If they do, they could gain about 4M of RAM, tiny, but perhaps a substancial % increase of useful apps memory. Of course, this is likely to make any operation using sqlite dirt slow! This would be a last resort suggestion for those who need RAM to complete some task that is currently impossible if they can't get swap to work right.
[G1 Apps and Games] ex87:
Swapper 0.0.6a

Hello!

Here is quick fix build for 1.5 roms (it needs busybox binary).

http://swapper.n3o.lv/lv.n3o.swapper_0.0.6a.apk

Please test this build and post reply - is it working or not and which rom do you use.

Thank You!
[G1 Apps and Games] bengrulz:
Thank you for updating this! I have a question though:

Would it be possible to make this ONLY swap for certain programs (ie Browser.apk and Launcher.apk)? I feel like the swap still creates more random hangs when using the phone as normal than it fixes, but I love how it keeps the browser from reloading everytime and it keeps the homescreen from being blank every time! Having swap for just these two programs would make the phone perfect!

Thanks again!
[G1 Apps and Games] ex87:
Sorry, but as far as I know it's very hard(impossible?) to implement it. Swapping is controlled by kernel.
[G1 Apps and Games] Gimpeh:
I'll be loading up Dudes latest Rom tonight and I'll give this swapper a run.
[G1 Apps and Games] Seoulboy1:
well so far so good with the new swapper on my cy's 3.3.8 which is pretty much the stable 3.4.

Other than the usual slowing while things are being swapped, there haven't been any force closes unless I'm tapping at screen while the swap is happening instead of waiting for it to just work itself out. I'm pretty sure this is unavoidable.

I was using 32mb swap with swappiness of 10. I'm gonna fiddle around with some other settings. I'm having a bit of problem still trying to stream radio and browse. I'm guessing due to whatever is controlling wifi or tunewiki is being swapped around or whatnot. There would be a long pause say sometimes longer than a minute or two then the stream would suddenly come back. Browser didn't suffer as much just needing to reload if one of the browser window wasn't cached.

If anyone had any success with a setting that works well please share.
[G1 Apps and Games] teenfaces:
seems to working with no issues on the Hero build.. I will give it a couple days and see how it works out.
[G1 Apps and Games] wagz:
For the record

JFv1.51

SDPLIT an 8gig Microsd with 7.5GB on the fat and 500meg on the ext2 partition.

T-mobile G-1

Not using app2sd

.6 is working for me, it crashed the first time I ran it, but it did setup the swapfile. My phone is working a lot better. I'm using 32MB and swapiness of 10, I'm seeing some delays, but they aren't bad. I suspect if I used 16MB and 10 everything would be perfect but I'm liking things at 32. I do notice after I reboot when I go back into swapper and hit settings, the directory always defaults back to /sdcard. I use an ext2 partition so I keep setting back to that. Is there a way to set the default in swapper to /system/sd without hitting the button in settings each time?

Haven't seen the streaming issues while browsing in the foreground. I wonder if that's related to the type of SD? My microSD gets about 10MBs so that might be why I'm not seeing long delays on a lot of stuff like streaming.

With exception of the initial hiccup, swapper has been working well and I appreciate the increased performance in my most used apps especially the browser. Thanks for the effort.

~Bryan
[G1 Apps and Games] TheDudeOfLife:
Works on my build.

Thanks!
[G1 Apps and Games] dwang:
Been using it for a couple days and after a few hours it really bogs down the system when it has to swap. I think having a no swapfile is probably better. We really need to start seeing some android phones that have more RAM. Thats really the only solution. We can tweak all the knobs, but at the end of the day, this platform needs more RAM.

I would love to have 10 different widgets running on my homescreen, but they just use up way too much memory and causes too much slowdown. Right now, I only have 1 weather widget running.
[G1 Apps and Games] wagz:
Try it at 16MB for swapfile and swapiness 10, also buy the fastest Microsd you can afford. I think you are going to see an enjoyable performance improvement and it is a heck of a lot cheaper than buying a new phone. :-) And the added bonus of sd cards having moderately better write leveling controllers now-a-days with a new SD.

I've been running a few days at this point without a reboot and haven't noticed any sluggishness, but I do see sprity performance improvements in switching to home or the browser. I can't imagine it would have anything to do with me running the swap on ext2.

You could always pitch in on the compcache project.
[G1 Apps and Games] dwang:
Let me try with 16mb. I was using 32mb on ext3 and the pausing was pretty bad.

Thanks!

Dave
[G1 Apps and Games] wagz:
Yeah, 32MB is probably crossing that line where the system is holding too much open(and in swap) instead of closing out the right amount of applications. So 16MB in size and 10 swapiness might be a little more realistic for most Microsd's.

It's not that I disagree with your assessment that we need more primary memory, but that usually increases the phone price. And also, I love my G1, so I'd like to find ways to twiddle knobs to improve it. :-) Since I'm a T-mobile customer, rumor has it that the next version of the T-mobile android phone is going to be made by Motorola. I've owned Motorola phones in the past and have been really underwhelmed by their smartphones, so it seems like the G1 is my phone of choice for a while which is cool because I absolutely love this thing. Well a little more memory might be better but still... :-)
[G1 Apps and Games] dwang:
tmobile mytouch is coming out end of the his month. Hopefully it will be the version with 288megs of RAM instead of the 192megs which the google ion has.

Of course if u want one with a keyboard then that's a different story.
[G1 Apps and Games] wagz:
OOOooohhh yeeeeesssss, no physical keyboard is a deal breaker for me :-) I just can't get used to typing fast on screen keyboards with my clumsy fingers.

------To (Ex87) the swapper developer------

I'm not trying to sound ungrateful for this fine free app, :-) but if you ever have some free time and the willingness, it would be really great if there was a swapper toggle button that could be placed on the homescreen. Kind of like the bluetooth toggle app or the Wireless toggle app that also changes icon when toggled.
[G1 Apps and Games] ex87:
I will try to make swapper widget as another application, that "controls" swapper.
[G1 Apps and Games] bigballa:
any update on how well it runs on hero with widgets and normal everyday use?

i saw one post but there was no update to it?

i think if u gave this to one of the HERO ROM developers they could implement it somehow

good work

and hope to see more improvements

this has much potential for people planning to stay with their g1s for a while
[G1 Apps and Games] ex87:
Swapper [0.1.1] - for testing

Hello!

I have made some changes in swapper:

* Threaded swap creation (should be ok to leave swapper before swap is fully created - some forcececlose cases fixed :) )

* Autostart

* Little redesign

* New settings dialog (old settings will be lost)

* 1.5 SDK, level 3 (support for 1.1 dropped)

http://swapper.n3o.lv/lv.n3o.swapper_0.1.1.apk
[G1 Apps and Games] garsim:
thank you for new version and for your help :)
[G1 Apps and Games] JakobFriedrich:
do this have aything to do with having not to auto refresh the browser when i open it up
[G1 Apps and Games] JakobFriedrich:
is there a way i can partion my sd card to my ram and ish because its so much nice having webpages not having to auto refresh and just having em ready to go
[G1 Apps and Games] ex87:
Because of Swapper web browser isn't unloaded from memory, therefore it's quite possible that You have Your web pages still in memory when You open web browser.
[G1 Apps and Games] andonnguyen:
I just installed swapper, it corrupted my sd card. I did a format to fat32 again, and reinstalled, caused the same issue twice. Had it set to 32MB with 10 swappiness. Although when it was working, my phone was snappier.
[G1 Apps and Games] wwwhershcom:
I tried turning Swapper off, by pressing swap off, but when i press get info, its still swapping.
[G1 Apps and Games] dirr:
Didn't turn off the swap that was on before i installed new version. But i reset and it started automatically, good job.
[G1 Apps and Games] ultra spikey:
What would be the BEST way to make a complete back-up of my SD card just in case mine goes corrupt as well? Keep in mind, I have the old apps2sd on an EXT2 partition. I could just copy and paste the FAT partition, but I wouldnt know what to do with the EXT2.
[G1 Apps and Games] andrews240:
you could use adb to pull your ext2 content to a local folder.

C:\android>adb pull /system/sd backup

would create a backup folder, in the android directory, that contains all of the folders in /system/sd.
[G1 Apps and Games] armoredraven:
Is it worse to have the swap values higher? By this I'm asking if using higher values kills the micro sd card quicker than using lower values for Swapper.

Right now I have it set to 128/60, which I'm guessing is ok. I mean, the values go that high for a reason, right?

Oh, and you are allowed to use adb with swapper on correct? Because, you don't technically have to mount in order to access adb... Even in adb you can push files to the sd card though... I'm not sure. Whatever.

Thanks for the great application though. I'm loving it with hero
[G1 Apps and Games] dwang:
Do you think its possible to have an option to set the swapfile to 24megs?

Thanks,

Dave
[G1 Apps and Games] nurre:
Considering how many people are using ext3 (aka using journals), I'd think making a version that allows a seperate swap partition, and not as a image on a filesystem might be worth the effort.

//edit, should be as simple as for example doing "swapon /dev/... || { dd + mkswap + swapon on file)", without a mkswap, and for example using partition 4 it should be fully safe and a performance improvement.
[G1 Apps and Games] ex87:
It has happened to me too when I was not using swapper. It seems that phone itself sometimes make some errors in file system. Swapper just accelerate errors rate (IMHO). Try to check your SD card for bad blocks.

In new swapper is implemented command queue. If You press "Swap on" two times, then press swap off, it will try to disable swap, will set swappiness, enable swap, try to disable swap, will set swappiness, enable swap, and finally disable swap. All procedures aren't so quick (for example - disable swap for system means 1. read all swap, 2. check, what is needed, 3. free some ram where to place data from swap, 4. move data from swap, 5. clear swap, 6. disable swap).

If it's not the case, please feel free to fill bug in development site http://a-swapper.googlecode.com

If You are Linux user, check out dd command (you can make binary backup of card, like card image)

For each phone/sd/user/rom there are different "best settings". Try and find what's Yours best :) Higher swappiness means more wear of card, higher swap size - bigger area to wear. But I believe it will not make big difference for card lifespan.

High swap sizes are mainly for Debian installations (For example - to run full desktop + IceWeasel I need minimum 64 mb swap. IceWeasel = Firefox. I know - I'm crazy sometimes :) ).

You can use ADB with swapper, You can mount partition with swap file to Your computer too (Haven't tested this case much), but there can be some problems, if You try to change filesystem (like defragment) or modify swap file.

Will try to not forget to add this value to next version :)

If there are other values that I should add, please write those here.

There are some problems with "standarts" and wear of SD cards. I think I will make "expert" settings menu where You will be able to use swap partition (like checkbox - swap file entry is partition). It shouldn't be so hard :)
[G1 Apps and Games] xyrcncp:
I asked this in the JAC Hero thread, but my post drowned in the sea of posts. Do I need to be running apps2sd to use Swapper?

edit: nevermind, ex87 just replied to my earlier PM. Thanks man!
[G1 Apps and Games] ex87:
No, swapper doesn't care about apps2sd :)
[G1 Apps and Games] RPG0:
Hey there !

I used swapper for a while and it really is great.

However, is there any way to stop some apps form being swaped ? Something like "touching" the memory they use every once in a while ? The apps i'm refering to are, of course phone, launcher, lock screen, the core ones.

I guess it would have to be done in a ROM (kernel and framework involved), but it would be worth it, especially since a final Hero ROM will be here, and we won't have enough RAM for it :(.
[G1 Apps and Games] LazyGenius:
i have a question... since most root users have apps to sd what would happen if the swapper app used the internal memory instead? i have 70+ megs of internal memory going to waste and if it can spare my sd card as well it might be a good idea... is this possible?
[G1 Apps and Games] RPG0:
It was discussed before, read the thread.

summary: you could damage a 200-500$ phone, instead of a 10-30$ sd card.
[G1 Apps and Games] dwang:
I'm starting to notice a lot of my apps crashing with adb log after enabling the swapfile.

I'm wondering if my sdcard is starting to crap out or not?
[G1 Apps and Games] nurre:
I'd think you'd get more wear from ext3 atleast, considering the overhead of journaling. Although I dont know if swap considers drive wear and tries to write in bursts, but I'd be surprised if it didn't.
[G1 Apps and Games] Diceman4:
Just a sidenote - SanDisk branded SDcards come with a 10 year warrantee. So you could just make sure to back up your card (In Linux if you want the ext2/ext3 partition also) frequently and be willing to buy an extra card when it fails. You can then use the extra card while waiting for the warrantee replacement. In addition SanDisk cards will definitely last you longer than the discount cards in my opinion...

Dice

========

Phone: G1

ROM: CyanogenMod 3.4.4

Theme: Hero 1.3.5

Debian w/ lxde

Swapped & Overclocked
[G1 Apps and Games] ultra spikey:
What are our options if we dont have Linux?
[G1 Apps and Games] Diceman4:
I would use nandroid (there is a thread on it) to backup system/user settings/boot settings and Linux for the ext2/3 and vFat portions of the card.

If you don't have linux Ubuntu offers a very easy dual boot system that you install within Windows w/o partitioning (As always it is free). You could also use VMWare (Which is acceptably quick but I would recommend Xubuntu as it is quicker)

Or you could also use the terminal to copy everything that you want to keep from your ext partition to a new directory on your fat partition. Then you could save it on a windows box

use:

# su

# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system

# busybox cp -r /system/sd/ /system/extbackup/

Dice
[G1 Apps and Games] ultra spikey:
Nice, I think this is exactly what I was looking for. I will give it a try later. Use terminal on the phone? Can this be done through ADB as well?
[G1 Apps and Games] Diceman4:
You can do it in ADB also, your choice!

Dice
[G1 Apps and Games] Sistum Id:
People with ext3 partitions. Are you guys putting the swb file on the fat or the ext3 partition?
[G1 Apps and Games] Diceman4:
I have it on the FAT partition right now. I'm thinking of moving it back to the ext3 so that I can mount on my computer without having to restart the phone though...

dice

OK I moved it to the ext3 partition so that I can mount via usb. It seems to be working as well, I haven't noticed any speed changes at all...
[G1 Apps and Games] Chahk:
Dumb question. In order to move the swap file to the Ext2/3 partition, is it enough to just change the "Swap place" to "swapfile.swp" as opposed to "/sdcard/swapfile.swp"?
[G1 Apps and Games] ultra spikey:
I was looking at this command, the last command, is that copying the entire sdcard and putting it on the phone itself? I'm not an expert by any means, but that's what it looks like to me.
[G1 Apps and Games] ex87:
Change "/sdcard/swapfile.swp" to "/system/sd/swapfile.swp" to move swap from fat partition to ext2/3
[G1 Apps and Games] Chahk:
Thanks, that worked.
[G1 Apps and Games] Diceman4:
You're right, I meant

#busybox cp -r /system/sd/ /sdcard/extbackup

When I was making sure that this worked right I was WONDERING how extbackup managed to get into my system! It actually made a backup of the system/sd/ and put it on the system/sd/extbackup. Interesting.

Dice
[G1 Apps and Games] pinkxpinkii:
swapper widget

can you add a widget that shows if swapper is on or off to prevent sd card damages when people forget to turn off swapper during mount or rebooting phone?

that would be a great additional feature!
[G1 Apps and Games] Sistum Id:
Right, thats it!! Thanks :D

If we have the swapfile.swp on the ext2/3 and we goto mount the scard, we dont need to stop swapper right? But if we mount the sdcard in lets say Ubuntu, we need to stop swapper since the sdcard and ext2/3 is mounted right?