Zram vs Swap - Xperia Arc General

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?

Related

Swap FILE on Hero?

I've been digging around trying to find out the benefits and drawbacks of using swap on android devices, and the general consensus is 'not worth it since SD card is slow', and 'android is good at killing programs when necessary and starting them up where they left off'
Well, that got me thinking, since I have the MoDaCo ROM installed, and I'm utilizing Apps2SD - i've got all this free space on the (relatively) fast internal flash memory that's going unused.
It seems to me that a swap file (not partition) in /data would potentially be a boon to system stability for people using *lots* of applications simultaneously. My reasoning:
1) Internal memory is much faster than the SD card interface, even at class 6.
2) Using Apps2SD in combo with android's default mem management, if an app is auto-killed and needs to be restored into memory, it's reloading the apk from the SD card. Due to this behavior, there's little difference between using a swap partition on the card vs android reloading apps from the card and restoring state.
A swap partition or file on internal memory would avoid touching the SD card interface alltogether except when inititally starting up a new app. Storage space benefits of apps2sd is retained, while potentially speeding access to a sleeping app.
So, to test out the theory, I tried to create a 64mb swap file in /data/swap/swapfile, using the following steps (again, this is on the MoDaCo ROM):
Code:
./adb shell
# mkdir /data/swap
# dd if=/dev/zero of=/data/swap/swapfile bs=1024 count=65536
65536+0 records in
65536+0 records out
# mkswap /data/swap/swapfile
Setting up swapspace version 1, size = 67104768 bytes
UUID=ca4e84af-2533-4072-8c66-7bf6f494dc34
Awesome so far. Now I hit a snag:
Code:
# swapon /data/swap/swapfile
swapon: /data/swap/swapfile: Invalid argument
It appears that the swapon function in BusyBox doesn't support swap files, unless I'm overlooking a step in here.
Has anyone tried this sort of thing before (on previous android phones, or other roms that is)? A quick google search showed lots of people doing this exact thing to enable swap files on their G1's, rooted with BusyBox installed, nad having it work just fine.
For reference, the MoDaCo ROM has this version of BusyBox:
BusyBox v1.15.2 (2009-10-08 09:47:18 BST) multi-call binary
Any hints or help would be greatly appreciated.
could you possibly use a symlink to trick it into thinking it's not a file, but a partition instead maybe?
EDIT: Just saw this thread too, don't know if you've seen it or not, but it seems like an app that could do this for you. Again, you'd have to trick it by using a symlink or something I bet, since you're wanting to do it on the internal memory.
http://forum.xda-developers.com/showthread.php?p=3329186#post3329186
symlink trickery didn't work for me unfortunately, but I think I have another approach.
swapon appears to be looking for a device node, so I'm going to try to trick the system into giving it one by mounting a fake disk image with loopback, and assigning it's 'partition' as swap space.
not really sure if android will let me do that sort of crazyness, or if loopback is even compiled into the fs drivers, but will find out shortly.
[edit]
So, it turned out to be far simpler than all that nonsense above. This kind of thing is why I love linux:
Code:
# * made 8mb swapfile using steps in previous post, to /data/swap/swapfile *
# losetup /dev/block/loop0 /data/swap/swapfile
# swapon /dev/block/loop0
magic!
Code:
# free
total used free shared buffers
Mem: 196824 191320 5504 0 24
Swap: 8184 0 8184
Total: 205008 191320 13688
Now, just need to figure out how to mount it up at boot and set a reasonable swappiness.
Well, it was a good experiment. One that I *do not recommend* for others to try.
After getting the swap file setup and running for a few days, most things work really well - the SenseUI interface is always snappy, applications running in the foreground are generally very responsive and smooth.
Unfortunately, *anything* that gets swapped out of main memory will hang your phone for a good 30-40 seconds at least trying to read it back in to main mem (therefore swapping something else out simultaneously). Things like the web browser, the notification pulldown, the apps menu, just become completely unusable. And this was with 'swappiness' set down to 10 - so theoretically there should not have been excessive swapping.
Good to know we have these tools available in times of need, however I again do not recommend swap of any kind, SD card or otherwise.
Too bad we can't upgrade the RAM on these devices

[Tutorial] How to setup a2sd in SGA S5830?

