Jump to content

How to disable swap in CM6?


Guest olivier k

Recommended Posts

Guest olivier k

Hello,

I'm using CM6 0.30 and I'd like to disable the swap usage:

#free

total used free shared buffers

Mem: 107412 105236 2176 0 16

Swap: 19324 15664 3660

Total: 126736 120900 5836

#df

Filesystem 1K-blocks Used Available Use% Mounted on

tmpfs 53704 12 53692 0% /dev

tmpfs 53704 0 53704 0% /mnt/asec

/dev/block/mtdblock1 102400 97888 4512 96% /system

/dev/block/mtdblock2 92416 79680 12736 86% /data

/dev/block/mtdblock3 20480 1160 19320 6% /cache

/dev/block/mmcblk0p2 468885 2 443866 0% /sd-ext

/dev/block/vold/179:1

3439168 1525376 1913792 44% /mnt/sdcard

/dev/block/vold/179:1

3439168 1525376 1913792 44% /mnt/secure/asec

I've tried:

#swapoff /dev/block/mmcblk0p2 , but I got an invalid argument message.

I#d like to disable the swap, because since I'm able to move the apps on the SD, I don't need space anymore and I guess that swapping is using some processor resources. It would be perfect if I could handle the swap in a file (like /etc/fstab), to have it permanently off or on.

Thanks

Link to comment
Share on other sites

You could just delete your swap partition.

And Swapper2 will let you handle swap through a file instead of a partition.

Edited by twrock
Link to comment
Share on other sites

Guest olivier k
You could just delete your swap partition.

And Swapper2 will let you handle swap through a file instead of a partition.

Thanks for your answer twrock, but I prefer to keep it (to be able to use it again without formatting the card)

There must be an easier way, no?

Link to comment
Share on other sites

Guest AntonioPT
Thanks for your answer twrock, but I prefer to keep it (to be able to use it again without formatting the card)

There must be an easier way, no?

Just use Gparted (on Linux/Ubuntu) to delete the swap partition and to expand the other partitions to occupy the free space.

Link to comment
Share on other sites

Guest agitate
#df

Filesystem 1K-blocks Used Available Use% Mounted on

/dev/block/mmcblk0p2 468885 2 443866 0% /sd-ext

I've tried:

#swapoff /dev/block/mmcblk0p2 , but I got an invalid argument message.

Are you sure you are giving the correct partition to the swapoff command? It looks like mmcblk0p2 is mounted as your sd-ext and so is probably ext2 or 3. You can find the currently mounted swap partitions in /proc/swaps

cat /proc/swaps
It you have FAT - EXT - SWAP partition order then it will be mmcblk0p3 and so you will need to do:
swapoff /dev/block/mmcblk0p3
Alternatively, swapoff can be run with the -a parameter to turn off all swap devices:
swapoff -a

Link to comment
Share on other sites

Guest olivier k
Are you sure you are giving the correct partition to the swapoff command? It looks like mmcblk0p2 is mounted as your sd-ext and so is probably ext2 or 3. You can find the currently mounted swap partitions in /proc/swaps

cat /proc/swaps
It you have FAT - EXT - SWAP partition order then it will be mmcblk0p3 and so you will need to do:
swapoff /dev/block/mmcblk0p3
Alternatively, swapoff can be run with the -a parameter to turn off all swap devices:
swapoff -a

...

I've tried the latter one, but swapoff -a is complaining that there is no /etc/fstab file. I will try to find the correct partition within the /procs/swaps file. As I said, it is just for testing purposes, when I will find the appropriate settings I will either keep/delete the swap.

Edited by olivier k
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.