[Guide] Swap Partition - Desire HD General

[ I am not responsible for anything happen to your Phone ]
Initial
- You need a Swap enabled Kernel ( I am on CodefireX with KangBang V3.0 Kernel )
In Phone
- Go to your Settings -> Developer Settings -> USB Debugging (Tick)
In PC
- Open Command Prompt in administrator
- Head to folder where you have placed ADB
- Type adb shell
- now get super user permission by typing SU
- now type fdisk -l /dev/block/mmcblk1 you will get results something like
Device Boot Start End Blocks Id System
/dev/block/mmcblk1p1 2 25256 25456640 b Win95 FAT32
/dev/block/mmcblk1p2 25256 29418 4195328 83 Linux
/dev/block/mmcblk1p3 29418 30459 1049600 82 Linux swap
I have an SDext1 partition so i have /dev/block/mmcblk1p3
So what is in the place of Linux Swap is matters (mmcblk1p3)
- Now download Swapper2 to your Phone
link https://play.google.com/store/apps/details?id=lv.n3o.swapper2
-Go to setting and advance preference and tick Use swap partition
- Click Swap Partition and type /dev/block/(your swap partition)
- Hit Thanks if i have helped you -

Sorry. But how is this helpful for our desire HD?
Sent from my Desire HD using xda app-developers app

Because it prevents slowing down of phones with low free RAM when lots of apps are open. This slowdown can also be prevented by changing the low memory killer values. codefireX slows down when there's around 60 MB free. Swap partition functions just like in Linux.
Sent from my Desire HD using xda premium

Swap partition is bad for your SD card AFAIK. You don't really need it, DHD has plenty of RAM.

Bad for SD card because flash memory wears out after a certain number of write cycles. No other reason. So it only depends on how often the swap partition is used.
Sent from my Desire HD using xda premium

SD Card Life
Yes! I agree using swap partition reduces the SD card life.. but I haven't seen any any SD card died because of swap partition.

well, even though sdcard have limited write cycles, but we talking about hundreds of thousand up to maybe 1 million cycles for an average good card.. with wear leveling mechanism, it will takes quite a long time to render the sd card useless..
Sent from my Desire HD

hi guys, Ive run into a snag.
I recently installed ram expander app for my tablet but im not sure what settings will work best.
my specs:
512mb ram device
when I hit optimal value button they show as follows:
swapfile=998mb
swappiness=60
minfreekb=17mb
sdcard:30424/1664MBfree
RAM =434MB/70MBfree
swap:0mb/0mb
total:434mb/70mbfree
so my question is what numbers do I alter to reduce lag but not take up unneeded space on mysdcard
thanx in advance for any help!

Related

[Q] SWAP+EXT X8......help