[Tutorial] How to setup a2sd in SGA S5830?
I am not responsible for anything you choose to do.
Prerequisites:
1. EXT4 partition on microSD Card
2. A2SD zip installer
3. CWM4 Recovery
4. Root/SuperUser
5. Terminal Emulator or A2SDGUI
DO NOT TYPE "" THEY ARE ONLY THERE TO SHOW WHAT TO TYPE.
* Make sure SD card is formatted with ext 4
* Open android market and download terminal emulator
* Open terminal emulator
* Type "su" then press enter and grant root access if keyboard is gone press and hold menu then type "a2sd install" and press enter now there will be stuff going on do not exit or do anything on phone until it reboots.
* After rebooted open terminal again. type su then enter now type "a2sd check" then enter now scroll back up in terminal and look for apps on the right of the screen once you see that look to the left and look and make sure it say programs run from sd card and there is [ ] next to it not [ ... ] (... are there to show space) also check your storage and see if it decrease this is another way you can tell if it worked. Titanium backup is great for checking your storage and backing up apps.
* Now type "a2sd zipalign" after you type this you will see some words fly up the screen just wait till it stops and last line says setting file system ready property to 1. the next line will be #
* Check your storage you should see a decrease. if you want it to decrease more open terminal emulator and type "su" press enter then type "a2sd cachesd" press enter wait for reboot
* This is an optional step. this will sometimes help with speed. Now type "a2sd heapsize64" press enter and wait for reboot.
* After reboot now check storage again and it should have dropped again. once you have done all this your phone will be running on your sd card and its internal memory so when sd card is mounted to pc your phone maybe a little slow. also boots will take a few seconds longer with dalvik moved to sd. now with your apps running from sd your apps will automatically be installed there so its set it and forget it.
* If you change roms and you want a2sd+ make sure the rom supports it and you will have to set it up again but after your sd card has been partitioned once if you never format it back to only one partition you will not need to repartition it like in step 2 but you can follow step one and see if your sd card is formatted correctly.
Thanks to user kryptico of forums.miui.us for making this guide.
Activate Swap partition:
su
a2sd reswap
Deactivate Swap partition:
su
a2sd noswap
Other Swap Scripts:
su
a2sd swapspace - To check swap partition
a2sd swappyXX - Assign swap percentage (e.g. swap 10%, then enter swappy10)
If someone want to revert to default settings, then use below commands.
Revert Apps to Internal Memory:
su
a2sd remove
Revert Cache to Internal Memory:
su
a2sd cachesdreset
Revert Zipalign:
su
a2sd nozipalign
Revert Swap:
su
a2sd noswap
It's clear that nexusace have a2sd darktremor enabled by default. And I think the tutorial on the original nexusace thread is clear enough.
But probably this thread is useful for newbie.
Yes fla.sh, I created this thread for newbies... So that they can easily use a2sd.
Below are my SGA memory details as per Titanium Backup:
System Rom: 218 MB (19.8 MB Free)
Internal: 189 MB (174 MB Free)
SD Card: 13.7 GB (6.82 GB Free)
SD Card (a2sd): 2.11 GB (1.96 GB Free)
DP
How to format sd card to ext4? I'm little bit confused.. Should format using in phone or by pc/laptop..
Sent from my GT-S5830 using XDA App
do u know how to activate DALVIK JIT in terminal ?
i tried with command "a2sd jit" but it said dat its unknown command. i know we can activate D-JIT through a2sdgui but wanted to know how to do the same in terminal
rockzanei said:
do u know how to activate DALVIK JIT in terminal ?
i tried with command "a2sd jit" but it said dat its unknown command. i know we can activate D-JIT through a2sdgui but wanted to know how to do the same in terminal
Click to expand...
Click to collapse
Correction: can't find the command.
You can check at Darktremor's Apps2SD page: https://www.facebook.com/note.php?note_id=158826790833326
Diliban said:
Yes fla.sh, I created this thread for newbies... So that they can easily use a2sd.
Below are my SGA memory details as per Titanium Backup:
System Rom: 218 MB (19.8 MB Free)
Internal: 189 MB (174 MB Free)
SD Card: 13.7 GB (6.82 GB Free)
SD Card (a2sd): 2.11 GB (1.96 GB Free)
DP
Click to expand...
Click to collapse
My Titanium Backup details with my own modifed version of the rom(5 days old install) just after being done with your tutorial :
218MB (63.9 MB Free)
Internal: 188 MB (175 MB Free)
SD Card: 15.0 GB (5.50 GB Free)
SD Card (a2sd): 991 GB (894 MB Free)
Thanks for the guide, forgot the commands and saw it as first post
Does this work on 2.3.4 kph fw???
Sent from my Galaxy ace using Tapatalk
@ chinoyray i already checked that page but its not there... i even tried this page http://forum.xda-developers.com/showpost.php?p=7021609 but still not working from terminal
Android-Desire said:
My Titanium Backup details with my own modifed version of the rom(5 days old install) just after being done with your tutorial :
218MB (63.9 MB Free)
Internal: 188 MB (175 MB Free)
SD Card: 15.0 GB (5.50 GB Free)
SD Card (a2sd): 991 GB (894 MB Free)
Thanks for the guide, forgot the commands and saw it as first post
Click to expand...
Click to collapse
Why your device have free memory 63.9 mb and my device with codenexus rom have free memory only 13nb. Thanks
Sent from my GT-S5830 using Tapatalk
Because i modified the rom to my needs.
Sent from my GT-S5830 using XDA Premium App
Are you using linux?
If you have ubuntu, download gparted:
sudo apt-get install gparted
Open it by going "System>Admin>Gparted", then go "File>Devices" and pick /dev/sdb
Then, format fat32 to ext3/4
Android-Desire said:
Because i modified the rom to my needs.
Sent from my GT-S5830 using XDA Premium App
Click to expand...
Click to collapse
More free space of system rom have any advantage? Thanks
Sent from my GT-S5830 using Tapatalk
joryS5830 said:
More free space of system rom have any advantage? Thanks
Sent from my GT-S5830 using Tapatalk
Click to expand...
Click to collapse
Well i find my phone very stable and fast with all that free space, but i could be wrong about it, havent checked any benchmarks yet as i just want a fast phone with more free memory.
The Quadrant Score for my Galaxy Ace is 1066... with the amount of space I have.
need help
can anyone help me how to ext4?
really want to try this rom. many thanks who will help
Did anyone use datasd in your coderomnexus?
Sent from my GT-S5830 using XDA Premium App
Great ROM
System Rom: 218 MB (16.7 MB Free)
Internal: 189 MB (150 MB Free)
SD Card: 7.35 GB (4.56 GB Free)
SD Card (a2sd): 503 NB (382 MB Free)
migz012788 said:
Did anyone use datasd in your coderomnexus?
Sent from my GT-S5830 using XDA Premium App
Click to expand...
Click to collapse
Yes... I used a2sd in Coderomnexus and it worked really fine.
Siblyx said:
can anyone help me how to ext4?
really want to try this rom. many thanks who will help
Click to expand...
Click to collapse
Do google search for Minitool Parition and search the same in XDA forum or you can use the below mentioned linux way which considered as lot risky.
http://forum.xda-developers.com/showthread.php?p=15944289#post15944289

