I`m using Urukdroid on my a101.Swap service is on but i can set the swap memory to 64MB at most(I saw it in the Terminal emulator).I have enough space.Does anyone have the same problem or it is just allowed to swap under 64MB.
Another question,is there any application that can watch the progress in swap memory?
I `m sorry for my poor English.
If you have Terminal Emulator installed then from Terminal Emulator type "free" to list ram and swap values. Or download meminfo from the market.
But compcache service is always unable to start.It said it cannot read swap header file.And if i only start the swap service,whatever I set the swap memory to,it's only 64MB swap can be used.
And you have selected a swapfile and not the fixed size Swap partition?
Related
Hi everyone,
A relatively noob question here.
I am running the Official ROM 2.76.405.5 on an unbranded Hero, and want to give Linux-Swap a try. But I don't want Apps2SD; I might move certain apps cache to the SD after rooting, but like the Apps themselve on the internal memory though. How can I go about it? What do I need to do?
1) Can I format my SD card so that it has a fat32 and a linux-swap partition but NO "ext" partition?
2) If I do make an EXT partition, what patch/fix should I do to make only swapping work, without Apps2SD? Modaco's Hero patch as well as his custom ROMs come with Apps2SD. Is there a way to get rid of it?
3) Will I need "busybox" to make swapping work? Or is "Swapper" alone going to be enough?
4) If I make my custom update.zip file from Modaco's Hero patch.zip, from which I delete A2SD, and then falsh that update.zip via the recovery mode, will it work?
5) And what swap size do you recommend? Some people use as large as 256MB... while the default in most cases is 32MB. Is the larger the better?
Please help a non-developer here. Many thanks in advance!
OK, I have done it and it seems right. I made all three partitions (fat32, ext3, and linux-swap) and then pushed busybox by Modaco's method via "adb shell". That means I have the ext3 partition but no Apps2SD, so my apps would stay on the internal memory. Am I right?
Now I have also installed Swapper and so far it has not given me any error. Via Advanced settings, I have told it to use Swap "partition" instead on swap file. My swap partition is 256MB
My questions now are:
1) If I kill swapper by taskkiller, will swapping end?
2) How much swappiness should I choose?
3) How do I know that it is working and what improvements should I expect to see? How can I test that my phone is functioning faster??
Please reply
Would anyone like to share their comments on this, please?!?
One more thing, Hero comes with a 288MB RAM, but the total available system memory (RAM) shown by Swapper app is 197MB. Why such discrepancy??
Your views will be much appreciated!
Very well asked questions. Some masters respond to them please so we don't disturb you about these questions within every thread of yours
to format your sdcard (i'm assuming you know how to use parted and have only 1 partition) resize your fat32 partition, for example, with my 7948 MB sdcard:
Code:
(parted) resize 1 0 7850 (where 7850 is the maximum size of your sd-card minus the amount you wish to allocate for swap, in this case, 98 MB)
wait for it to finish re-sizing, doing it this way prevents data loss, after it's done;
Code:
(parted) mkpartfs primary linux-swap 7850 7900
(parted) mkpartfs primary linux-swap 7900 7948
(parted) rm 2
(parted) resize 3 7850 7948
(parted) quit
you basically create two linux-swap partitions (the second partition can be anything, but I use linux-swap because it can be any size in MB) so that the third one gets asigned a p# of 3, then remove the second one, and then resize the third one to take up the whole space left after your fat 32 partition, that way you don't waste any space. You can always
Code:
(parted) print
to make sure your fat 32 partition has a p# of 1 and your linux-swap has a p# of 3
About why there's only 197MB left on your device? Radio and GPU take the other 96 MB and the system has no access to that memory. Don't worry, it's still enough for you to run hero, pity us dream users with only 96 MB working RAM.
===edit====(answer more questions)
If by "official rom 2.73.405.5" you mean the one you can download from MoDaCo, then I don't even think it has root. There are four 2.73.405.5 roms there, the RUU, which you should avoid like the plague, the Official one which is only the RUU but packaged in OTA format, the Official one with Radio update, and the Official rooted one. You wan't to use the rooted one. Also, you do need busybox (you're already done it). I think that in the official rooted there are no scripts running at boot, so you won't get A2SD forced upon you (always a good thing, soon as I buy my Hero I'm using that build too as a base for my build), no compcache, no swap-file usage, nothing, just a stock rom with root. Anyway, you already have busybox, and that's all swapper requires, so you're good. For extra credit, you could learn how to unpack boot.img and edit the init.rc to call on your own script from bin and have it do swap automagically instead of using swapper (plus you can do nifty things like using mmcblk0p2 instead of p3, among other things).
I don't know how swapper works exactly, but I think all it does is echo settings to the VM to set up swap, so killing the app should do nothing (it's just a front-end to what other roms do automatically) and swap should stay working after you kill it. You can try, just kill the app and then open up the terminal and type
Code:
$su
# busybox free
that will tell you how much memory you have and how much swap you have, you should still have swap even after killing swapper.
About swap size?... depends who you ask. If you ask me, you have a hero with 198 MB working ram and you shouldn't even have to bother with swap at all. If you still want to, maybe try to set up a 32 MB compcache setup (you have enough ram where compcache makes sense) with a swappiness of 0 (this keeps the memory pages for Rosie in swap and even after heavy usage, you can always go back to rosie w/o reloads).
Having a swap-file on your sdcard makes no sense if you don't have a class 6 sdcard as it will hurt performance, so, if you do, anywhere between 64 MB and 198 MB (to match the whole working memory space of the device) with a swappiness of 60 should suffice.
I wish I had a hero...
Thanks jubeh, thanks soo much. It was really helpful After reading your answer, I completely understand how to make only fat32 and linux-swap partitions and save space by not having an ext3.
I am afraid I don't quite understand the compcache thing; I think I have to do more reading/homework on this before I ask further questions
I did install the Official ROM which I downloaded from HTC website as an RUU >> flashed Amon_RA's recovery image via flashrec >> rooted by pushing "su" and "Superuser.apk" via ADB shell, and then also pushed Busybox (from Modaco's 2.2 ROM, I think it is version 1.5.1).
I am using a Sandisk 8GB class 6 card... it is fine so far (except the photo thumbnails not being generated in the ".thumbnails" forlder, but that's a different story). I have noticed that after the ROM upgrade, a folder called "rosie_scroll" get automatically created on the SD card... may be it's a kind of built-in swap?!?! Am not too sure.
Moreover, at the moment, I have set swappiness to 60. When most of the apps are open, the hero functions quite well but I see that about 190-194MB of the internal memeory is being uesd at times and heavy use and the area of occupied swap partition gradually increases. I think it is because only thise apps will swap which are kind of sleeping or dozing in the background. Am I right?
Just another question, if you unzup MCR 2.2, you see in the xbin folder, a file called "dexopt-wrapper", an addition to busybox. What does it do? Its function?
Will having lots off apps open in the background and swapping them continuosly have a deleterious effect on the battery life??
Thanks again
Best regards.
having many apps open means using ram a lot. if you add swapping, it means not only ram sucking battery, but also reading/wirtting sd, which is pretty much battery sucker itself.
so yes, if you want to lengthen your battery life, keep your apps loaded atst to a minimum.
if what you want is a comparison for battery life between swapping and not swapping.. you should check if you have your phone always on or off and some other factors (keeping ram alive in hibernation mode wastes more battery than static sd memory, ie).
Thanks sik_gerar I understand where you are coming from.
hi everyone here
i am a new guy here,my device is the archos 101 16G.after i install the urukdroid 0.7 in the internal stock(16G),it run well.
i also found its " Available space" become 735MB.not casual 256MB.however,its "free memory" for running apps is just 110MB(when i kill most of services and apps).concequently,after three or four web pages opend(especially flash on),the browse collapse!,i think it is killed dued to lack of free memory.
so .who can tell me why? "735MB" just a fiction?
thanks
No fiction, just missinformation on your side.
"Available space" equals to the space left on the /data partition. This is the space you have for installing Apps an their private data.
This has nothing to do with the amount of memory the processor has to operate.
This stays at 256 MB.
After Android is started you probably have around 100MB left of that.
If you need more memory, you have to enable swapping and/or compcache.
thanks for your help,
i wonder is it stable to SWAP "256Mb" in my SDcard?
and the"swap swappiness" value should be "10" or "60" or other?
addtionally,is it any way swapping in the internal stock? i mean the infernal 16G
thanks too
This is a good question, but we can not answer this really.
1. Swappiness means the lower the value the harder the kernel tries not to swap.
2. You can put the swapfile onto the internal drive, BUT as you constantly run out of mem ( by your description ) you will have alot of writecycles.
And a SD has a limitted write contingent so your internal drive might age faster, and because you can't change that i personaly would not use it for swap.
But there are some reports that normal SD cards sometimes give a freeze.
If you use Dolphin Browser you can decide to put the cache onto SD.
ok,thanks a lot,
seems that i have to use the dolphin and age my SDcard both
by the way,anyone could give me some tips how to swap in sdcard?
is it neccessally to repartition sdcard and how?
Swap
Swapper 2 is pretty easy.
Swapper 2 (for Root users)
To put the Swap partition on your sdcard go to; settings - Swap place - and enter.
/sdcard/sdcard/swapfile.swp
You can also change - Swappiness - and - Swap Size - in settings if you choose to.
After changing settings go back to home page and push ON button. It will then create the swap on your sdcard, be patient this takes a few seconds. You can see the Swap file on your sdcard using file manager. It automatically turns itself on after reboots.
To use USB you have to turn Swap on your sdcard off by simply going to Swapper 2 and press the OFF button.
When finished using USB simply turn it back on or it will turn back on after your next reboot.
Hi
I want to use swap feature in my mini cm7! Any 1 plz provide me full details How to activate swap and to use in my xperia mini cm7 Rom??
One forum member told me to create SWAP partition on my memory card with MiniTool Partition Wizard (pc program - freeware) and that is all.
Phone finds it itself and will use it automatically.
(to check if you really use Swap partition DL and open "terminal emulator" and type "free")
Instructions how to do that you can find here on forum (it is almost the same thing like creating EXTx partitions).
penthaler said:
One forum member told me to create SWAP partition on my memory card with MiniTool Partition Wizard (pc program - freeware) and that is all.
Phone finds it itself and will use it automatically.
(to check if you really use Swap partition DL and open "terminal emulator" and type "free")
Instructions how to do that you can find here on forum (it is almost the same thing like creating EXTx partitions).
Click to expand...
Click to collapse
I have created the ext partition but the phone does not recognize it automatically what to do? Am not using a2sd
U did not provide instructions website plz help
If you use latest minicm7 with latest nAa kernel, there is the swap partition really automatically mounted and used.
In MiniTool Partition Wizard you have to create new partition (not option EXT but option Linux Swap). The tutorial how to make EXT partition is here on forum (i cant find it right now), and instead of EXT, choose LINUX SWAP.
After that just start your phone and done.
If you need to check - you need Terminal Emulator installed in your phone, open it and type "FREE" and submit. Then you will see many rows and there is one begining with SWAP ... used/free values...
btw. EXT3/4 phone automatically recognizes too, but it doesnt help with swapping
penthaler said:
If you use latest minicm7 with latest nAa kernel, there is the swap partition really automatically mounted and used.
In MiniTool Partition Wizard you have to create new partition (not option EXT but option Linux Swap). The tutorial how to make EXT partition is here on forum (i cant find it right now), and instead of EXT, choose LINUX SWAP.
After that just start your phone and done.
If you need to check - you need Terminal Emulator installed in your phone, open it and type "FREE" and submit. Then you will see many rows and there is one begining with SWAP ... used/free values...
btw. EXT3/4 phone automatically recognizes too, but it doesnt help with swapping
Click to expand...
Click to collapse
Ok you mean I should make swap partition from the partition tool am going to do this...
But can u plz tel me what about I select for swap partition..?
I wrote it before, it is the same like creating ext partition, but only difference is that you choose LINUX SWAP instead of EXT3/4...
Label: you can write here swap or something
Drive letter: here you choose the memory card
Create as: Primary
File system: LINUX SWAP
Cluster size: Default
Successfully using swap in my mini cm7
And checked through terminal emulator by typing free its giving values and after opening applications the values are different and mobile runs fast..
One question in mind that I can't use a2sd and swap at the same time???
I have two partition. One for ext4 and other swap both are set to be primary but swap partition is mounted and other ext4 does not mounted checked through mini cm7 builtin feature
Any suggestions?
Man, I dont know what is your problem, but you can use SWAP and EXT partitions both together simultaneously.
Yesterday I bought a new msd and created around 600MB SWAP partition (primary), today 2GB EXT3 partition (primary) and rest let in FAT32.
Before I done this, I formated msd with Panasonic SD Formater.
Now Terminal shows me about 30 - 100MB used / 500 MB free SWAP and in CM7 settings I have showed and succesfully mounted 2GB size EXT3 with free 1.8GB.
So there must be problem with memory card, try to format it
--------------------------------------
EDIT: After that creating ext3/4 partition, restart your phone and now you can choose the A2SD settings.
MENU - SETTINGS - CYANOGEN MOD - PERFORMANCE - A2SD SETTINGS - i chose here A2SD. And restarted phone again.
and
MENU - SETTINGS - CYANOGEN MOD - APPS - "INSTALL PLACE" - choose automatic / intern (phone memory)
It works that all aplications installed to phone memory are in EXT partition of your msd! Only few files rests in phone memory.
You can everytime move apps from SD to (ext - phone mem) in APP MANAGER.
EDIT2: Looks like there are some troubles... after few restarting phone all apps in EXT dissappeard and could restore them... Trying to recover them...
Hi ,
I've been searching all over xda for an app or a script that could give more control over a swap file present in the SD card .By more control ....I mean ...is it possible to select which apps ram usage can be swapped to the file and is it possible to prevent ram usage of some apps from being swapped ? The reason is that after 1 or two days the device becomes extremely laggy and have to restart and apps start freezing just with a swap file of size 50 mb.
I use an LG L3 running on large rev 2 with SD merge .
For the swap file I use Ram expander .
Thanks in advance
Dear All
I could able to create swap partition on my phone SD card using AParted.
Now, I want to make use of that by creating swap file.
I tried to use swapit script which I found in some other thread.
The script says swap can be done and I was given few options
1. Create swap in SD card
2. Create swap in internal memory
3. Create swap in system memory
4. Choose own location
I was unsuccessful with 1,2,4 and fortunately successful with option 3
It says success. I rebooted my phone and run free in emulator which given me 0 and 0.
Im not sure what went wrong.
But I feel my mobile is faster after doing this exercise..not sure if its my myth
Can you please let me know how can I implement swap for my phone..
Is swap working fine through it is showing 0 in terminal emulator
Your help is very much appreciated.
Thanks for your help in advance
Any update..pleaseeeeeee
Swap partion only applies for one boot, don't reboot afterwards, so you will have to run the script at the beginning of every startup. Also keep in mind you cannot mount a swap partion at boot(i.e via init.d script), as the sd card is often not mounted at that point. I also do not recommended making a physical partion on your sd card, instead you should be using an image file(a random one will do). Here's the commands to make things easier:
To create a swap image:
Code:
touch /sdcard/swap.img
dd if=/dev/zero of=/sdcard/swap.img bs=1024k count=262144
mkswap /sdcard/swap.img
This creates a 256mb image
To mount image(This one is the one to be run at startup)
Code:
su
swapon /sdcard/swap.img