yashsingh1/xdaforums huggingface dataset:
[Motorola Milestone Android Development] kabaldan:
You don't have to repartition the SD card if you already have a bigger swap partition created there and you only want to test a smaller swap size.

You can use "mkswap /dev/block/mmcblk0p3 32768" to create only 32MB swap even on e.g. 128MB swap partition.

Just make sure you don't use bigger number than is the actual partition size.
[Motorola Milestone Android Development] Hellscream2010:
real trouble

Hi all

firstly very thanks to kabaldan and all the geniuous team for the great step on the cm 7.2.4

but really i have a problem since the 7.2.2 rom and i think eariler like maxle , i can't connect to any ad-hoc network !

unlike what you are saying "Just connect it normally" once on 7.2.1 or .2 i tried to check the use static ip address in wifi setting and it worked but only once, after it and on the development up to 2.4 it is not working.

please helllllllp :confused:
[Motorola Milestone Android Development] BoyBawang2:
Hi!

Is LauncherPro more resource hungry than the default in 7.2.4? Because I find LauncherPro much smoother in scrolling but I will discard it if it takes more RAM.

thanks
[Motorola Milestone Android Development] Babis_ECE:
Thanksnadlabak for your help and time. With the mkswap command we basically create a Swap partition "inside" the existing swap partition? i will try it out right away..

By the way, which swap size do you suggest? 128MB? 256MB?

Edit: After reformatting my SD Card with the guide you mentioned earlier I have now 3 partitions again.

6.5GB FAT 32, 1GB EXT4 for apps and 256MB Swap. Swap seems to work just fine (judging by the result I got with the command "free" in Terminal Emulator), the SD card too. But I am facing the following problem:

The apps I downloaded form Play Store force Close all the time.. Link2SD, Task Manager, etc.

I tried wiping cache, dalvik cache, nothing. Any ideas?
[Motorola Milestone Android Development] jarlaxlebaenre:
There is another thing that I have noticed. Very often phone feels really slow after waking up, touch is not detected properly and all animations are laggy. As for the music playback lag, it even occurs while switching pages in app drawer, turning screen on/off or sending a message via Google Talk. As these problems persisted I've tried to change vsel to a bit higher values:

#!/system/bin/sh
echo "5 1000000000 64" > /proc/overclock/mpu_opps
echo "4 800000000 50" > /proc/overclock/mpu_opps
echo "3 600000000 40" > /proc/overclock/mpu_opps
echo "2 400000000 33" > /proc/overclock/mpu_opps
echo "1 250000000 30" > /proc/overclock/mpu_opps

For a time all was fine and Moto was super responsive but after a day or two I'm back to lags and choppiness. I'll post some logs soon.
[Motorola Milestone Android Development] papadawgg:
I just had a random freeze, when i used to play Fantashooting. I have no clue why it happened and i hope, you might help me. Logs are attached.
[Motorola Milestone Android Development] heavony.ivory:
I tried to re-size my ext4 partition using the above advise but it won't work for me.

Now I stuck and need some help.

My origin ext4 is gone with all system and user app.

The phone boot but with no gaaps and no root.

I tried to root the phone from OR several times and tried also to apply the latest version of cm7 & gaaps but with no success.

any idea ?
[Motorola Milestone Android Development] <insert_name>:
are you trying to make a smaller ext partition?

If so, its most likely full before everything is restored....
[Motorola Milestone Android Development] d.casper.b:
Thanks for the updates.

I'm unfortunately having problems. After a while the phone becomes laggy and I cannot do anything.. I have to restart the phone. I just missed a call now too, but after a restart it's ok again for a while.

I have enabled/disabled swap on a swap partition to no avail.

I have not adjusted any cpu settings.

What could be the problem?

It happened in 7.2.4 and now 7.2.4a ..
[Motorola Milestone Android Development] Quentin himself:
Try to disable zRam ;) Settings->Performances->Memory Settings(something like that)->Enable zRam->Disabled
[Motorola Milestone Android Development] d.casper.b:
Ok, I'm currently flashing back to 7.2.1 because the phone is kind of unusable. I left it for 20 minutes, and then when I used it again, it was lagging - i can tell from the lockscreen already that it's lagging as i struggle to unlock it.
[Motorola Milestone Android Development] Eiertschik:
Too big swap size gives a boost at first - but after some hours the phone becomes sluggish because it doesn't kill enough background processes and spends all it's ressources on swapping.