I have a question .... If I partition my microSD with programs that exist to partition, as I can then activate the function in my X8?
I have a 16GB SD class 10 and I would like to enable this function on my computer, I have the version v0.21 and alfkernel v5 GingerXD .......
You like me could help me indicating which would be the correct partition for this card of this size
PS: Sorry for my English ..
Use swapper configurator,and then type in terminal ""free'''.
and as I get to that option?
The swap it will be enabled by swapper configurator,and terminal will only confirm.
You can use fat partition,notice that you need free memory on sd card
dotsen9 said:
The swap it will be enabled by swapper configurator,and terminal will only confirm.
You can use fat partition,notice that you need free memory on sd card
Click to expand...
Click to collapse
Fat partition? Isn't swap have its own filesystem?
If you have partitioned your card, download swapper 2 from market, run it, go ro options, advanced, tick use swap partition. Hit back, configure swap amount and swappiness, back, press on and you're ready to go
Sent from my X8 using XDA App
Not Really,i-m using în this way,and it's working.

[Q] MTD Memory Handling Question

My epic 4g is running ei22 Legendary v.1 with the samurai 3.3 assassin kernel. I am a bit of an app whore and have loading it up with nearly 260 apps. I have accomplished this with the use of a 2.5gb ext4 partiton on my class10 16gb sd card, the darktremor script and the a2sdgui app. With this setup I am have all the storage I need and then some.
My question is; is it possible to repartition in order for more ram as opposed to storage?
I have excluded a fair amount of apps from starting up at boot, and I aggressively manage my memory with a memory manager, but I still feel I need more ram.
dewayne25 said:
My epic 4g is running ei22 Legendary v.1 with the samurai 3.3 assassin kernel. I am a bit of an app whore and have loading it up with nearly 260 apps. I have accomplished this with the use of a 2.5gb ext4 partiton on my class10 16gb sd card, the darktremor script and the a2sdgui app. With this setup I am have all the storage I need and then some.
My question is; is it possible to repartition in order for more ram as opposed to storage?
I have excluded a fair amount of apps from starting up at boot, and I aggressively manage my memory with a memory manager, but I still feel I need more ram.
Click to expand...
Click to collapse
I believe ram is a completely different chip in the phone, opposed to the storage space, because it functions a lot differently. But I may be wrong.
Sent from my SPH-D700 using XDA App
iatedeadpeople said:
I believe ram is a completely different chip in the phone, opposed to the storage space, because it functions a lot differently. But I may be wrong.
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
Wait, WHAT?! The ram isn't in our SD cards?! You don't say! Although I was starting to suspect something when I noticed that if I remove the SD card (or mount it as USB storage), the phone keeps functioning, and I know that can't happen with any computer when the ram is removed...
The OP only mentioned partitioning of the SD card, not internal storage. Also, ram isn't partitioned... he is most likely referring to creating a swap partition on his sd card, which the system would then use as additional storage space for temporary data that would normally be held in ram. However, the CPU still needs the data in ram in order to interact with it, so if the required data is actually in the swap partition, then the system would need to free up some room in ram for the required data (often, by swapping places with data in ram that isn't currently needed, hence the name...
@OP - I'm fairly certain the Epic doesn't currently support swap files/partitions, but I recall seeing mention of other android phones with that ability. But it shouldn't be necessary, our phones have enough ram - if you are running out of memory (errors, not simply seeing a low amount of available ram) then you either have something wrong with your phone, or you need to stop trying to keep all of your favorite 3d games loaded at the same time, lol
Sent from my SPH-D700 using XDA App
Our phone does have the ability to support swap. Some Bonsai releases support swap. First you'd have to make sure the /sdcard was partitioned for swap to have a place to reside. Then, it'd have to be enabled in the kernel and there are tweaks to "swapiness" that sets aggressiveness of swap use - basically swap enable will try to take dormant items in RAM and move them to SWAP to free up RAM. You can run 'free' command from the terminal to see how much swap is available and in use.
All that said - I don't think the OP is referring to SWAP or RAM - as those would only help free up running memory. OP seems to be interested in more room on his OneNAND data partition and SDCard for Apps to be installed.
RE OP: CM7 MTD downsized the /cache partition in OneNAND and gave a sizeable boost to /data space for more apps (see images posted by AproSamurai showing free space). If you run the command 'df -h' from the terminal you'll see the size (total, used, available) of /system, /data, and /cache. On CM7 I have the following sizes, respectively, 268.5M, 676.5M, and 25M. Side note: The 25M cache isn't large enough for all Market apps to download though so noobnl fixed by mounting /cache/download on /data partition (MTDBlock3) to allow for larger apps to cache in download directory before install.
If you're sticking with a GB TW ROM though - I don't understand your setup. Why not just use the built in GB capability to move Apps to SD Card in Settings -> Applications (select app and "move to SD card" for those compatible/capable)? I don't get why you need to create a separate EXT4 partition and use 3rd party tools. Can you elaborate on why they wouldn't work?
Rereading your OP - NO - you can't get more RAM to fit in the phone. It's got what it's got and you can't get more from it. Enabling SWAP may help, terminating resident apps in the background MAY help, but at the end of the day you can't increase the RAM available. You'll need to better manage what you have.
Please don't confuse RAM with storage memory - that got me turned around in your OP.
Sorry for confusing you, if I did. I wasn't interested in partitioning my sd card for more ram on the sd card. My interest is in using the cache space for ram. I don't understand how a phone can be stated as having 512mb's of ram and 1gb of rom and not be. Yet all the epic can muster is 362mb of ram, most of our performance issues are due to that... If there was a way to unlock any more ram in samsung's specs claim I wanted to know.
If you're sticking with a GB TW ROM though - I don't understand your setup. Why not just use the built in GB capability to move Apps to SD Card in Settings -> Applications (select app and "move to SD card" for those compatible/capable)? I don't get why you need to create a separate EXT4 partition and use 3rd party tools. Can you elaborate on why they wouldn't work?
I would have loved to use the .android folder to save my apps but my dalvik cache would fill the internal space and limit me to about 180 apps. With the Darktremor script and a2sdgui I am able to put my Dalvik on the ext4 partition of my SD card.
I would have loved to use the .android folder to save my apps but my dalvik cache would fill the internal space and limit me to about 180 apps. With the Darktremor script and a2sdgui I am able to put my Dalvik on the ext4 partition of my SD card.

[GUIDE] How to create a swap partition at my way (the easiest)

I know this topic has been covered many times already, but since I couldn't find a easy and straight forward how-to to create a swap partition on my X8, I am going to walk you through few easy steps that will let you create a swap partition in 5 mins or so.
First things first I assume you have already the latest version of miniCM7 and nAa kernel, although this mini howto should apply for any phone and any rom out there, as long as the kernel supports swap partition.
First thing you want to partition your SD card in order to create our swap partition, I recommend you to follow this accurately.
Now that we have successfully created our swap partition, we want to boot up the phone and enable our swap partition in order to be accessible to the kernel.
To detect the swap partition that we have just created open up a ADB terminal and type
Code:
fdisk -l dev/block/mmcblk0
it will look something like this
Code:
/dev/block/mmcblk0p3 862 966 843412+ 82 Linux swap
write down the exact number of the swap partition and let's activate it by typing
Code:
swapon /dev/block/mmcblk0pX
** where X is the number of the swap partition **
We can now check if our swap partition has been activated by executing the command free
Now we want to make our swap partition to be activated at boot time, without having to activate it manually everytime we reboot the phone.
Assuming you know how to at least write and save a text file in VI, let's go back to our fido ADB shell and type
Code:
vi /data/local/userinit.sh
now lets drop few lines in
Code:
#!/system/bin/sh
#Swap
swapon /dev/block/mmcblk0pX
** where X is the number of the swap partition **
If you are not really comfortable with VI you can also use Nano or even RootExploer or any other root file manager if you are more comfortable with UI.
save it and once again in ADB shell lets make it executable
Code:
chmod a+x /data/local/userinit.sh
As last step you may want to change the swappiness value, note that most of the roms have it set to 60 by default, which is good enough in my opinion, although setting it to higher (max is 100) may help to improve overall performance, while setting it to lower may increase interactivity and overall stability.
Temporary change (until next reboot)
Code:
echo 60 > /proc/sys/vm/swappiness
Permanent change
Code:
echo vm.swappiness=60 >> /system/etc/sysctl.conf
As result
Code:
~ # free
total used free shared buffers
Mem: 186704 177248 9456 0 116
-/+ buffers: 177132 9572
Swap: 843404 53760 789644
** few notes **
I don't intend to take credit for this how-to as it takes few pieces of commands and hints from any guides out there which covers this topic, and anyways its basic linux knowledge really..
So cheers you all and enjoy
mmcblk0p3 is used when we have 3 partitions on SD and last one is swap.
If we have only 2 (fat+swap like me) it need to be mmcblk0p2
Also mkswap /dev/block/mmcblk0pX need to be done b4 you call swapon.
rav3n_pl said:
mmcblk0p3 is used when we have 3 partitions on SD and last one is swap.
If we have only 2 (fat+swap like me) it need to be mmcblk0p2
Also mkswap /dev/block/mmcblk0pX need to be done b4 you call swapon.
Click to expand...
Click to collapse
Yea I forgot to mention that mmcblk0p3 is in my case the swap partition and the number vary depends on how many partitions you have on your SD card.
Btw mkswap isn't needed if you follow my how-to, because Linux Swap file system is already selected when partitioning the SD card, you don't really need to format the swap partition again by using mkswap .
I tought that a partition is need it, to run the swap file, but now I am running it in my sd card without partition it. Is any difference, between partition my sd?
You are using swap file, it can be created by swapper. Swap partition is easier - it will persist when you connect to pc.
Sir_gpm said:
I tought that a partition is need it, to run the swap file, but now I am running it in my sd card without partition it. Is any difference, between partition my sd?
Click to expand...
Click to collapse
If you meant what's the difference between using swapper2 and partitioning the SD card is that basically you can assign as much space as you want to your swap partition, while with swapper2 you can't really have more than 250mb of swap.
Also like @rav3n_pl said, when you mount the sdcard on your computer the swap will stay available since it uses its own partition.
Personally I found 250mb of swap too little, my suggestion is to give at least 600mb to the swap partition.
My setup is 800mb of swap and swappiness value set to 70.
I would like to ask you why & in what situation was 256mb swap insufficient?
Did you actually run 'free' in terminal to see how much swap was being used?
I just can't imagine anything running on our phone that will actually use up the whole 256mb swap, unless you are running a linux distro over the top...(less than 1% of users & those users know what they are doing)...the only thing a greater than 256mb swap space partition is doing is decreasing your over-all sd-card capacity for music/files/apps2sd/whatever2sd...
Swap doesn't 'add' ram. We don't magically have 1gb of ram with 800mb swap...
I'm not bashing, I just think new users could easily take this idea the wrong way.
Same as other people advising newer users to set up 1gig+ of swap...it is just unused space on your sd-card.
The best thing about setting up a partition and not using swapper2 is you don't have an app on your phone that is notorious for auto-running, has root access, as well as internet permission. Root access means they can send any info about your phone straight through. Even with Droidwall+similar apps, they don't mean anything to root.
i have fat32 ext3 and swap,ext3 and swap works,but i cant use storage(fat32) phone say its wrong sd card..but in another rom with same kernel works..
hajiborojobo said:
i have fat32 ext3 and swap,ext3 and swap works,but i cant use storage(fat32) phone say its wrong sd card..but in another rom with same kernel works..
Click to expand...
Click to collapse
In the linked article is adviced to put a SD card of 2GB or smaller on FAT, maybe that's your solution?
lrakkarl said:
I would like to ask you why & in what situation was 256mb swap insufficient?
Did you actually run 'free' in terminal to see how much swap was being used?
I just can't imagine anything running on our phone that will actually use up the whole 256mb swap, unless you are running a linux distro over the top...(less than 1% of users & those users know what they are doing)...the only thing a greater than 256mb swap space partition is doing is decreasing your over-all sd-card capacity for music/files/apps2sd/whatever2sd...
Swap doesn't 'add' ram. We don't magically have 1gb of ram with 800mb swap...
I'm not bashing, I just think new users could easily take this idea the wrong way.
Same as other people advising newer users to set up 1gig+ of swap...it is just unused space on your sd-card.
The best thing about setting up a partition and not using swapper2 is you don't have an app on your phone that is notorious for auto-running, has root access, as well as internet permission. Root access means they can send any info about your phone straight through. Even with Droidwall+similar apps, they don't mean anything to root.
Click to expand...
Click to collapse
I have never said that swap adds ram, not that I want new users to believe that, but in my case 256mb of swap was way too little, especially when it comes to play games and at the same times running apps in background while the phone still remains snappy. Maybe 800mb of swap is a little bit exaggerated, but in my opinion 500mb of swap is a must to have..
rav3n_pl said:
mmcblk0p3 is used when we have 3 partitions on SD and last one is swap.
If we have only 2 (fat+swap like me) it need to be mmcblk0p2
Also mkswap /dev/block/mmcblk0pX need to be done b4 you call swapon.
Click to expand...
Click to collapse
Wow, if only I read the second post and not gaze at the OP for 2h, it would have saved me two hours of googling. The OP needs to be modified.
I Create Partion Using ClockwordRecovery MOD its that simple
even swapper works great can any body tell me i am doing something wrong
Can i do this in my wt19i?
Sent from my WT19i using xda premium
bind9 said:
Can i do this in my wt19i?
Sent from my WT19i using xda premium
Click to expand...
Click to collapse
Yes you can. Not sure why you'd need to though, you already have 512Mb RAM.
Sent from my X8 using xda premium
Hi all, why I always get this?
mkswap /dev/block/mmcblk0p2
Setting up swapspace version 1, size = 255593472 bytes
swapon /dev/block/mmcblk0p2
swapon: /dev/block/mmcblk0p2: Invalid argument
Also swapper2 is not working either...
I am using last nAa kernel and ROM.
Thanks.
cenovita said:
Hi all, why I always get this?
mkswap /dev/block/mmcblk0p2
Setting up swapspace version 1, size = 255593472 bytes
swapon /dev/block/mmcblk0p2
swapon: /dev/block/mmcblk0p2: Invalid argument
Also swapper2 is not working either...
I am using last nAa kernel and ROM.
Thanks.
Click to expand...
Click to collapse
If you have an ext partition then its mmcblk0p3.
Sent from my X8 using xda premium
NIMBAH said:
If you have an ext partition then its mmcblk0p3.
Sent from my X8 using xda premium
Click to expand...
Click to collapse
I have just 2, one FAT32 (7gb) and the rest is for the SWAP part, I have tried formatting it with swap and ext3, no case...
look at this:
Disk dev/block/mmcblk0: 8064 MB, 8064598016 bytes
255 heads, 63 sectors/track, 980 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
dev/block/mmcblk0p1 1 922 7405933+ b Win95 FAT
dev/block/mmcblk0p2 923 980 465885 83 Linux
[email protected]:/ # mkswap /dev/block/mmcblk0p2
mkswap /dev/block/mmcblk0p2
Setting up swapspace version 1, size = 255593472 bytes
[email protected]:/ # swapon /dev/block/mmcblk0p2
swapon /dev/block/mmcblk0p2
swapon: /dev/block/mmcblk0p2: Invalid argument
1|[email protected]:/ # free
free
total used free shared buffers
Mem: 189448 162852 26596 0 24
-/+ buffers: 162828 26620
Swap: 0 0 0
[email protected]:/ # swapon /dev/block/mmcblk0p3
swapon /dev/block/mmcblk0p3
swapon: can't stat '/dev/block/mmcblk0p3': No such file or directory
1|[email protected]:/ # swapon /dev/block/mmcblk0p3
Click to expand...
Click to collapse
BTW, if i partition with minitool, the card is not mountable by the phone... I have to partition with recovery...
---------- Post added at 04:24 PM ---------- Previous post was at 04:14 PM ----------
OK, I have partitioned with Recovery and created 1 ext partition of 256Mb and 1 swap partition of 256Mb.
After that, i was able to mount swap in p3 (the swap one).
Minitool, useless for me...
hI DEVS!
I have 2 partitions: Fat32-1,6GB (my files) and ext4-200MB (linked files)
Can i use swap?
If yes... the command will be: swapon /dev/block/mmcblk0p2 ?
hI DEVS!<br />
I have 2 partitions: Fat32-<b>1,6GB </b>(my files) and ext4-<b>200MB</b> (linked files)<br />
Can i use swap?<br />
If yes... the command will be: <b>swapon /dev/block/mmcblk0p2</b> ?
Click to expand...
Click to collapse
No you will need to create another partition for swap. The best way is through recovery but that will require reformatting your SD Card.
Sent from my X8 using xda premium
Android ICS 4.0.3
Hello,
i have Script und working fine with gscript. But i wont do it in autostart. I copy userinit.sh in data\local\ reboot but i have no swap. I mus the script with gscript.
can anyone help me please.
i have HRC HD2 with CLK-NexusHD2.1HWA ICS-Android 4.0.3
thanks

[Q] /system.tar backup and sd card partion

Hello,friends i need two solution from you people....
1.how to backup entire /system folder for using it in android kitchen working rom.
can i backup with root explorer or use some commands in terminal emulator..
i think terminal commands will bakup it in .tar and will not change anything in the files
so please give me the commands to backup system on sd card.
2.secondly what value to put while partioning sd card using rom manager....
thanks in advance.
rohitzz said:
Hello,friends i need two solution from you people....
1.how to backup entire /system folder for using it in android kitchen working rom.
can i backup with root explorer or use some commands in terminal emulator..
i think terminal commands will bakup it in .tar and will not change anything in the files
so please give me the commands to backup system on sd card.
2.secondly what value to put while partioning sd card using rom manager....
thanks in advance.
Click to expand...
Click to collapse
Don't know number 1,
I have a SD card partition of 1024 MB and 32 MB swap. I can install 500 apps . So I guess these values are more than enough
rohitzz said:
Hello,friends i need two solution from you people....
1.how to backup entire /system folder for using it in android kitchen working rom.
can i backup with root explorer or use some commands in terminal emulator..
i think terminal commands will bakup it in .tar and will not change anything in the files
so please give me the commands to backup system on sd card.
2.secondly what value to put while partioning sd card using rom manager....
thanks in advance.
Click to expand...
Click to collapse
1. nand backup via CWM or Amon_RA recovery
2. don't use ROM Manager (EVER for ANYTHING), either make the partition via recovery or via the built in tools
---------- Post added at 12:21 PM ---------- Previous post was at 12:19 PM ----------
QuantumFoam said:
Don't know number 1,
I have a SD card partition of 1024 MB and 32 MB swap. I can install 500 apps . So I guess these values are more than enough
Click to expand...
Click to collapse
Yeah, 1024 goes a long way but if you got a big SD card you might want to go for twice that and swap isn't just not needed, it's not even used unless you make a separate script to use it which ISN'T included in most roms.
Which kind of built in tools?
Sent from my Blade using xda premium
QuantumFoam said:
Don't know number 1,
I have a SD card partition of 1024 MB and 32 MB swap. I can install 500 apps . So I guess these values are more than enough
Click to expand...
Click to collapse
Why anyone don't know 1. Step!!!
Sent from my Blade using xda premium
rohitzz said:
Why anyone don't know 1. Step!!!
Sent from my Blade using xda premium
Click to expand...
Click to collapse
Jinxxed posted it above
Tar will only backup what is inside the system partition . For a more complete backup one needs backup of all partitions and boot loader with recovery. It possible only by a tool like CWM.
Also for a phone with 512 MB RAM one doesn't need swap. It mai actually degrade the performance.
My Idea ZTE Blade has only 256MB RAM, I am using CM7.2 . In manage applications total of free plus used is only 128MB. So I enabled swap using m2sd, it's 256MB, actual usage varies from 80MB to 130MB.
My phones performance is greatly improved.
Sent from my Idea Blade
rahulsa said:
Tar will only backup what is inside the system partition . For a more complete backup one needs backup of all partitions and boot loader with recovery. It possible only by a tool like CWM.
Also for a phone with 512 MB RAM one doesn't need swap. It mai actually degrade the performance.
My Idea ZTE Blade has only 256MB RAM, I am using CM7.2 . In manage applications total of free plus used is only 128MB. So I enabled swap using m2sd, it's 256MB, actual usage varies from 80MB to 130MB.
My phones performance is greatly improved.
Sent from my Idea Blade
Click to expand...
Click to collapse
1. CWM will use TAR to make the backups so it's the same thing, to make a clone of the partition you'll need to use cc.
2. It won't degrade the performance in any scenario, it MAY be unnecessary and unused though.
3. That's not swap, that's using an extended partition to store data, what you're looking at is internal storage and more specifically the internal partition /data
Jinxxed said:
1. CWM will use TAR to make the backups so it's the same thing, to make a clone of the partition you'll need to use cc.
2. It won't degrade the performance in any scenario, it MAY be unnecessary and unused though.
3. That's not swap, that's using an extended partition to store data, what you're looking at is internal storage and more specifically the internal partition /data
Click to expand...
Click to collapse
1. Ok, new learning for me.
2. Good to know this. I was bit worried initially with my 256MB swap size. As I saw 0 or 32 MB swap in many posts. But after 2 weeks I confirm that it was the best thing I did for my Blade. Yes it was even better than using sd card's ext4 partition for more space. Low RAM was a bit serious issue for me than low space.
3. I know swap and ext partition are different. I have 256MB swap and 2 GB ext-4 on my class 4 16GB.
Also understand that using m2sd one can mount /data on ext-4 (r mount) and /sdext on internal nand.
Sent from my Idea Blade
rahulsa said:
1. Ok, new learning for me.
2. Good to know this. I was bit worried initially with my 256MB swap size. As I saw 0 or 32 MB swap in many posts. But after 2 weeks I confirm that it was the best thing I did for my Blade. Yes it was even better than using sd card's ext4 partition for more space. Low RAM was a bit serious issue for me than low space.
3. I know swap and ext partition are different. I have 256MB swap and 2 GB ext-4 on my class 4 16GB.
Also understand that using m2sd one can mount /data on ext-4 (r mount) and /sdext on internal nand.
Sent from my Idea Blade
Click to expand...
Click to collapse
3. Just nitpicking but the way it works is to mount data to /sd-ext/data, /sd-ext is just the mount point for your ext partition (which may be ext2, ext3 or ext4 depending on how you configured it during partitioning and how you mount it). Depending on how you do this you can have data, app, dalvik-cache and app-private mounted to /sd-ext/[folder] (this is the common way of using it when you use my script and S2E).
Jinxxed said:
... Depending on how you do this you can have data, app, dalvik-cache and app-private mounted to /sd-ext/[folder] (this is the common way of using it when you use my script and S2E).
Click to expand...
Click to collapse
May I know your script name?
Using your script which of above should be moved last, I mean with swap already might take a portion of sd card i/o and hence i fear, may make overall speed very slow.
Or for enabling all of them should i upgrade to faster sd card?
Currently I am happy with swap and apps on sd card, rest all on int. nand.
Sent from my Idea Blade
rahulsa said:
May I know your script name?
Using your script which of above should be moved last, I mean with swap already might take a portion of sd card i/o and hence i fear, may make overall speed very slow.
Or for enabling all of them should i upgrade to faster sd card?
Currently I am happy with swap and apps on sd card, rest all on int. nand.
Sent from my Idea Blade
Click to expand...
Click to collapse
S2E-Swap-Jinxxed.zip is the name, you flash it via recovery. https://dl.dropbox.com/u/54672755/S2E-Swap-Jinxxed.zip
It's basically a set of init.d scripts for proper configuration of swap, mounting of sd-ext and the S2E application to move apps, data and cache (you can choose what you want to move and what you want to leave on your internal nand data partition) to sd-ext.
It works on all roms that don't have S2E support from the get go including all ICS variants and JB.
Jinxxed said:
S2E-Swap-Jinxxed.zip is the name, you flash it via recovery. https://dl.dropbox.com/u/54672755/S2E-Swap-Jinxxed.zip
It's basically a set of init.d scripts for proper configuration of swap, mounting of sd-ext and the S2E application to move apps, data and cache (you can choose what you want to move and what you want to leave on your internal nand data partition) to sd-ext.
It works on all roms that don't have S2E support from the get go including all ICS variants and JB.
Click to expand...
Click to collapse
To deactivate mounts2sd-4.6.2 script and use your script.
I did following after getting your answer as PM.
I deleted 10mounts2sd script from \system\etc\init.d\ .
While observing S2E-Swap-Jinxxed.zip, I realized that it contained s2e.apk in /system/app.
So I actually installed s2e from from market to get latest version.
Then to enable swap and other optimizations, I added following lines in begining of 20userinit script present in /etc/init.d .
mount -o remount,noatime,nodiratime,relatime,barrier=0,nobh /system
mount -o remount,noatime,nodiratime,relatime /data
swapon /dev/block/mmcblk0p3
So I got what I wanted and also learnt many things in the process.
Also experimented with /etc/sysctl.conf by adding vm.swappiness=50 (initially 70).
---------- Post added at 08:47 PM ---------- Previous post was at 08:26 PM ----------
Jinxxed said:
1. CWM will use TAR to make the backups so it's the same thing, to make a clone of the partition you'll need to use cc.
....
Click to expand...
Click to collapse
I backed up my Blade using the latest ClockworkMod 5.0.2.0 .
CWM backup up saying done, but with a message.
It said it did not backup up /sd-ext or external ext2/3/4 partition.
So I was worried to use app-to-ext scripts or programs.
Now I successfully used tar to backup sd-ext and restore it on a faster (class 4 to 6) sd card.
But I would like know if there is any new version of CWM for Blade 6.0.1.2 with or without touch, which backs up ext2/3/4 without any issues.
If yes, I would upgrade my CWM.
It saves time to use CWM, compared to tar.
Thanks in advance.

Zram vs Swap

So let's start this off by explaining both of them.
Zram basically compresses unused apps within the system RAM. This allows the system to swap less needed processes to the Zram partition for faster access at a later time, instead of killing them. This does take up some of your ram though, so I imagine that the value you are setting is determining exactly what percentage of your ram that the zram partition is allotted.
Swap instead uses a small portion of the SDcard like RAM. The phone will attempt to keep as much within the ram as possible until fill, and then begin using the swap partition on the SDcard. At that point, the phone will begin moving inactive blocks of memory to the SD, freeing up RAM for active processes. If one of the pages on the SD needs to be accessed again, it will be moved back into RAM, and a different inactive page in RAM will be moved onto the SD ('swapped').
Swap files don't restrict available RAM but writing to the sdcard impacts the speed of opening apps.
And if I'm not wrong, swap also shorten the lifespan of your SD Card.
So what do you think? Zram or swap is better?
Sent From My Sony Xperia Arc S
For me the swap is better
I'm using swapit expander and it let me use 1600 mb as ram and give me better gaming experience(mutch less lag)
Sent from my Lt15i using xda app-developers app
MontyAlHabbash said:
For me the swap is better
I'm using swapit expander and it let me use 1600 mb as ram and give me better gaming experience(mutch less lag)
Sent from my Lt15i using xda app-developers app
Click to expand...
Click to collapse
Much less lag...? With that amount of swap memory it should FLY.
Can you please share with us the file of swapit expander,. the link that google is giving us is not working anymore,. please:crying: i think it's the prev. version 1.3.3
omersonster said:
Can you please share with us the file of swapit expander,. the link that google is giving us is not working anymore,. please:crying: i think it's the prev. version 1.3.3
Click to expand...
Click to collapse
isn't sharing paid apps against the ROLL
MontyAlHabbash said:
isn't sharing paid apps against the ROLL
Click to expand...
Click to collapse
Oops sorry didnt know about that, this is my first post by the way,,. :laugh:
I think swap is better, maybe with a class 10 microSD, but how can I make my phone use a swap partition? Is there a mod, a script or a root-app?
Use swapper2 from the market, it's free. Use a partition app on windows or gparted on linux to create a swap partition for best results, but with that app you don't have to.
No need for partition for swap
Sent from my R800i using xda app-developers app
Anyone had their sdcard that died in swap before?
Sent From My Sony Xperia Arc S
Using swap didn't kill you sd-card, you have to wait for 10 years for.
Anyway, there is a simple way to activate swap and take more apps on multitask, just do this.
Create with minitools in your sd-card these partitions in this order :
- fat 32 (any size)
- ext2 (512MB, to use with link2sd and move apps on)
- swap (min 256, max 1gb)
Then, go on adb shell and enter these commands :
- swapon /dev/block/mmcblk0p3 (3 partitions, otherwise put mmcblk0p2)
- free (to verify swap working)
To get a permanent swap, create a script named userinit.sh in /data/local/ and put this on it :
#!/system/bin/sh
#Swap
swapon /dev/block/mmcblk0pX (x is 2 or 3, see higher)
Save it, and in adb shell enter this command: chmod a+x /data/local/userinit.sh
Finally also on adb shell, this last command :echo vm.swappiness=60 >> /system/etc/sysctl.conf
Personnaly i use 0 on swappiness to got more reactivity.
Reboot and enjoy.
mekayzer said:
Using swap didn't kill you sd-card, you have to wait for 10 years for.
Anyway, there is a simple way to activate swap and take more apps on multitask, just do this.
Create with minitools in your sd-card these partitions in this order :
- fat 32 (any size)
- ext2 (512MB, to use with link2sd and move apps on)
- swap (min 256, max 1gb)
Then, go on adb shell and enter these commands :
- swapon /dev/block/mmcblk0p3 (3 partitions, otherwise put mmcblk0p2)
- free (to verify swap working)
To get a permanent swap, create a script named userinit.sh in /data/local/ and put this on it :
#!/system/bin/sh
#Swap
swapon /dev/block/mmcblk0pX (x is 2 or 3, see higher)
Save it, and in adb shell enter this command: chmod a+x /data/local/userinit.sh
Finally also on adb shell, this last command :echo vm.swappiness=60 >> /system/etc/sysctl.conf
Personnaly i use 0 on swappiness to got more reactivity.
Reboot and enjoy.
Click to expand...
Click to collapse
Do this work on locked bootloader?
Sent from my LT18i
KradEdis said:
Do this work on locked bootloader?
Sent from my LT18i
Click to expand...
Click to collapse
Nope, since the kernel dont monitor ext and swap partition.
seems like swap works with 587 stock
mekayzer said:
Nope, since the kernel dont monitor ext and swap partition.
Click to expand...
Click to collapse
I try this with the 587 firmware, AND IT'S WORK : http://forum.xda-developers.com/showthread.php?t=1821071&highlight=swap
On 481, trying to activate swap leads to error.
but do you have stock kernel too??
mortillo said:
but do you have stock kernel too??
Click to expand...
Click to collapse
yes, stock kernel, locked bootloader.
and now swap is working properly?
Lol, i tested it and yes Swapper2 is working with stock kernel!! wow!!
mortillo said:
and now swap is working properly?
Click to expand...
Click to collapse
yes, but i don't see any improvment. And now i don't know how to get rid off those swap
I turn swap off, delete file and uncheck start on boot with swapper_2, but the file is always recreated on boot. It's the same for zram, there is no script that enable it, but on reboot swaps are enabled again :crying:
mekayzer said:
Using swap didn't kill you sd-card, you have to wait for 10 years for.
Anyway, there is a simple way to activate swap and take more apps on multitask, just do this.
Create with minitools in your sd-card these partitions in this order :
- fat 32 (any size)
- ext2 (512MB, to use with link2sd and move apps on)
- swap (min 256, max 1gb)
Then, go on adb shell and enter these commands :
- swapon /dev/block/mmcblk0p3 (3 partitions, otherwise put mmcblk0p2)
- free (to verify swap working)
To get a permanent swap, create a script named userinit.sh in /data/local/ and put this on it :
#!/system/bin/sh
#Swap
swapon /dev/block/mmcblk0pX (x is 2 or 3, see higher)
Save it, and in adb shell enter this command: chmod a+x /data/local/userinit.sh
Finally also on adb shell, this last command :echo vm.swappiness=60 >> /system/etc/sysctl.conf
Personnaly i use 0 on swappiness to got more reactivity.
Reboot and enjoy.
Click to expand...
Click to collapse
Hi mekayzer,
On new .587 fw for Arc, Sony (Ericsson) crew added zram and swap support.
And zram is activated on kernel level (no init.d on stock rom).
Now I added and linux swap partition of 300MB (new class 10 micro SD).
So totally 360 MB for swap.
Any advice how to fine tune this?

Categories

Resources