yashsingh1/xdaforums huggingface dataset:
[Galaxy S III Android Development] mchosch:
Yes , thank you for your excellent and really quick work.

All is perfect with the 3. release of 1.3f kernel:cool:

Gesendet von meinem GT-I9300 mit Tapatalk 2
[Galaxy S III Android Development] Philips9:
Hello guys.

I would try the swap partition with ahrd v.18 and yaank kernel. ..it is possible?

Any feedback about this mod? Increase my ram for example to 2GB and it work well such as galaxy note 2?

Thx in advance

Thx yaank for your work...I'm is your followers since Htc Sensation 's time ;)
[Galaxy S III Android Development] wooptarik:
This module is great. It doesn't increase RAM (yank clearly stated that!!) but that make your phone super smooth.

Installed it couple hours ago and highly recommend it!

---------- Post added at 12:42 AM ---------- Previous post was at 12:40 AM ----------

By the way, any recommendations on swappiness values (which is best) ?
[Galaxy S III Android Development] Yank555:
If you use my kernel, no need for this mod, the hardswap mod is integrated in the kernel flasher ;)

All you need is a primary Linux Swap partition on your SD card.

I wouldn't recommend using as much as 1Gb (you can try !). I found 256Mb to be fine for my use.

Swap is not RAM, and it's a lot slower than RAM, so no, it will not work as good as a Note 2 with 2Gb of RAM, only more RAM can do that for you, unfortunately :rolleyes:

JP.
[Galaxy S III Android Development] wooptarik:
Hey yank, how to determine best swappiness depending on sd card speed, in other words how to test sd card speed, and maybe there is a relativity factor swappiness/sd card speed?

Great work on this kernel by the way :thumbup:
[Galaxy S III Android Development] wooptarik:
Been running some tests and here is my best configuration till now:

+ Sdcard Kingston class 4 (will upgrade for sure, never felt the need till yank's swap, any recommendations are welcome)

+ swap partition 512mb

+ sd card read ahead 512

+ swappiness 70

Very fast multitasking and app switching :D
[Galaxy S III Android Development] Yank555:
Thing is, swap is slower, and requires I/O operations to get stuff to / from swap.

So the more swap you have (i.e. swap size) and the more data you actually have in there (likeliness to swap out = swappiness), the more you may 'feel' the speed difference resulting in some occasinal lags.

If you have them, reduce swappiness and/or swap partition size to limit how much can be swapped out.

Also I found best results using rather large readahead (I run cfq 2048Mb).

While row is a good scheduler in non swap environment, it will be rather bad on a system with swap, since it will delay write operations, meaning at some point swap out will take too nuch time.

JP.

Sent from my custom Sotmax V12 / Yank555.lu SGS3 kernel v3.0a Aroma (Linux 3.0.57) powered Galaxy S3 i9300 using Tapatalk 2
[Galaxy S III Android Development] wooptarik:
Thanks for the reply, I'm still tuning to find which settings fits me best. Is there any risk for sd card wearing faster with a bigger read ahead value? While it's good for swap I'm guessing it would cause more I/O operations on internal sd card

---------- Post added at 04:25 AM ---------- Previous post was at 03:52 AM ----------

Hi yank,

Is multitasking-fix-7 from http://xdaforums.com/showthread.php?t=1888081 compatible with your kernel
[Galaxy S III Android Development] Philips9:
Thx. So I flash your Last kernel and during installation I choose option to able swap partition right? I have a 32GB class 10 samsung Micro sd card.... Which value you advice to choose?
[Galaxy S III Android Development] pippoaacc:
I'm also in doubt about this: I feel a great improvement by setting the SD cache to 2048, instead of the 512 stock, but I can't find an option in System Tuner to set independent values for internal and external SD. So my question is: does a large cache return a faster wear and tear on flash devices. I don't care of ext SD, but I don't want to stress the internal memory.
[Galaxy S III Android Development] fasters7:
tested and working on Omega v36, xxella

i say it's working becouse multy tasking boost i saw, but im couldnt get the terminal report on swap partition

can you give me full code ?

(all i get is sdcard0 info (typing 'free') , or /storage/extSdCard : can't execute : its a directory (typing '/storage/extSdCard > free' )
[Galaxy S III Android Development] Obagleyfreer:
Hey I was just wondering if this screen shot looks right?

I've up dated ROM and had to re do everything, I'm sure there was only 2 sets of figures before but now there is the hard Swap partition and 2 others...... Is this normal? Sorry if this is a stupid question!
[Galaxy S III Android Development] Obagleyfreer:
Sorry here's the screen shot.

Does this seem normal?

If someone could explain what they are I would be greatful, obviously Swap is my Hard Swap Partition, but what are the other 2?
[Galaxy S III Android Development] fasters7:
interesting things happened

i connected my phone to my pc, and started moving files to fat 32 part of my sd card, it was realllllllly slow

so turned off phone, connected sd using a card reader, again, too slow ( 2MB/s max !) (i have a Class 10 apacer 16GB card)

inserted it inside phone, flashed it via android settings->storage, it flashed the whole card, gave me back full 16GB access ! :|

formatted the sd again (a tad more than last time for swap partition) and this time, its not as fast as first time i did this

but copying files (using windows) is as fast as it should be

any ideas ?
[Galaxy S III Android Development] d8389:
what about swap partition on /dev/block/mmcblk0p10 that sometimes mounted as /hidden and contents garbage media files and pre-loaded applications.

It works perfectly for me

#!/bin/sh

mkswap /dev/block/mmcblk0p10

swapon /dev/block/mmcblk0p10

root@android:/ # root@android:/ # cat /proc/swaps
cat /proc/swaps
Filename Type Size Used Priority
/dev/block/mmcblk0p10 partition 573436 12500 -1
root@android:/ # ^D

Warning. It works for me, byt I've not tested factory reset and sales code change.

There may be issues.

Do not try, if you don't know, how to workaround it.

You can find odin flushable image of this partition inside any stock ROM for odin. The file named hidden.img.
[Galaxy S III Android Development] pippoaacc:
Anyone knows something about any wear and tear footprint of a larger sd buffer size?

Inviato dal mio GT-I9300 con Tapatalk 2
[Galaxy S III Android Development] d8389:
This is read ahead cache. SD wearing occurs only on write operations and not affected by this parameter.
[Galaxy S III Android Development] pippoaacc:
Just to know why: 'cause the cache physically resides and is built on the RAM, no?

Inviato dal mio GT-I9300 con Tapatalk 2
[Galaxy S III Android Development] Yank555:
I very strongly advise against using internal memory for swap purposes. At least since SDS appreared on S3 you should know that it means to have an S3 with a broken emmc =>

bricked device

!!

To be perfectly correct, you would also need to change the partition type to the correct Linux Swap partition type, but I don't recommend repartitioning internal storage either...

Swap will be faster on internal storage than on SD card, though, that is true.

RAM is different from internal memory which actually should be called internal storage to be more accurate.

RAM is real random access memory, volatile memory, meaning when removing power, memory content is lost.

Internal storage is falsh memory, NVRAM, non volatile random access memory, so when removing power, memory content is not lost.

Only NVRAM suffers from write cycle limitations, thus readahead buffer is no problem at all, it just reads more, which mostly would have been read anyway, and stores this in RAM, so no incidence on internal storage wear.

JP.
[Galaxy S III Android Development] d8389:
Need not change partition type.

No problem with wearing out blocks on junk partition.

Safe & fast.
[Galaxy S III Android Development] invinciblecc:
Re: [MOD] How to make and use a swap partition on the SD-card (SGS3)

Guus can ivformat and partition myvcard via phills recoverycivsae it hasvthe option
[Galaxy S III Android Development] Yank555:
Not true ;)

Yes you don't

need

to change this, but it's not proper to use it this way.

You are not wearing out specific bits of emmc, in fact you are wearing it out all the way ... see wear leveling.

So I cannot endorse doing this, it's

dangerous

and fast.

JP.
[Galaxy S III Android Development] Yank555:
You can, but you will lose everything that is on the card, just so you know ;)