That's why I've further decreased my swap partition size to 32MB - the hunt for the perfect value continues...

Apart from that 7.2.4a works fine here.
[Motorola Milestone Android Development] -FuFu-:
if use my 98swapon script, edit the swappiness value from 15 to 10

just play with the value, for me 15 works fine
[Motorola Milestone Android Development] Strokesws:
I'm ok with swappiness value 15 and a 16mb swap file.

I loved this new build, everything works fine! :D
[Motorola Milestone Android Development] LuigiC6:
Does anyone else get "SD card unmounted or not present" when they open the gallery on 7.2.4a, or just me? It's mounted for everything else (music, swap, apps2ext, ect.).......
[Motorola Milestone Android Development] Eiertschik:
No gallery problem here :-\
[Motorola Milestone Android Development] LuigiC6:
Hmm, wondering if it's the way I have my sd card set up. Thanks for the confirmation.
[Motorola Milestone Android Development] mantokoski7:
I had 7.2.2 with ext2. Now I have 7.2.4 with ext2 and 180MB swap. Multitasking works great with memory-hogs like Facebook. I play Pepsi's geocaching-style competition with the default browser. It's always gonna be laggy rendering Google Maps on a web page, but now with 7.2.4 the browser also seems to crash sometimes. It just vanishes and home screen comes up, and when I open browser again it doesn't remember URL or login/cookies and Pepsi says I already used the code so game over. With 7.2.2 it never crashed.

Another new issue is with camera, it sometimes gets laggy when changing on-screen settings and also the camera app has done a vanish crash once.

Next I will try 7.2.4a maybe with smaller swap and try to change swappiness value.

Edit: Also noticed Talkdroid Messenger doesn't always start at boot even if chosen so in the settings. I've only used Talkdroid with 7.2.4.
[Motorola Milestone Android Development] alicheusz:
reduce swap to around 32 MB (with no compcache) at least camera lag should be gone
[Motorola Milestone Android Development] d.casper.b:
ok, I've done a fresh install of 7.2.4a. Merged swap and ext3 into one ext4 partition. Now using fufu's script, which is making use of the ext partition for swap.

Also, did a wipe/factory reset.

Let's see how it goes.

Have not adjusted the script at all. So far so good - have just been reinstalling all my apps.

EDIT: so far, the phone has been performing just fine since the fresh install!
[Motorola Milestone Android Development] ColdSphinX:
I've done some testing the last weeks... 32/64/48mb swapfile then 32mb swap partition after that 10/18/26% zram and zram was mostly the best overall performing of these.

But yesterday I went back to swap partition, because I saw the much more intensive cpu usage and some problems after wakeup with that.

Now I've a 256mb swap partition, everithing seems fine, smooth and I even don't have to set my adw ex launcher to persistent.

no tweaks, just swappines of 15.
[Motorola Milestone Android Development] jerminhu:
I've already had an ext partition applied several versions before. And I have just updated my phone to 7.2.4a the day before yesterday. Now is it necessary to make out a third swap partition? Will it bring any performance boost? If the answer is yes, how can I re-partition the SD card without affecting the apps installed on the ext partition?

PS. I don't have any card readers.
[Motorola Milestone Android Development] ColdSphinX:
That new Partition is not really required, you can also use zram/compcache or a swap file on any partition.

swap is used as a virtual memory to extend ram so it helps with the low memory issues on our milestones.

zram creates a compressed swap partition in the current ram. so there gets ram lost, but you'll regain more due to the comression.

As in unix everithing is a file, even a device or patition... you can also use an empty file to make it a swap "partition". but that's less performant because of the additional filesystem layer.

I'm currently not sure if the full e2fsprogs toolkit is included in kabaldan's OR

But I found a good howto here for resizing ext3/4 partitions via shell.

/!\

umount all sdcard partition bevore resizing!

/!\

​

The most userfriendly way would be an card reader and Gparted Live
[Motorola Milestone Android Development] -FuFu-:
my MiniMod OR has a resize option included...

it backups the ext partition, delete it, resize fat, recreate ext and create swap... after that it restores the ext backup
[Motorola Milestone Android Development] afadel:
I tried the command but instead of running it shows me the instructions of command line. If I don't specify 32768 it runs successfully but creates for the whole partition size (130mb).