[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

Swap - sd-card

I have an 8GB sd-card and tried to make 2 partitions
+/- 7GB - ext3 - data
+/- 1GB - Swap
But everytime I try to make this tutorial my phone does not recognize the swap partition -> HERE
after much time trying and failing I decided to do this by CWM-based v5, but in CWM only have 4GB for DATA and 512MB for swap partition.
now
+/-3,5Gb - fat32
4GB - Ext3 - data
512MB - Swap
does anyone know another way to do this?
You probably don't have a script in your /etc/init.d folder to enable swap. Run the attached script to create one and swap should work.
BartLH said:
You probably don't have a script in your /etc/init.d folder to enable swap. Run the attached script to create one and swap should work.
Click to expand...
Click to collapse
tks man, i will try later
I cant download the file - erro 404 -
Sent from my LG-GT540 using xda app-developers app
http://forum.xda-developers.com/attachment.php?attachmentid=799143&d=1322589251
try this ; unzip, put to init.d
also i'm not sure if swap works if you don't have fat32 but 7 GB of ext :0
you could alse try to resize the current partitions as you made them with CWM
edit: btw 1 Gb swap isn't very useful. if you have class 10 it will make your phone faster of course, but you'll never get your 1 GB swap full. i suggest to stay at 512 or less.

[Guide] Swap Partition

[ 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!

Categories

Resources