JP.
[Galaxy S III Android Development] invinciblecc:
Re: [MOD] How to make and use a swap partition on the SD-card (SGS3)

Can that option be used with this hard swap mod

Also is there any performance difference between Hard swap partitioning involved and soft swap(swap file) Loke

Swappiness set to 100 in both I am using soft swap via ram expander

So does the hard swap swap more that is use more swap space and is more efficient or is it more fast in any way does it have any advantages over soft one
[Galaxy S III Android Development] Yank555:
Quote from the FAQ :

JP.
[Galaxy S III Android Development] invinciblecc:
Re: [MOD] How to make and use a swap partition on the SD-card (SGS3)

Ya I read that the I am using ram expander swap file on my ext sd card only all I am asking brother is is making a swap partition on ext sd card better than using swap file on extsd card Ifswappiness value is same on both l

Thanks for reply
[Galaxy S III Android Development] Yank555:
Re: [MOD] How to make and use a swap partition on the SD-card (SGS3)

A partition is always faster than a file, as a file has filesystem overhead which a block device has not, but it's a little difference.

JP.

Sent from my custom Sotmax V13 / Yank555.lu SGS3 U7 kernel v3.1b Aroma (Linux 3.0.59) powered Galaxy S3 i9300 using Tapatalk 2
[Galaxy S III Android Development] invinciblecc:
Re: [MOD] How to make and use a swap partition on the SD-card (SGS3)

So to use with this mod can I partition Mt sd card via pills recovery does it make a compatible partition with this mod whatever u call it th e Linux a type etc

---------- Post added at 09:07 AM ---------- Previous post was at 09:02 AM ----------

This file system head is what u choose in ur kernel right so what should it's value be to facilitate faster use of swap
[Galaxy S III Android Development] gaetanolip:
app_115@android:/ $ export PATH=/data/local/bin:$PATH

app_115@android:/ $ su

app_115@android:/ # fdisk -l /dev/block/mmcblk1

Disk /dev/block/mmcblk1: 15.7 GB, 15707668480 bytes

255 heads, 63 sectors/track, 1909 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/block/mmcblk1p1 1 1786 14339843+ c Win95 FAT32 (LBA)

/dev/block/mmcblk1p2 1786 1910 999676 83 Linux

app_115@android:/ #
[Galaxy S III Android Development] mattiadj:
But for this is necessary a high speed sd?

Why this method is better than zram?

Inviato dal mio GT-I9300 con Tapatalk 2
[Galaxy S III Android Development] gaetanolip:
Maybe i don't have swap?

Trouugh cwmI partitioned 1gb then i chose 0 swap file (because so i read on internet)..
[Galaxy S III Android Development] jnr21:
Mod works nice but i uninstalled it because my sd card is so ****ing slow that there is some bad lags when changing from app to another.

I will buy some class 10 superherospeedygonzalezheman card and flash this mod again then. Thanks.
[Galaxy S III Android Development] Yank555:
OK, that's perfectly fine and correct.

Can you post the result of these commands :

swapon /dev/block/mmcblk1p3
cat /proc/swaps
free

Thanx, JP.
[Galaxy S III Android Development] Yank555:
OK, that is fine, can you now try this :

swapon /dev/block/mmcblk1p3
cat /proc/swaps
free

Thanx, JP.

Fast card is best of corse. Why it is better than zram, read this post.

If you want to use this MOD, you must have a swap partition.

So you need to choose 256 or 512 when asked for swap size.

JP.
[Galaxy S III Android Development] gaetanolip:
Sorry, but if i walt 1 gb of swap what can i do?
[Galaxy S III Android Development] Yank555:
Partition your SD card so that it has a partition as stated in the OP.

You need :