Am I missing something? I ran the command in OR console.

Enviado de meu Milestone usando o Tapatalk 2
[Motorola Milestone Android Development] -FuFu-:
if you use my 98swapon script, you must edit the script, cause the script prepare the command on every boot to cleanup the swap partition/file

its also possible to use the commands on running system by using the Terminal Emulator just type in:

su

swapoff /dev/block/mmcblk0p3

mkswap /dev/block/mmcblk0p3 32768

swapon /dev/block/mmcblk0p3

then type in free to see if it works ;)

hope it helps you
[Motorola Milestone Android Development] afadel:
In terminal the mkswap command works. I guess in OR is a different executable. I'm using your OR, so you might know better. :)

I'll edit your script to use the swapsize variable (times 1024) with the mkswap command.

Thanks for the tip! ;)

Enviado de meu Milestone usando o Tapatalk 2
[Motorola Milestone Android Development] nagabushan.c:
Need suggestion

Was out of the forum for some time, i couldnt able to summarize what needs to be done, in terms to improve performace, bettery life and smooth transitions.

Can anyone please help me in bullet points on what all i have missed out.

I'm running CM 7.2.4 (I see there is 7.2.4a and 7.2.4b released).

OR: Minimod_v0.21.

I have 8GB Class 6 SD Card with ~7GB FAT32 and ~1GB EXT3. (last i used minimode OR to format and create EXT3 partition).

Please help me. I would like to have a stable, well performace and battery last long ROM on my milestone.

Thanks in advance.
[Motorola Milestone Android Development] Erovia:
Use the latest CM7, the latest MiniMod, install FuFu's swapon script via OR (SD Tools menu > "Copy 98swapon script") and disable ZRam.
[Motorola Milestone Android Development] nitrobg:
A new minor update is up, you can download it from

https://github.com/nadlabak/android/downloads
[Motorola Milestone Android Development] kabaldan:
By using swap (including compcache/zram) it's guaranteed that the performance will be hurt during the moments of swapping.

You'll get the best performance without swap and without compcache/zram.

I recommend to enable swap only to those who need to run apps that wouldn't run otherwise because of their big RAM demands.
[Motorola Milestone Android Development] krondar:
I'm on 7.2.4b with ZRAM on 26%, with OC on 800Mhz 52vsel, and to be honest its a stable option. Everything runs smooth (but I don't play games), with poweamp for about 2h a day and offline mode at night I get about 2 days of work :)

No cache partition, no ext3 for apps :)
[Motorola Milestone Android Development] trewelu:
Hi guys, does the cm 7 has keyboard shortcut to cut and paste using menu x + menu v? I remember my milestone had this capabilities, but it is not present on cm10 so maybe it is removed in some version of android.
[Motorola Milestone Android Development] d.casper.b:
Yes it does. I just tested it now.
[Motorola Milestone Android Development] trewelu:
Thanks for the info. Maybe because less and less android device use physical keyboard that feature is removed? I guess I'll playing around with cm10 for few more days and then decide whether coming back to cm7 or stay at cm10. I miss some of cm7 features (like the battery bar, bottom status bar, keyboard shortcut, custom app for long press menu button).
[Motorola Milestone Android Development] deys:
Is this applicable for CM7 only or CM10 also?
[Motorola Milestone Android Development] Erovia:
Both.

It is true for every rom for every phone.
[Motorola Milestone Android Development] jerminhu:
I've appled FuFu's 98swapon script through OR update and did notice a performance boost. But I'd like to know how to remove the swap file from the ext partition. I will now flash 7.2.4b and play with the swap settings to see whether it will still yield a performance boost.
[Motorola Milestone Android Development] d.casper.b:
Well, you can remove the script file i think. Use "Solid Explorer" - go to system root (it should ask for superuser permission now) by clicking back twice when in the root of the SD card or 'Jump>Device>System root' and then navigate to 'etc>init.d' and delete the script. Restart phone.
[Motorola Milestone Android Development] -FuFu-:
i have edit my 98swapon script and add a new feature ;)

now we can use /cache (with some little changes also /data) for swap.

the attaches file is a flashable zip, so just copy to /OpenRecovery/updates and apply via OR.

to use /cache as swap, just create a file named ".swapint" on /data after apply my new script, to do this just use OR Console an type in:

touch /data/.swapint

i set the script to leave just 10mb for /cache and use the rest for swap (will be recalc on every boot) if you want to leave more space for cache open the 98swapon script and edit "LEAVE=10240" to the value you want (value is in kb, not mb).

the script still creates /cache/swapon.log logfile, there you can see what size is use or if there any errors on boot.

hope it works ;) if there any problems just let me know.
[Motorola Milestone Android Development] _crAss_:
Is this actually a way to run a swap file in the internal memory if I understand correctly? The internal memory if I am not mistaken is as fast as ram. Logically since we move all apps to the sd-ext partition there is some considerable space left in the internal memory to host a 32-128 MB swap file there. Also this would mean much faster read/write times.

Correct me if I am wrong!
[Motorola Milestone Android Development] -FuFu-:
yes, internal memory is much faster then sdcard but i dont think its fast as ram...

i use in my script /cache for swap, not everyone have much internal space left, but with some changes its also possible to use /data for swap
[Motorola Milestone Android Development] BoyBawang2:
Hi all!

Problem: When I open the virtual keyboard in messaging while in portrait then turn my phone to landscape, the keyboard automaticaly closes so I have to tap again to activate the landscape keyboard.

Is there a solution to the annoying problem?
[Motorola Milestone Android Development] jerminhu:
Wait, FuFu. Your 98swapon script is used to create a swap file in internal memory, not in the ext partition?
[Motorola Milestone Android Development] Erovia:
Yes, the new one he posted today. The older ones use external storage.
[Motorola Milestone Android Development] -FuFu-:
yes ;) the new one will use /cache for swap and leave 10mb free for android ;)

at the moment i work on a comfort way to setup my script to also use /data for swap and set some other option ;) maybe tomorow i release a new version ;)

on android-hilfe.de i post some bench from inter memory and my sdcard, i quote them here

for the benches i used the app "AndroBench" and for swap we need good "random" values ^^ (correct me if im not right)
[Motorola Milestone Android Development] kabaldan:
I described it here: http://xdaforums.com/showthread.php?t=1986076
[Motorola Milestone Android Development] _crAss_:
It is certain beyond any doubt that internal memory is much faster than any currently available SD card. Right now I have about 70 MB of swap enabled with your script and is working flawlessly.

The big question is though, how much space will be available in CM10 to create such a swap in the internal memory so as to actually make it usable for everyday multitasking use.

Kabaldan: Would you consider employing something like that by default in a future CM10 so as to just install it and get everything ready at first boot? With a little organizing and sending files that are not so often used to the ext partition during installation maybe we will be able to get an 80-100 MB of very fast swap in the internal memory. I believe that with about 350 MB of combined memory CM10 will become more usable...
[Motorola Milestone Android Development] scoutme:
Actually moving libs to ext creates a lot of space in CM10 too, in order to create an internal swap. Gonna try after a few days of CM7 relax....
[Motorola Milestone Android Development] janosik47:
I think there is one issue with placing a swapfile in the internal storage. Our phones are not brand new any more and the storage degrade over time so may happen by placing swap file, which is often read/write, the degradation proceed to higher level.

I do not know details of internal partitioning (if system and data are the same or separated physically) but it may have influence in inability to install new versions of the firmware (e.g. the hidden buffer for replacement of degradated cells are common across system and data storages, and if used by swap activities then broken system cells are not replaced any more so the partition size is smaller and smaller over time).

On the other hand one may say 'who cares, I am going to replace the phone once died' ;)
[Motorola Milestone Android Development] Eiertschik:
I'm also sceptical.

Several people reported that they had to remove some files from CM7/10 update files to make them fit in their /system partition, so I guess their flash memory degraded to a level where the barely fitting updates didn't fit anymore.

On the other hand it's very likely to improve performance a lot - and let's be honest - who's planning on sticking to this phone a lot longer?
[Motorola Milestone Android Development] Erovia:
Me. And hopefully kabaldan too. xD
[Motorola Milestone Android Development] Eiertschik:
I'm no expert on paging and swapping and whatnot (apart from what you learn at Technical College).

But as far as I understand it, swapping takes 'blocks' of memory and moves them to swap space and vice versa.

Afaik "Random values" refers to small blocks (4k usually, I think) randomly placed anywhere in memory.

