Joined
·
380 Posts
I simply hate waiting for home screen or for backgrounded apps to reload in memory so I decided to enable the SWAP on my M001.Quite simple:- prepare an SD card with first partition being all the size FAT32 formatted , minus 128MB (it's arbitrary the dimension, the bigger space you leave, the bigger virtual memory You'll get). I made partitioning in Gparted, very trusted linux program you can find in any distribution and is GTK based. First partition FAT32 (boottable flag on) and second partition LINUX SWAP (mine was only 128MB cause I don't have a big SD card unfortunately).- connect it to your Eken and enter terminal emulator+su+vi or EZ file explorer..I put this little add on in usbgadget.sh, cause this script is called at any reboot:Insert this after the first written line (after #!/system/bin/sh , and before the if blablabla line)
Ok.. remember to save the file, cross your fingers and reboot: in terminal emulator if you issue the command
you'll see that swap memory spaces aren't zeroes anymore, and with this settings you'll see some relief when using high ram demanding apps or parallel applications. SD CONSIDERATIONS:Data traffic on an SD card causes nand cells to worn quicker than before. So if you decide for this, consider that your SD could die sooner; use it better on good 1.000.000 cycles guaranteed SD cards like good Kingstones or Sandisks.. That's why I decided it's better to use a partition for swapping and not SwapFile made in dd... It will only wear a part of the disk, and if it runs out of nand cells life you should not have your data damaged, but only swap partition you can live without ;DI'm not responsible for any casualties may happen to you, your device or mind
USE IT AT YOUR OWN RISK !!!
Code:
swapon /dev/block/mmcblk0p2 #according to your number of SD partitions, it could be mmcblk0p3 etc.echo 15 > /proc/sys/vm/swappiness #important for setting the right swapping attitude; higher numbers (0-100) will increase the swapping in SD card, [b]shortening its life for sure too much[/b]; could even impact on performance if it's too high cause the SD cards aren't really fast to be used like ram memory.
Code:
free