1 primary partition of type "Linux Swap" on your SD card.

JP.
[Galaxy S III Android Development] shorty1483:
app_157@android:/ $ export PATH=/data/local/bin:$PATH

app_157@android:/ $ su

app_157@android:/ # swapon /dev/block/mmcblk1p3

app_157@android:/ # cat /proc/swaps

Filename Type SizUsed Priority

/dev/block/mmcblk1p3 partition 265068 0 -1

app_157@android:/ # free

total used free shared buffers

Mem: 797396 757684 39712 0 44360

-/+ buffers: 713324 84072

Swap: 265068 0 265068

app_157@android:/ #

Works... Hmmm... Should I try just inserting the init script?

sent with Samsungs unleashed beast using Tapatalk 2
[Galaxy S III Android Development] gaetanolip:
Thank you mate, but cwm make me choose al max 256 mb for swap i now dont have a pc i'll try when i have one

Thank you very much

Edit i tried with 256 mb trough cwm 5, my sd has been partitioned but i don't have any swap file on it...
[Galaxy S III Android Development] mattiadj:
Do you think my sd Is fast enough?

Inviato dal mio GT-I9300 con Tapatalk 2
[Galaxy S III Android Development] shorty1483:
So yank swap is working after insert the init script manually. But it's totally laggy. I've class 10 sd card.

export PATH=/data/local/bin:$PATH

app_157@android:/ $ export PATH=/data/local/bin:$PATH

app_157@android:/ $ free

total used free shared buffers

Mem: 797396 781164 16232 0 101212

-/+ buffers: 679952 117444

Swap: 265068 21912 243156

app_157@android:/ $

EDIT: Now after settling, Lags are gone, just when screen on, unlocking is a bit laggy...

sent with Samsungs unleashed beast using Tapatalk 2
[Galaxy S III Android Development] ctrlaltdel:
Just tried and this mod works with the other mod created by mattiadj's to increase the data storage. Thanks Yank555 and mattiadj for the 2 great mod!!

I also got the problem to flash the zip, but it works fine if i extract the script, put it to init.d with correct permission, hope you can fix this on next release.

thanks again!
[Galaxy S III Android Development] fastcx:
Created swap partition before i tried it with error,so thats not the issue,not sure about the problem cause it gave error code 0 and thats all.
[Galaxy S III Android Development] Yank555:
Yep, even though I don't understand why it wouldn't install :(

JP.
[Galaxy S III Android Development] Yank555:
Not sure that actually tested the external SD card, but most likely the internal :confused:

Check on the first screen of SD Tools what it says for SD card info, mine says : /mnt/sdcard, that would be the internal, the external would be "/mnt/extSdCard".

JP.

PS: Quando ero piccolo venivo spesso in ferie a Francavilla, belli ricordi ;)
[Galaxy S III Android Development] graffixnyc:
Nice mod, I was actually thinking not too long ago if a swap partition or pagefile would benefit in some way. I have a couple quick questions. 1. Can I create the partition on my card with data on it? or will it wipe the card? I know with linux/windows you can repartition without losing any data and since Android is based on linux I would assume you can but want to make sure before I do(copying over 30+ GB is a PITA lol). 2. Are there any other things that can "break" besides the extra strain on the SD card? 3. Will there really be a noticeable performance difference if I set a 2gb swap?

Thanks in adavance!
[Galaxy S III Android Development] Yank555:
Some software will allow you to shorten your FAT partition without losing data, but even those will reccomend to back the data up, so there's always a risk to lose data ;)

And yes, it is a PITA :D I at least backed them up, than went for shortening the partition (Partition Minitool Wizard on Windows), and since the data was still there, that at least saved me the time to copy back ;)

Nope, nothing except the potential faster wear of the card. And if it doesn't work or makes no difference to your usage of your phone, I've made the uninstaller, which will remove everything as if it had never been there (except the partition obviously ;)).