So basically the exact opposite of rather big chunks of continuous memory sectors - which is how I expect RAM-pages to look like.

Curse you, memory management :silly:

---------- Post added at 01:17 PM ---------- Previous post was at 12:41 PM ----------

I'm testing it right now - and one think that came to my mind again:

What swappiness-level do you use?

With your scripts there's always some free swap-space, but with Mrvek's scripts it almost full all the time.

I don't really understand what's written in your scripts, so could you possibly check Mrvek's script and tell me the swappiness levels you both use?

Thanks a lot :D
[Motorola Milestone Android Development] mrvek:
I do not change vm.swappiness level. It is default 30.

You can change it manually ("sysctl -w vm.swappiness=desired_value (0 - 100)) during uptime or modifiy/create startup script to do it on boot (either in /data/local/userinit.d or in /system/etc/init.d)

#!/system/bin/sh
sysctl -w vm.swappiness=your_value

To check run "sysctl -a" for all sysctl values or grep it: "sysctl -a | grep vm.swap" for swappiness or "sysctl -a | grep vm" to get all values that relate to virtual memory.

Low swappiness level seem to work the best (5 to 15).
[Motorola Milestone Android Development] Eiertschik:
Just executed that command do check swappiness and it's set to 15 with -FuFu-'s script.

I like your script better because it allows for easy changes without rebooting/reflashing.

So I guess I'll lower the value to 15 or so if I should switch back to your script.

After all the swapspace should only be used as a last resort - because otherwise it becomes ultra-slow and unresponsive...
[Motorola Milestone Android Development] mrvek:
I agree. Plus, kabaldan said so and I doubt that is wrong ;)

I am working on update to swapconf script but it's been a bit slow. Luckily, I had a little help from walker666 so there is not all that much to do, I just need to find some free time to test it properly. In the mean time, if needed be, you can make a new script or modify one of the existing startup scripts.

The correct one would be (previous post had wrong path to sh)

#!/system/bin/sh
sysctl -w vm.swappiness=your_value

(you do not need "#!/system/bin/sh" if adding to existing script)

If you know the exact name of sysctl property you can type it as an argument to sysctl, eg. "sysctl vm.swappiness" to get cleaner result than with "grep".
[Motorola Milestone Android Development] sfahadzb:
you are right.. according to my tests too the phone memory and sd card performed at same speeds but i've decided to try anyway and to my surprise the phone performs much better. As smooth as usual and the memory hungry games perform well too. I think the main reason is that the internal memory is free from any operation. I have also enabled lib2ext. After a whole day of heavy usage no lag yet.
[Motorola Milestone Android Development] janosik47:
Couple of questions:

1. How many apps you have?

2. How much space your ext lib foder occupies?

3. How much free space you have in /data?

Txh in advance
[Motorola Milestone Android Development] Eiertschik:
All went well until midnight.

Swap got clogged up with 10~15 background services, phone didn't react anymore, hot rebooted twice an wasn't usable until I shut it down and powered it up again.

I'm gonna try to reduce swappiness from 15 to 10 - maybe even 5...
[Motorola Milestone Android Development] sfahadzb:
i have 91 user apps installed

ext lib folder is 106MB

free space in data after swap activated is 91 MB , before that i guess it was around 121.

---------- Post added at 12:09 PM ---------- Previous post was at 12:06 PM ----------

No memory clogging for me, are you sure your swap is in internal memory? check for swap file file /cache
[Motorola Milestone Android Development] Eiertschik:
Yes, swap.img is sitting right there in /cache.

I'm gonna lower the swappiness to 10 - then 5.

Furthermore the swap.img is ~54MiB in size... that's rather big - I might make it smaller too.
[Motorola Milestone Android Development] sfahadzb:
for me its 74MB. have you lib2ext on?
[Motorola Milestone Android Development] Eiertschik:
Yes, I'm using lib2ext.

But I'm also using logger (takes up 12MiB) and /cache/download is also 16MiB in size. And 37MiB dalvik-cache.
[Motorola Milestone Android Development] trewelu:
HI kabaldan, is there a diference between termina emulator from C10 and CM7. In CM10 i can use tab to auto complete but not in CM7. Unrelated question, how can i get the youtube apps?
[Motorola Milestone Android Development] Quentin himself:
You can find Youtube app on PlayStore.