Honestly I have played around quite a bit, never saw an reason to actually go above 256Mb, but since I can spare them, I now have a 512Mb partition for the SGS3 (it's a faster, bigger, better phone than my previous, so I gave it more to play with).

But the 512 never went full so far... so I tend to think more would really be wasted, but it's up to you, it will work.

JP.
[Galaxy S III Android Development] Yusei:
Good evening,

Now I came home after going to see Dark Knight Rises and the 1st thing I did was apply this script.

Installation was aborted manually but got everything right.

1.4GB of swap partition xD

Thanks dude!
[Galaxy S III Android Development] Yank555:
Not certain to understand your question :confused:

In most recoveries you can repartition your external sd card. If Philz's does, then it will work (I don't use Philz right now so can't check).

Important, though, are 2 things :

1) repartitioning in recovery will delete everything you on your card, so make a backup first !

2) if the recovery asks for the size of an sdext and/or sdext2 partition, set those to 0, on set the swap partition to 256 or 512 or whatever you want

Then flash the mod and reboot as indicated in the OP.

JP.
[Galaxy S III Android Development] bala_gamer:
@yank

just finished configuring swap partition on my 64gb card, thanks for your detailed info mate, it is very useful :)
[Galaxy S III Android Development] Yank555:
Thanx ;)

A quick OT question, which 64Gb SD card did you buy ?

I got 2 Sandisks a few months back, and both lasted less than 1 day :( Amazon replaced the first (I thought it was just bad luck) but when the replacement card also broke a few hours after I started using it, I asked my money back and haven't been too keen in getting another one :(

But I could use the extra space... now more than back then ;)

JP.
[Galaxy S III Android Development] bala_gamer:
im using sandisk 64gb class 10 for the past 4 months :), did your card just broke on normal usage or after started using swap on it?.
[Galaxy S III Android Development] Yank555:
I just managed to partition it, and it broke while still in the PC card reader restoring my data on the FAT partition :(

None of both actually even made it into my phone :(

JP.
[Galaxy S III Android Development] bala_gamer:
Re: [MOD] How to make and use a swap partition on the SD-card (SGS3)

Oh that's poor. May you received a card with manufacturing defect.

Btw do you think row scheduler works good with swap enabled? I think it causes some delay in i/o operations.

《posted from s3》
[Galaxy S III Android Development] Yank555:
Re: [MOD] How to make and use a swap partition on the SD-card (SGS3)

Bad lucm twice, two cards in a row to fail, I wondered if 64Gb were a little 'too sensitive'...

At first I thought so as well when I had my kernek based on N8020 sources, but since on Sammy Update 7 sources, hardswap & row works like a charm !

But if you run into trouble I suppose cfq is the obvious choice.

JP.

Sent from my custom Sotmax V13 / Yank555.lu SGS3 U7 kernel v3.1b Aroma (Linux 3.0.59) powered Galaxy S3 i9300 using Tapatalk 2
[Galaxy S III Android Development] KKTHX:
Everything wotking great.

Time will show now if swap is really usefull or not.

Wipe dalvik/ cache partition after installing swap?
[Galaxy S III Android Development] Yank555:
Re: [MOD] How to make and use a swap partition on the SD-card (SGS3)

No need ;)

JP.

Sent from my custom Sotmax V13 / Yank555.lu SGS3 U7 kernel v3.1c Aroma (Linux 3.0.60) powered Galaxy S3 i9300 using Tapatalk 2
[Galaxy S III Android Development] pippoaacc:
R: [MOD] How to make and use a swap partition on the SD-card (SGS3)

Thank you so much, in this way you also confirmed my doubt about a little more RAM drain i saw by increasing the buffer size. Very clear and detailed.

Inviato dal mio GT-I9300 con Tapatalk 2
[Galaxy S III Android Development] grzesdroid:
Odp: [MOD] How to make and use a swap partition on the SD-card (SGS3)

@yank

On my phone I installed your kernel. the aroma set "headswap-yes", "swappiness-100". My question is: does this mod change anything? If I install a kernel with options SWAPINES, HARDSWAP I have everything enabled? Because the terminal emulator it says "swap 0, 0, 0

SGS III / crDroid 11.1 / Yank555.lu 3.1c / JKay deluxe framework 14.7.4 / Tapatalk 2 / SwiftKey 3
[Galaxy S III Android Development] invinciblecc:
Re: [MOD] How to make and use a swap partition on the SD-card (SGS3)

Do un have a swap partition on ur sd card the option in kernel is just the command it does not create the partition

It does everything u need after the partition

Finally enjoying s3

Yanks kernel

Sotmax v13

Zram enabled

Swap enabled
[Galaxy S III Android Development] Yank555:
Re: [MOD] How to make and use a swap partition on the SD-card (SGS3)

Absolutely correct. In orde4 to use hardswap, you need to create the swap partition, the rest is handled by the ker el or the mod.

And if you use hardswap from the kernel, no need to flash this mod, it's the same ;)

JP.

Sent from my custom Sotmax V13 / Yank555.lu SGS3 U7 kernel v3.1c Aroma (Linux 3.0.60) powered Galaxy S3 i9300 using Tapatalk 2
[Galaxy S III Android Development] fuxmen:
Thanks for mod, just installed and will see how its work because without it I'm not happy with SGS3 multitasking ;/

Edit

At last I have multitasking in my phone no more browser refreshing....

Thanks a ton!
[Galaxy S III Android Development] KKTHX:
@Yank555

It is possible to asign android process, aplications to load to swap ?

Or it is lottery ?
[Galaxy S III Android Development] Yank555:
It's not about processes or apps, it's about memory management, and putting memory pages into swap. Reread the FAQ (under "How do swap and Android Low Memory Task Killer get along ?"), I do explain that quite precisely there ;)

JP.
[Galaxy S III Android Development] lefttobleed:
I have installed as mentioned but still i get 0 0 0 for swap in terminal. Pls help.

This is what i did.

1> installed terminal from playstore.

2> installed busybox from playstore.

3> partitioned the sd card for 498MB swap (as using other capacities like 512MB were not getting partitioned.)

4> installed the mod.

5> removed the stock yank kernel.

6> Reinstalled your kernel. this time choosing your default values.

7> checked terminal using 'free' command.

My SD card is sandisk 32gb class 10 and setup as mentioned in my signature.
[Galaxy S III Android Development] Yank555:
Re: [MOD] How to make and use a swap partition on the SD-card (SGS3)

Ok, first off, either the mod or hardswap in my kernel, else you install it twice, not a problem, but makes little sense ;)

Which kernel version did you use ?

Latest version will allow using busybox installed anywhere in the path, the previous versions need busybox installed in /system/xbin.

Also, are you certain to have created only primary partitions ?

Post /data/hardswap.log as well as /data/swap.0.log (if there is any), so I can have a look...

JP.

Sent from my custom Sotmax V13 / Yank555.lu SGS3 U7 kernel v3.1c Aroma (Linux 3.0.60) powered Galaxy S3 i9300 using Tapatalk 2
[Galaxy S III Android Development] lefttobleed:
yes you have mentioned this in previous posts so i had done an iteration in which i removed the mod and kernel and then only installed your kernel with your settings. but again swap did not work.

My kernel version is 3.1b.

oh sorry my mistake, i just noticed that u have a new kernel out 2 days back. i thought 3.1b was the latest.

sorry.

Will use the new kernel.

thank you for the mod and kernel. they r great.
[Galaxy S III Android Development] Yank555:
Have you checked where busybox was installed ? The app allows for two different locations :

/system/bin

/system/xbin

If in fact it was installed on /system/xbin, it should have worked with 3.1b as well.

Let me know how it goes, we'll figure out the problem ;)

JP.
[Galaxy S III Android Development] DenethorLenwion:
Sorry for a noob question, but does this mod work in Cyanogen 10.1 nightlies? If yes -- will it be overwritten with each nightly upgrade?

Thanks in advance!