[Idea]add memory to myTouch - myTouch 3G, Magic Android Development

Originally, a2sd was developed to allow installation of many apps on G1 as G1 has limited memory. The MT3G has more internal memory so it does not need a2sd.
My question is if we can enable a2sd on a MT3G and than use the additional memory for the system. This can improve performance so much ....
Is this possible? I'm a dev, but not on this kind of platform . I know shell scripting, Unix, C so I can help if needed, but don't know how to approach this thing.
Thx.

mr.tenuki said:
Originally, a2sd was developed to allow installation of many apps on G1 as G1 has limited memory. The MT3G has more internal memory so it does not need a2sd.
My question is if we can enable a2sd on a MT3G and than use the additional memory for the system. This can improve performance so much ....
Is this possible? I'm a dev, but not on this kind of platform . I know shell scripting, Unix, C so I can help if needed, but don't know how to approach this thing.
Thx.
Click to expand...
Click to collapse
It depends. Now if you have a 32a board, this is pointless. Unless you have 300+apps installed it will not hurt performance.
I sugest App killer to kill off unused apps that never shut down, it helps so much/
Me really dont need Apsd for mytouch, especially the new 32a boards. Running from the sd card slows everythign down. To improve your performance..
1. Get CPU overclosk from market, set lowest to 386, high to 528 screen on, screen off 256/256.
2. Download swapper, set to size of yoru swap partition etc...
3. Get any free app killer ( ifully suggest Anvanced task killer) and every hour or so, go in and ignore what u use all the time, and kill everything else.
Also, get Cachemate from market or Clean up. this clears out all the garbage.
Doing this, on a good day, my battery lasts 17 hours with data going. and My Live wallpapers never lag

Hi,
Thanks - I already have all that set up. I was thinking on a MOD that will allow improvement of performance in a different way.
My Idea is to actually use the memory that becomes available under /data as we move the app to SD to be used by /system partition. Maybe we can also do a "reverse RAM hack" and increase the 3D RAM.
Again, as I'm not very familiar with the Linux system I don't know how exactly this should be done, or if it can be done at all.
Thanks for the reply though

storage memory in the phone is different then addressable ram.. therefore what your saying is not possible...if you really want something like this set up a swap partition on your sd card.
also task killers are not needed for android... its been well documented here and on other forums as android handles processes much differently than your standard windows box (so no need to have the mindset that background apps are slowing down your system). android itself does an excellent job of managing memory and kills tasks itself when more mem is needed. i used to run ATK myself, and found after removing it my phone actually ran better than killing processes all the time.
your likely just having a placebo affect if you think it speeds up your phone.. however killing process can increase battery life.. albeit only slightly...try it yourself and you will see what im talking about..
regarding task killers, just google it and you will see what im saying...
edit: most roms have cpu scaling in them, if you want an app i find set cpu to be the best, followed by overclock widget...
edit2: forgot to mention autostarts . a great program to edit which programs start up upon boot .. if your still worried about having things running in the background...

I was trying to get a swapfile on /Data (being a lot faster than sdcard, probably), but It didn't work :/

Related

Swap on Cyanogen 5.0.7 test1 - Thoughts!

Hey,
So Ive been playing with CM-5.0.7-DS test1, like everyone im sure , however I am noticing some major slowdown in the Launcher, many apps, and especially in 3g gallery without some memory assistance such as Swap\CC for the "low-memory" devices like the G1\Dream.
I enabled a 96mb swap partition, swappiness 60 using a userinit.sh script (see attached), and it really helped speed things along.
Wanted to know everyone else's experience using swap on this crazy new upgrade to our 2-yr old device
Good call. You can also just install "Swapper" from market, and go to advanced preferences, enable partition, good to go.
I am using a 96mb swap partition, and am overclocked to 596 mhz with the replacement kernel. Everything is working brilliantly for me, very stable.
Android 2.1, 600mhz Android device, ample RAM via swap, 16gb card, new slim extended battery - I am once again a happy G1 owner!
kristoff123 said:
Good call. You can also just install "Swapper" from market, and go to advanced preferences, enable partition, good to go.
I am using a 96mb swap partition, and am overclocked to 596 mhz with the replacement kernel. Everything is working brilliantly for me, very stable.
Android 2.1, 600mhz Android device, ample RAM via swap, 16gb card, new slim extended battery - I am once again a happy G1 owner!
Click to expand...
Click to collapse
:O howd u overclock to 596mhz?!
chim4ira312 said:
:O howd u overclock to 596mhz?!
Click to expand...
Click to collapse
The overclock thread that's been sitting on the top of this forum for the last week :0
the kernel I used is on page 38 or 39...anything over 600 eventually crashes for me, but 596 works very well. Flash video even plays fine with Skyfire - so many new goodies for my beloved G1!
-Although I am sure cyanogen will include that kernel or a better one with the next release, but leave it to the user to overclock using setcpu or whatever. Just leave it at 528 default via userinit.sh, so people can choose to what degree they want to melt their G1's, lol.
kristoff123 said:
Good call. You can also just install "Swapper" from market, and go to advanced preferences, enable partition, good to go.
I am using a 96mb swap partition, and am overclocked to 596 mhz with the replacement kernel. Everything is working brilliantly for me, very stable.
Android 2.1, 600mhz Android device, ample RAM via swap, 16gb card, new slim extended battery - I am once again a happy G1 owner!
Click to expand...
Click to collapse
hello
link please
lefeudedieu said:
hello
link please
Click to expand...
Click to collapse
Here, searched my ass off to find it...your welcome
http://forum.xda-developers.com/showpost.php?p=6352322&postcount=402
ok, thank
but i put the image boot by fastboot and G1 reboot and reboot ?
In my personal experiences with swap..... I'm not exactly sure what it was supposed to do after I applied it.
I do know what it does though...
As stated in previous forums,
The longevity og my card is very important to me
And finally, Cyanogen advises against swap.
if you would like to learn his thoughts, read his wiki.
And op, you crack me up. +10!
Sent from my HTC Dream using the XDA mobile application powered by Tapatalk
lefeudedieu said:
ok, thank
but i put the image boot by fastboot and G1 reboot and reboot ?
Click to expand...
Click to collapse
i think its not a image that can be flashed. it should be paste to /sd-ext document.
u need to extract the userinit.sh script and put it in /sd-ext
zimphishmonger said:
u need to extract the userinit.sh script and put it in /sd-ext
Click to expand...
Click to collapse
and thats it??
zimphishmonger said:
u need to extract the userinit.sh script and put it in /sd-ext
Click to expand...
Click to collapse
This conversation is confusing. 2 people talking about swap and 2 trying to overclock. Use the zip file from this thread, unzip it, open it with gedit or notepad++, add the stuff in the link from @zimphishmonger talking about overclocking. Follow the stepsw in that post. If you fastbooted the boot.img and it just boot loops, you may have trouble. You may need to reflash cm5.0.7. Or reinstall the Nandroid backup you made before you flashed it.
Also if history tells us anything, Cy will never include any over clock hack. He is pretty conservitive along those lines.
dangambino said:
and thats it??
Click to expand...
Click to collapse
Not exactly
do
adb shell chmod 755 /sd-ext/userinit.sh
to give it permissions.
My userinit.sh looks a little different so I can't say for sure it is correct.
...You mileage may vary.
thanks. running command now
seems to of took!
Swap is not a good feature to use, and I'll explain why:
When you enable swap, your end result is that you have a lot more "memory" available for programs to run in. Because of the memory management scheme used by android (kill background processes on low memory), it ends up that you will be RUNNING MORE PROCESSES. And this is a bad thing because (1) it means that your CPU will be more loaded (multitasking/background processes), and (2) it means that it will end up doing a lot of swapping (sdcard is SLOW) in order to continue providing all the "memory" allocated to each of those running programs.
The end result is that your phone will become VERY SLOW.
The ONLY legitimate use for swap is when you are running a process that is SO LARGE that it can't physically fit in the RAM available on the device *even when* all killable processes are already dead. And on Android, I have yet to encounter such a program.
DON'T USE SWAP! It will accomplish precisely TWO things;
(1) it will make your phone SLOW.
(2) it will kill your SDCARD.
lbcoder said:
DON'T USE SWAP! It will accomplish precisely TWO things;
(1) it will make your phone SLOW.
(2) it will kill your SDCARD.
Click to expand...
Click to collapse
(1) I disagree, it's the opposite ;-)
(2) agreed, but it probably will last enough till my next phone...
Most class 6 cards feature wear levelling from which from what I understand means I'll have upgraded my phone way before it ever dies.
For me using CM without swap has been impossible for quite a while now, gmail sync just doesn't work properly without the extra memory to fall back on. As for it slowing the phone down I've never noticed anything ever being slower with swap although I do have a class 6 card.
deimdos said:
(1) I disagree, it's the opposite ;-)
(2) agreed, but it probably will last enough till my next phone...
Click to expand...
Click to collapse
+1 I disagree as well.
If anything it helps the phone operate normally. Especially with the G1 it has a tendency to push GTalk out of the memory. That means it stops pushing email notifications to your phone, which is really annoying. Even eBuddy has a hard time staying in the memory if you minimize it. The G1 one really benefits from having the swap. And really, are SD cards that expensive? I've had swap on for 8 months and my SD card is fine. I personally use 64MB on my G1 and 30 swappiness, anymore is excessive.
Really you only want enough memory that it holds all the essential apps in place. Autokiller helps too if set at Moderate. So far CM5 though, the battery life is phenomenal compared to the old 4.2.15 (especially after the battery wipe stats fix, if you're having battery drain issues).
If you're using this on the Magic, then I have an issue with that, since it isn't even needed. Unless you have like over 300MB worth of apps and cache. Then maybe you'll need an ext partition. But that's a separate issue.
lbcoder said:
Swap is not a good feature to use, and I'll explain why:
When you enable swap, your end result is that you have a lot more "memory" available for programs to run in. Because of the memory management scheme used by android (kill background processes on low memory), it ends up that you will be RUNNING MORE PROCESSES. And this is a bad thing because (1) it means that your CPU will be more loaded (multitasking/background processes), and (2) it means that it will end up doing a lot of swapping (sdcard is SLOW) in order to continue providing all the "memory" allocated to each of those running programs.
The end result is that your phone will become VERY SLOW.
The ONLY legitimate use for swap is when you are running a process that is SO LARGE that it can't physically fit in the RAM available on the device *even when* all killable processes are already dead. And on Android, I have yet to encounter such a program.
DON'T USE SWAP! It will accomplish precisely TWO things;
(1) it will make your phone SLOW.
(2) it will kill your SDCARD.
Click to expand...
Click to collapse
Check out autokiller in the market. It limits the running processes so that swap actually works.
For those uncomfortable with making a userinit script, as I said before, Swapper does the same thing, it's free, and it's not a program that runs in memory. With the benefit being that you can experiment with swappiness and other settings on the fly. Just go to "Advanced" and select your partition - it's the right location by default.

Kernel conflicting with AutoKiller app?

I just flash a OC kernel to my sprint* hero. I am running Fresh 2.4 with the 710 OC kernel (chose 710 thinking it will be more stable, yes/no?). Before flashing this Kernel I was using AutoKiller on Optimum mode to help keep the phone in line. I am wondering now if AutoKiller is conflicting with my OC'ing of the phone. Should I uninstall the AutoKiller, or maybe change the mode to Chuck Norris? I just dont want the phone to act like a PC does with 2 anti-virus programs installed on it!
thanks
IN my opinion no one should have an autokiller app on there phone. The Android OS kills apps when it needs the space for another app. If it helps i use a program called FAST REBOOT that works pretty good. when the phone starts feeling sluggish i just fast reboot and it makes it run better.
on a side note....this is a Question and it belongs in the Q&A section not here in development.
Thanks for the input. I will try without it and check out Fast Boot!
Mods Please move thread to Q and A
t12icky0 said:
IN my opinion no one should have an autokiller app on there phone. The Android OS kills apps when it needs the space for another app. If it helps i use a program called FAST REBOOT that works pretty good. when the phone starts feeling sluggish i just fast reboot and it makes it run better.
on a side note....this is a Question and it belongs in the Q&A section not here in development.
Click to expand...
Click to collapse
The fact you called it "an autokiller app", as well as your explanation why you shouldn't have it, shows you really have no clue what AutoKiller is.
What you are referring to is a TASK killer, and I agree ... no one needs it because the internal memory manager does the same function much more fluidly and does not require an extra running process, hence is lighter on the system. AutoKiller (the actual app) simply allows you to customize the settings for that internal memory manager. This is pretty much necessary because the settings for this manager haven't changed at all since Android first debuted, and these settings basically leave you with around 25 MB remaining. That may be awesome for a G1, but for more powerful devices like our hero it is SLUGGISH, so upping the internal settings just performs the exact same function with more effective results for our devices.
To answer the original question, the only conflict that could exist is if the kernel itself has its own memory manager embedded. I've been on CM6 for some time, so I'm not sure if the kernel you chose has such a memory manager. If it does, however, it most likely has the same upgraded settings as you would hope to attain with AutoKiller. In this case, there is no need.
Hope this answers your question more completely.
tquetano said:
The fact you called it "an autokiller app", as well as your explanation why you shouldn't have it, shows you really have no clue what AutoKiller is.
What you are referring to is a TASK killer, and I agree ... no one needs it because the internal memory manager does the same function much more fluidly and does not require an extra running process, hence is lighter on the system. AutoKiller (the actual app) simply allows you to customize the settings for that internal memory manager. This is pretty much necessary because the settings for this manager haven't changed at all since Android first debuted, and these settings basically leave you with around 25 MB remaining. That may be awesome for a G1, but for more powerful devices like our hero it is SLUGGISH, so upping the internal settings just performs the exact same function with more effective results for our devices.
To answer the original question, the only conflict that could exist is if the kernel itself has its own memory manager embedded. I've been on CM6 for some time, so I'm not sure if the kernel you chose has such a memory manager. If it does, however, it most likely has the same upgraded settings as you would hope to attain with AutoKiller. In this case, there is no need.
Hope this answers your question more completely.
Click to expand...
Click to collapse
It does, Thanks! I do have the Advanced Task Killer (everyone has or had at one point! lol) and will lose that app right away! With the advanced task killer I still drop in free memory, so it doesnt seem to be doing anything, or what I want it to do. Just kills a few apps, like you said android will do that on it own. The Kernel I have is Darchstars Kernel vUV2 710mhz for roms using 2.1 RUU. It states in big letters "BUGS IN zIMAGE FREEMEMKILLER" just wondering if the AutoKiller has the same issues as the FreeMeKiller? My memory will drop to 50 right now, that is with autokiller set to optimum, I want to raise it higher to keep more free memory, didnt want a conflict though.
cordell12 said:
It does, Thanks! I do have the Advanced Task Killer (everyone has or had at one point! lol) and will lose that app right away! With the advanced task killer I still drop in free memory, so it doesnt seem to be doing anything, or what I want it to do. Just kills a few apps, like you said android will do that on it own. The Kernel I have is Darchstars Kernel vUV2 710mhz for roms using 2.1 RUU. It states in big letters "BUGS IN zIMAGE FREEMEMKILLER" just wondering if the AutoKiller has the same issues as the FreeMeKiller? My memory will drop to 50 right now, that is with autokiller set to optimum, I want to raise it higher to keep more free memory, didnt want a conflict though.
Click to expand...
Click to collapse
If you are using a kernel made for 2.1, you should not be using it. CyanogenMod 6 is built on Android 2.2, so either use the stock kernel or UncappedKernel from Decad3nce. Second, having the processor clocked at 710Mhz will NOT make the phone more stable. If anything, it will become unstable because of the added heat and power needed to run the processor. A good overclock that I've found that should be stable on our phones is from 650-690Mhz. Although I've been running my phone at 590Mhz, and I haven't found any real-life difference in the speeds. Like said above, tweaking the minfree (the Android internal task killer) is perfectly fine. What you do NOT want to do is use a program like Task Killer or Advanced Task Killer, since those will both end unnecessary processes, which will then have to be restarted, in effect using more battery and CPU cycles. So the best way, if you want, is to tweak the minfree settings with a program like Autokiller.
mrinehart93 said:
If you are using a kernel made for 2.1, you should not be using it. CyanogenMod 6 is built on Android 2.2, so either use the stock kernel or UncappedKernel from Decad3nce. Second, having the processor clocked at 710Mhz will NOT make the phone more stable. If anything, it will become unstable because of the added heat and power needed to run the processor. A good overclock that I've found that should be stable on our phones is from 650-690Mhz. Although I've been running my phone at 590Mhz, and I haven't found any real-life difference in the speeds. Like said above, tweaking the minfree (the Android internal task killer) is perfectly fine. What you do NOT want to do is use a program like Task Killer or Advanced Task Killer, since those will both end unnecessary processes, which will then have to be restarted, in effect using more battery and CPU cycles. So the best way, if you want, is to tweak the minfree settings with a program like Autokiller.
Click to expand...
Click to collapse
I am using Fresh 2.4, not CyanogenMod 6. I think there is a lower OC than what I am using. I will have to check, I knew the 768 would be way to much so I chose the 710 (middle option), so yes there is a lower OC. I have uninstalled the advanced task killer, it seems to be doing fine with AutoKiller set to "Strict" that keeps my memory around 60, before it would drop to low 40s I am new to all this so trial and error on my part will help me find a happy medium. I am getting a lot of help here and at android forums, thats how I found this site My wife has the same phone and is jealous of my speed but is scared to let me flash a rom to hers. She watched me stressing out when I was getting stuck in boot loops! I kept trying to partition my SD card to get apps2sd working, every time I after my partition I would get stuck in a dang boot loop. Seems after I partition the SD I need to re-flash my rom in order to get Fresh to see the partition. Or I think thats the issue? As of now I dont have a class 6 SD card, just found out I will need one so I am gonna wait for the apps2sd thing.
thanks
691 is the lowest Kernel, so either 691, 710, or 768. Will the 691 make that much of a difference than the 710? Stock is 528 I think
tquetano said:
The fact you called it "an autokiller app", as well as your explanation why you shouldn't have it, shows you really have no clue what AutoKiller is.
What you are referring to is a TASK killer, and I agree ... no one needs it because the internal memory manager does the same function much more fluidly and does not require an extra running process, hence is lighter on the system. AutoKiller (the actual app) simply allows you to customize the settings for that internal memory manager. This is pretty much necessary because the settings for this manager haven't changed at all since Android first debuted, and these settings basically leave you with around 25 MB remaining. That may be awesome for a G1, but for more powerful devices like our hero it is SLUGGISH, so upping the internal settings just performs the exact same function with more effective results for our devices.
To answer the original question, the only conflict that could exist is if the kernel itself has its own memory manager embedded. I've been on CM6 for some time, so I'm not sure if the kernel you chose has such a memory manager. If it does, however, it most likely has the same upgraded settings as you would hope to attain with AutoKiller. In this case, there is no need.
Hope this answers your question more completely.
Click to expand...
Click to collapse
yea my bad..lol. i had a brain fart. thought it said task killer.
cordell12 said:
I am using Fresh 2.4, not CyanogenMod 6. I think there is a lower OC than what I am using. I will have to check, I knew the 768 would be way to much so I chose the 710 (middle option), so yes there is a lower OC. I have uninstalled the advanced task killer, it seems to be doing fine with AutoKiller set to "Strict" that keeps my memory around 60, before it would drop to low 40s I am new to all this so trial and error on my part will help me find a happy medium. I am getting a lot of help here and at android forums, thats how I found this site My wife has the same phone and is jealous of my speed but is scared to let me flash a rom to hers. She watched me stressing out when I was getting stuck in boot loops! I kept trying to partition my SD card to get apps2sd working, every time I after my partition I would get stuck in a dang boot loop. Seems after I partition the SD I need to re-flash my rom in order to get Fresh to see the partition. Or I think thats the issue? As of now I dont have a class 6 SD card, just found out I will need one so I am gonna wait for the apps2sd thing.
thanks
Click to expand...
Click to collapse
Like I said, I'm on CM6, but I run Aggressive with no problem. In reality, either Strict or Aggressive works well, but if you up it above that then it basically starts interpreting every application running in the background as an extraneous app and kills it aggressively whether you're using it or not. Also, because the system is constantly trying to increase the memory thats available to meet the thresholds, it is constantly working to close programs that aren't there, and then it becomes a bog on the system again. Long story short, stick to Strict and you should find that perfect balance and remain smooth.

Autokiller memory opimizer (not a task killer)

What is the verdict on these memory optimizer type apps?
http://andrs.w3pla.net/autokiller/faq
I can't recommend Autokiller highly enough on Samsung Froyo phones. It was a must use, even with Voodoo, on my old SGS i9000, and the same thing on my Droid Charge.
True story: just this morning I was ready to throw my Charge against the wall in frustration. Ever since upgrading to EE4 the damn thing was LAG LAG LAG city, even with Voodoo. Phone was snappy as heck after a reboot, but after a couple of hours use, it started to lag, and then would get so laggy it was almost unusable. Seriously, opening apps would take 10 second. Auto-rotate the screen took 4-5 seconds.
I enabled Autokiller, set it "aggressive" and the phone's a speed demon again.
Try it, can't hurt your phone with it, might help it exponentially.
waiting for the phones built in lowmem killer is useless, use autokiller and you will notice an immediate improvement in phone response time. heres a point for ya, without it installed i have 78mb ram free,,,with installed 158ram. thats huge. for a phone. plus they dev just updated to reduce memory usage of the app itself, plus there are tweaks in the settings menu to make the IO scheduler more aggressive, improve sd card reads, battery life, wifi, networ,...its layered man. and free....whats more to love. the only other way i have found to improve phone speed feelwise is with kangfucius kernel and set that terd up to 1500hz with cfq. shazaam.
elucid said:
What is the verdict on these memory optimizer type apps?
http://andrs.w3pla.net/autokiller/faq
Click to expand...
Click to collapse
Basically what you're doing is tweaking the settings for how Android frees up your memory. In theory, it should be good, because the defaults that were picked with the Android release aren't going to be appropriate for everyone. Just be careful not to be too aggressive or you might start losing functionality you want, such as alarms or background email checks.
chadness said:
Basically what you're doing is tweaking the settings for how Android frees up your memory. In theory, it should be good, because the defaults that were picked with the Android release aren't going to be appropriate for everyone. Just be careful not to be too aggressive or you might start losing functionality you want, such as alarms or background email checks.
Click to expand...
Click to collapse
Good point on not being too aggressive. The higher you set it, the more sticky sports ate pushed out of memory, so with the settings I have right now the phone kills some things that in the oat would have been running when I went back to them. I'm going to drop down from aggressive to strict and see if that's a better balance for how I use the phone.
Sent from my SCH-I510 using Tapatalk
Call me crazy but...
Android is linux based right? I.E. it uses a linux kernel? I was under the impression that was true. If so, unless you're running into the problem of completely filling RAM and having to wait for stuff to be cleared, this kind of thing will not help you!
Linux intentionally leaves commonly used items in RAM in order to decrease access time. It is perfectly normal for such a system to run at 70-80% memory usage. It is, in fact, a GOOD thing, because it means more memory is actually being put to a potentially useful purpose.
That being said, if you're actually running out of RAM I suppose something like this could help.
slight23 said:
Android is linux based right? I.E. it uses a linux kernel? I was under the impression that was true. If so, unless you're running into the problem of completely filling RAM and having to wait for stuff to be cleared, this kind of thing will not help you!
Linux intentionally leaves commonly used items in RAM in order to decrease access time. It is perfectly normal for such a system to run at 70-80% memory usage. It is, in fact, a GOOD thing, because it means more memory is actually being put to a potentially useful purpose.
That being said, if you're actually running out of RAM I suppose something like this could help.
Click to expand...
Click to collapse
Yes, yes, I frequently give the "in linux free memory is wasted memory" whenever people want to use some taskkiller app because they want a lot of free memory. This isn't about shooting for some high free memory number because we're Windows minded and think we need a lot of free memory, this is about finding the right settings for Android's own memory manager to keep the phone responsive. There's been something about my Samsung phones (except the Nexus S) where they just get laggy as hell with the stock memory manager settings.
As described above, my phone was almost unusable after a couple of hours booted up until I enabled Autokiller. Maybe something I'm running has memory leak; could be, but I pretty much run the same apps on all my phones, and the HTCs and Nexus S don't get laggy like the i9000 and Charge do.
This app, or the one named MinFreeManager really help. In the early days of the i9000 on MoDaCo site we were using the cat command to tweak the settings manually in our efforts to find a way to stop RFS lag before Voodoo came along.
I just installed this yesterday and configured it for strict mode. I also enabled all of the advanced system tweaks and so far I haven't noticed much if any difference, perhaps it depends on your individual usage and what apps, launcher, etc you're using. I'm going to leave it on and see how it goes though.
Any still using this? Any want to share what settings they use?

[Q] Is adanced task manager good for our xt720?

I've seen a lot of debates abt whether advanced task manager is good for the phone or not but im not sure if it has a positive effect on our xt720 with very little ram, so does it make more sense to use advanced task manager?? Btw im talking abt the 2.1 version of xt720 not the dexter's froyo or anything else. any help would be appreciated!
Advanced task manager is an app and task killer. Although discussion is varied it is safe to say a majority of very computer literate people tend to think task killers are bad for your phone and actually cause more battery drain in the end.
It is important to know how android handles memory. When you open an app for example the browser, and then move to gmail android puts the browser in an idle state. If after that you open say google maps and your phone has no more free memory android will kill your first process the browser to make space. The apps which are idle take no memory resources and just sit there. Killing idle apps, which usually reappear as soon as they are killed drain more juice, and are slow to launch.
A better app to use is the Autokiller memory optimizer. It uses a script to change androids own parameters at boot. So you can specify at what ram you want android to kill the idle apps. It does not involve killing apps and lets android handle everything. Ive been using it for quite some time and my phone is snappy fast and has around 60-70MB ram free all the time. I use the strict settings anything about that free's too much ram. Ofcourse your phone needs to be rooted for this to work.
sohrab.naushad said:
Advanced task manager is an app and task killer. Although discussion is varied it is safe to say a majority of very computer literate people tend to think task killers are bad for your phone and actually cause more battery drain in the end.
It is important to know how android handles memory. When you open an app for example the browser, and then move to gmail android puts the browser in an idle state. If after that you open say google maps and your phone has no more free memory android will kill your first process the browser to make space. The apps which are idle take no memory resources and just sit there. Killing idle apps, which usually reappear as soon as they are killed drain more juice, and are slow to launch.
A better app to use is the Autokiller memory optimizer. It uses a script to change androids own parameters at boot. So you can specify at what ram you want android to kill the idle apps. It does not involve killing apps and lets android handle everything. Ive been using it for quite some time and my phone is snappy fast and has around 60-70MB ram free all the time. I use the strict settings anything about that free's too much ram. Ofcourse your phone needs to be rooted for this to work.
Click to expand...
Click to collapse
Im trying the app now so far so good. After i put it in strict level, there is nothing else that i should be doing with the app rite? i can just continue with the normal use of my phone rite? thx a lot! oh and i already uninstalled advanced task manager.
Nopes, just use your phone as you would Use the lowest settings that make your phone feel fast. How much free memory are you getting now? Also reboot your phone once. I've used the strict settings makes my phone feel great lemme know how it works out for you.
You should also use milestone overclock to overclock your processor if you dont already. Its available on the market for free. I use 1 Ghz, 74 Vsel!
After using the memory app, I have also 60-70mb free oh and I also use milestone overclock my settings are 1ghz 62vsel. What are the advantages of increasing the vsel value?
Sent from my Milestone XT720 using XDA App
I find that having a higher vsel keeps the system more stable during memory intensive tasks. Also I found no difference in battery life thats why I use the stock presets. Before I used 56 vsel 1 ghz but when I opened up the camera or something the system would hang and reboot. Try it out, its also much faster
More vsel actually drains the battery faster. From my experiance and recomnendations I found out that 1Ghz @ 66vsel is my optimal setting.
About ATK and Autokiller memory optimizer - crap! I preffer Running service and Manage application to deal with programs if I need to, but I mostly let Android decide for himself. My phone always have around 60MB free memory and ROM is fast and very responsive.
Also you may wanna try JuceDefender. Awesome app which saves you battery and clears RAM, if you are not feeling comfortable doing it yourself.
eSu.Matix said:
More vsel actually drains the battery faster. From my experiance and recomnendations I found out that 1Ghz @ 66vsel is my optimal setting.
About ATK and Autokiller memory optimizer - crap! I preffer Running service and Manage application to deal with programs if I need to, but I mostly let Android decide for himself. My phone always have around 60MB free memory and ROM is fast and very responsive.
Also you may wanna try JuceDefender. Awesome app which saves you battery and clears RAM, if you are not feeling comfortable doing it yourself.
Click to expand...
Click to collapse
Umm, I think you're confusing autokiller memory optimizer with the normal task killers. Look it up, it isnt a task killer but changes androids native application management parameters. Which ROM are you on?
Also ive used ultimate juice for sometime. It doesnt clear RAM, it just toggles your data and wifi according to options you set. I also noticed that without juice defender my phone works just as much so dont know how much that helps.
Battery calibration after new ROM flash has always made my battery meter more accurate and lasts longer.
I very well may and I apologize for that.
Actually I use recovery mode options to set the aggressiveness of the running service and I'm more than satisfied.
Sent from my XT720 using XDA App
P.S. StealEpicBlue with some little tweaks from me (few deleted system apps).
eSu.Matix said:
I very well may and I apologize for that.
Actually I use recovery mode options to set the aggressiveness of the running service and I'm more than satisfied.
Sent from my XT720 using XDA App
P.S. StealEpicBlue with some little tweaks from me (few deleted system apps).
Click to expand...
Click to collapse
How did you do that. I am running steelblue also and can always tweak it more. Is it through Androidiani recovery that you set the aggressiveness. I might start a thread tomorrow about all the things Androidiani does and how to use them. Haven't been able to find too much on it, but I know alot of people use it.

[Q] Making Swapfile on Gtab 7+?

hi guys,..
i want to ask is there any way i can make swapfile on gtab 7+ running hc 3.2? or there is no posibility to make swapfile on honeycomb? i've tried to make the swapfile using dd command from terjinal, but somehow im stucked on setting permission for the file, the file i've created always have special permission that i can't change to rw-r-r, it always stayed rw-rSw-r, im a newbie on linux things, and willing to learn.
any help really appreciate.
thanks.
Okay, you say that you're a newbie to linux. That's fair and reasonable. I'm going to try and teach you some things by way of asking questions. They might sound like I'm attacking you, but I'm not...
Do you know you are trying to create a swap file? What do you hope to gain by doing so?
Is this one of those mythical magical things that someone claims will make the tablet run 50395920 times faster, allow it to brew coffee, and make your car get better fuel mileage?
...and some answers...
Within the android environment, a swap file is a BAD THING. The entire system is designed to drop stuff out of memory if/when it needs more memory, and the overhead of a swapfile will cause more harm than good.
Take care
Gary
garyd9 said:
Within the android environment, a swap file is a BAD THING. The entire system is designed to drop stuff out of memory if/when it needs more memory, and the overhead of a swapfile will cause more harm than good.
Click to expand...
Click to collapse
It's not that dramatic. Most of "the overhead of a swapfile" is overhead you're already committing to by utilizing a VMM (Virtual Memory Manager). The Dalvik VM doesn't do a whole lot of its own memory management so implementing a swapfile at the OS level, which is what the OP is looking to do, wouldn't have a huge impact on performance.
The only time where you'd have any real overhead of maintaining a swapfile is when memory is full and the OS pages out memory to disk. But remember that the alternative is to close down the process and run some garbage collection. Both are intensive actions - swapfile is I/O intensive while GC is CPU and memory intensive - so you're really trading one source of overhead for another.
To answer the OP's question, it sounds like you haven't rooted the tab. You would need to be root in order to change the perms as you described. If you are rooted, make sure you're using the right command to set permissions - I haven't tried this specifically on Android but from my *nix experience, the command you want is chmod 644 <path to file>
---------- Post added at 09:24 PM ---------- Previous post was at 08:39 PM ----------
Almost forgot, what kernel are you using?
im using stock kernel 2.6.36, kk6 rooted. i've tried to chmod the swapfile, but still cant change the permission, i usually use root explorer to change the permission, but now it doesn't take effect. the file permission r8 now is rw-rwSr--, the "S" thing is making the swap cant be aplied (i guess).
back there when i use optimus (gingerbread), swapfile is default from stock rom. is it have something to do with honeycomb?
thanks for your reply.
garyd9 said:
Okay, you say that you're a newbie to linux. That's fair and reasonable. I'm going to try and teach you some things by way of asking questions. They might sound like I'm attacking you, but I'm not...
Do you know you are trying to create a swap file? What do you hope to gain by doing so?
Is this one of those mythical magical things that someone claims will make the tablet run 50395920 times faster, allow it to brew coffee, and make your car get better fuel mileage?
...and some answers...
Within the android environment, a swap file is a BAD THING. The entire system is designed to drop stuff out of memory if/when it needs more memory, and the overhead of a swapfile will cause more harm than good.
Take care
Gary
Click to expand...
Click to collapse
thanks m8 for your lighten up of linux, i really appreciate it. just from my experient when im using optimus (gingerbread) i never felt lack of memory when using multitasking (it only has 512mb ram). but now when i using gtab (with 1gb ram or 778mb?) first it fast on multitasking but about 10 minute later it getting slower, when i check with task manager, it only has 80mb left??
is it me or is it gingerbread have better ram management than honeycomb, and so if it is, im trying to make swapfile in hope that its getting better. i use v6 supercharger, kill all proccess when it turn to standby by automatic, overclocking to 1,6ghz, but still i can make the ram more efficient when running on multitasking.
hope you understand for what im going to achieve.
thanks.
h2g2 said:
It's not that dramatic.
Click to expand...
Click to collapse
Are you suggesting that using an OS-level "generic" swapfile on flash memory is better or even equivalent to using a system/purpose built solution?
The linux kernel has no way to know if the memory its swapping out is even needed anymore. The android system, however, does know this - and will often discard allocations.
Let's say you run two applications: email and the browser. The browser has several pages loaded with flash, and lots of memory intensive stuff going on. Also in memory is the code that syncs your email in the background and several other "non critical" services (such as SMS, latitude, etc.) and a few critical services (such as some wifi support, display support, framework, etc.)
Keep in mind that if android requests memory, and there's a swapfile, the kernel will claim it has memory backed by swap... So given a large enough swapfile, the kernel will never tell android that it's running short on memory...
Given the above situation, the user now wants to run Angry Birds. There isn't enough physical RAM to support all of the above in memory AND Angry Birds. What will happen?
If there's no swapfile, android will see there isn't enough RAM to support it, and simply drop the browser and email client from memory, but keep the services in memory. Angry birds loads, and the user is happy.
IF there IS a swapfile, however, then android will see that there is RAM to support AB along with everything else in memory, and just load Angry Birds. When that happens, the linux kernel will have to swap pages of memory out to the flash memory. The KERNEL doesn't know the difference between the email client, the email service, the browser, or any other "non-critical" service. All those memory pages are flagged the same. So, perhaps the browser gets swapped out. (wasted cycles - it could have been discarded.) The email client is retained in RAM, but the email service is swapped out to flash. Angry Birds loads. 5 minutes later, Angry Birds freezes and gets jumpy... why? Because the email service has to be swapped back into RAM, and something else swapped out in its place. This time it was latitude. A few minutes later, latitude wants to update your position, so the same thing happens. What gets swapped this time?
Why spend the cycles swapping things in and out of RAM? There is plenty of memory on these devices to support all the services and memory hungry games. If some game has a memory leak, you SHOULD be getting errors from running out of memory and NOT blissfully swapping things to flash.
I'm not going to tell people how to use their devices. I'm going to try and give them advice, but I certainly can't force people to take it. As a matter of fact, I'll even encourage the technical minded to explore and break things to learn on their own.
However, when a person asks the question I see in the OP, and admits that they are new to linux, then I suspect that they aren't technically minded and exploring, but blindly following the "suggestion" of someone else who promises all kinds of silly things. It reminds me of someone who disabled kernel panic reboots and claimed that it was a tweak to make the system more stable... and had many people actually believing that.
There's a good reason why google hasn't enabled swapping, and there's even less of a reason with devices that come with 1GB of RAM.
Take care
Gary
---------- Post added at 01:45 AM ---------- Previous post was at 01:25 AM ----------
danielkaboom said:
is it me or is it gingerbread have better ram management than honeycomb, and so if it is, im trying to make swapfile in hope that its getting better. i use v6 supercharger, kill all proccess when it turn to standby by automatic, overclocking to 1,6ghz, but still i can make the ram more efficient when running on multitasking.
hope you understand for what im going to achieve.
thanks.
Click to expand...
Click to collapse
First of all, try the same thing without that "supercharger" script. I've made clear my thoughts on that. In this case, using that script may or may not be allowing HC to do what its designed to do in regards to memory management. I'm not saying you should delete it - but to run tests without it.
If you are running low on FREE memory, that's not a bad thing. What good is the memory doing if it's not being used? Android will let an unused application linger in RAM as long as they wants so long as nothing else needs that RAM. As soon as something else needs that RAM, those unused apps will be purged (garbage collection.)
Having a swap file directly contradicts any effort to purge things from memory. A swapfile will encourage the system to swap things to flash as virtual memory. Sure, your "free memory" number might be bigger, but it will slow the system down when it's swapping things out to and in from flash memory. (A blunt question Are you chasing numbers or actual performance?
How do you expect to make memory MORE efficient by always having it be unused? Memory that's not being used is wasted. If my desktop machine (that has 16GB of RAM) has only 6GB being used, then I have 10GB of RAM wasted. I'd rather that memory be used to store an application I might go back to using, or used as cache. Completely unused RAM is completely wasted RAM.
I understand that you might be caught up in the whole thing with overclocking, having as much free RAM as possible, and having nice benchmark numbers. The thing is.. NONE OF THAT MATTERS.
Want higher benchmark numbers? I can make you a kernel that will give you insanely high numbers. Your device will suck for actual use, but you'll get high benchmarks.
Want a big "free RAM" number? Never run any apps, never get email, don't do anything at all with the device. It'll be an expensive paperweight, but you'll always have lots of free (and completely wasted) RAM.
Try this: make a backup of your system and then go back to stock. Use your tablet in a factory state for a few days. Then root it and disable some of the things that might be chewing the battery. Don't overclock, don't install scripts, and don't install a custom kernel. Use the device like that for a while. Actually USE the device - don't benchmark it, check task managers, etc. Just use it.
Now, how does it feel? No script, kernel, or anything else will make a dramatic performance increase. They can (and often do) make things slower, however. (That's why I'm very careful about modifications I make to my kernel...)
After using it stock for a few days, come back and tell us what you think - what you wish would be better in actual day to day use. (Again, benchmarks and numbers don't mean much...)
Take care
Gary
yes Gary,...to be honest, im blindly follow every1 that claims can tweaks or anything like tha, but when i tested it and using it, if its making my device getting "better" i kept it, if its making it worse than before, i let go.
in my opinion, slow, fast or faster is relative, it depends on every1 needs. for me loading game such as finalstrike hd in 5 sec is fast, but maybe different to others by loading it 20-30 sec is acceptable.
but if you said swapfile is bad and will only making it worse, then i'll accept that, but after im testing it. for me, sugar is not sweet until my tounge said so, no offence.
again, thanks Gary for the explanation, thanks for opening my mind.
edit : ill try to follow your instruction first.
You should do what you feel like, but please don't get caught up in lots of people telling you that they have magic bullets to fix things (that really aren't even broken.)
That being said, you are having a technical problem and I just can't resist information sharing.
What directory are you trying to create the file in? /sdcard (or /mnt/sdcard) won't work.
Try /data
(/mnt/sdcard == /sdcard.. and they will force certain permissions via fuse/vold.) Unlike GB, with HC /data and /mnt/sdcard use the same space. (/mnt/sdcard is actually a fuse from /data/media.) (In GB, /data space was very limited. That's not the case with HC.)
Gary
still failed,...:
- create a file in /data (named swapfile.swp), using terminal
# dd if=/dev/zero of=/data/swapfile.swp bs=1024 count=128000
- check from root explorer, the file is now created.
# mkswap /data/swapfile.swp
# swapon /data/swapfile.swp
swapon /data/swapfile.swp = Function not implemented
any sugestion?
edit : the permission is now can be change to rw-r--r--(thx Gary)..but its still failed to swapon,..
edit 2 : from what i've read from other pages and sites,..is it because "kernel not support"?
garyd9 said:
Are you suggesting that using an OS-level "generic" swapfile on flash memory is better or even equivalent to using a system/purpose built solution?
Click to expand...
Click to collapse
There is no "system/purpose built solution" - the Dalvik VM uses the Linux kernel VMM functions for low level memory management (http://developer.android.com/guide/basics/what-is-android.html).
The linux kernel has no way to know if the memory its swapping out is even needed anymore. The android system, however, does know this - and will often discard allocations.
Click to expand...
Click to collapse
Yes it does. The VMM knows which pages are active, which are inactive, and - if an application has called free() on a pages it previously malloc()'d, it will know which pages are expired.
In fact, the VMM will often know more than the Dalvik VMs because each application runs in its own Dalvik thread with its own dedicated heap. Any individual Dalvik instance will only know the disposition of the heap for its own application.
The VMM, on the other hand, has visibility of all Dalvik threads and will know which threads are idle and which are active, which Dalvik threads have run garbage collection and free()'d a portion of their heap, etc.
Keep in mind that if android requests memory, and there's a swapfile, the kernel will claim it has memory backed by swap... So given a large enough swapfile, the kernel will never tell android that it's running short on memory...
Click to expand...
Click to collapse
No, it won't. That's not how the swapfile works. What you're describing is more akin to memory-mapped file I/O, which is related (in that the VMM plays a role in managing that address space) but not at issue (it's a completely separate operation from memory allocation and de-allocation).
Memory is requested by giving the kernel a malloc() command. The VMM will then check its page cache (the size of which is constrained by physical memory - regardless of whether there is a swapfile or not) and look for available space. If space isn't available, then the VMM will look for pages marked as expired. If there aren't enough expired pages, it will look for inactive pages (pages allocated by processes that are idle or supsended).
At this point, the VMM will either 1) discard the contents of the expired and/or inactive pages until enough free pages are available (if no swapfile is available) or 2), write the contents of the expired and/or inactive pages to the swapfile before discarding them until enough free pages are available.
Note that the presence or absence of the swapfile has no bearing on what pages are chosen. And again, regardless of whether there is a swapfile or not, if there aren't enough expired and/or inactive pages to get rid of, malloc() returns a null pointer. In otherwords, you will get out of memory errors even with a giant swapfile.
Given the above situation, the user now wants to run Angry Birds. There isn't enough physical RAM to support all of the above in memory AND Angry Birds. What will happen?
If there's no swapfile, android will see there isn't enough RAM to support it, and simply drop the browser and email client from memory, but keep the services in memory. Angry birds loads, and the user is happy.
IF there IS a swapfile, however, then android will see that there is RAM to support AB along with everything else in memory, and just load Angry Birds. When that happens, the linux kernel will have to swap pages of memory out to the flash memory. The KERNEL doesn't know the difference between the email client, the email service, the browser, or any other "non-critical" service. All those memory pages are flagged the same. So, perhaps the browser gets swapped out. (wasted cycles - it could have been discarded.) The email client is retained in RAM, but the email service is swapped out to flash. Angry Birds loads. 5 minutes later, Angry Birds freezes and gets jumpy... why? Because the email service has to be swapped back into RAM, and something else swapped out in its place. This time it was latitude. A few minutes later, latitude wants to update your position, so the same thing happens. What gets swapped this time?
Click to expand...
Click to collapse
So bearing in mind that the Linux kernel VMM is ultimately responsible for choosing what gets dropped or swapped out of memory and also bearing in mind that only inactive or expired pages are eligible to be dropped/swapped, we can see that the situation you describe will never happen.
The behavior of, from the user's perspective, what applications get shoved out of active memory (regardless of whether they end up in the swapfile or in /dev/null) doesn't change. In the same way that the Linux VMM will never drop pages associated with an active process (such as the email sync service, the Wifi driver, etc), the Linux VMM will likewise never swap these pages out either.
Why spend the cycles swapping things in and out of RAM? There is plenty of memory on these devices to support all the services and memory hungry games. If some game has a memory leak, you SHOULD be getting errors from running out of memory and NOT blissfully swapping things to flash.
Click to expand...
Click to collapse
Consider the scenario you spelled out previously - without the swapfile, the pages associated with the Browser app will get dropped and make room for Angry Birds. Good news: Angry Birds starts up faster.
With the swapfile, the pages associated with the Browser app will get swapped out to make room for Angry Birds. This will take longer since there's some file I/O involved. Bad news: Angry Birds starts up slower.
So what's the use case for the swapfile? What if you want to go back to the browser again? Without the swapfile, the Browser is gone. You have to launch it - the application binary needs to be read off disk, executed, the heap has to be re-allocated, re-initialized, and program data needs to be populated. The page you wanted is gone - you need to fetch that again. More waiting while it downloads from the server and the HTML code is rendered on the screen.
In this scenario, reading the heap back into memory from the swap file is actually more efficient than recreating it - even if you ignore the obvious benefit of not having to relaunch the app and reload the page, there's substantial overhead associated with relaunching the app.
So that's the use case - maybe it's not applicable to you if (although maybe someone who wants to go back and forth between Angry Birds and a cheat guide on a G1 might appreciate this) but if you are multitasking across several memory-intensive apps, then the benefit of not having to re-invent the wheel, so to speak, to recover the application state can outweigh the cost of paging the application state out to disk.
I'm not going to tell people how to use their devices. I'm going to try and give them advice, but I certainly can't force people to take it. As a matter of fact, I'll even encourage the technical minded to explore and break things to learn on their own.
However, when a person asks the question I see in the OP, and admits that they are new to linux, then I suspect that they aren't technically minded and exploring, but blindly following the "suggestion" of someone else who promises all kinds of silly things. It reminds me of someone who disabled kernel panic reboots and claimed that it was a tweak to make the system more stable... and had many people actually believing that.
Click to expand...
Click to collapse
I have no problem with dissuading people of the notion that some hack is going to instantly and unequivocally make their system better. But I think the proper response, especially on a forum like this, is to present the facts of the matter and not just a knee-jerk contrarion reaction. Simply dismissing the swapfile as a "BAD THING" doesn't really help the OP learn more about it, at the very least.
I'm with you on disabling kernel panic reboots, though. That's just stupid.
There's a good reason why google hasn't enabled swapping, and there's even less of a reason with devices that come with 1GB of RAM.
Click to expand...
Click to collapse
Maybe, maybe not. Android 2.1 and earlier didn't implement JIT. Android 2.2 and earlier didn't implement EXT4. Android 2.3 and earlier didn't implement GPU-accelerated UI compositing. Android 3.2 and earlier didn't implement ASLR. Does that mean these were considered undesirable by Google at one point in time? Or were they always on Google's list of things they wanted to do and they just hadn't gotten around to them yet?
---------- Post added at 01:56 AM ---------- Previous post was at 01:41 AM ----------
danielkaboom said:
still failed,...:
- create a file in /data (named swapfile.swp), using terminal
# dd if=/dev/zero of=/data/swapfile.swp bs=1024 count=128000
- check from root explorer, the file is now created.
# mkswap /data/swapfile.swp
# swapon /data/swapfile.swp
swapon /data/swapfile.swp = Function not implemented
any sugestion?
edit : the permission is now can be change to rw-r--r--(thx Gary)..but its still failed to swapon,..
edit 2 : from what i've read from other pages and sites,..is it because "kernel not support"?
Click to expand...
Click to collapse
Yes, the kernel needs to have swapfs support. If you've ever played around with EXT4 kernels or ROMs that required EXT4 kernels, for example, it's kind of the same idea.
It sounds like the stock GT7+ kernel does not have this so you will need to find a custom kernel that does. I'm going to go out on a limb and guess that garyd9's kernel does not support swapfs.
Without the kernel, you're out of luck.
Regarding your situation on your Tab, it sounds like you've got an app or two that's misbehaving. Have you tried throwing up a CPU monitor? It would be useful to know whether the slowdown is caused by the CPU getting busy, and whether this load is from a single app or not.
Thank you for explaining that. Are there any examples, other than the one you mentioned, in which Android would benefit from a swapfile?
reading both pros and cons about swapfile really makes my head spinning,... im trying to understand it little by little. thanks guys for the explanation.
and yeah, guess im run out of luck,..(cause i don't have enough skill to make the kernel on my own,..sigh).
thanks.
danielkaboom said:
reading both pros and cons about swapfile really makes my head spinning,... im trying to understand it little by little. thanks guys for the explanation.
and yeah, guess im run out of luck,..(cause i don't have enough skill to make the kernel on my own,..sigh).
thanks.
Click to expand...
Click to collapse
It is a complicated issue with lots of tradeoffs in both directions.
I'm still curious as to the specifics of your problems, though. Garyd9 is correct in saying that creating a swapfile may not help your particular issue but that doesn't mean there isn't some other way to fix it. We just need more information about what's going on on your tablet.
---------- Post added at 05:49 PM ---------- Previous post was at 05:29 PM ----------
nyarltep said:
Thank you for explaining that. Are there any examples, other than the one you mentioned, in which Android would benefit from a swapfile?
Click to expand...
Click to collapse
Fundamentally, it breaks down to a store vs. recalculate issue - do you store memory pages to the swap file and incur the storage I/O overhead or do you discard it and recalculate it later and incur the cpu and memory I/O overhead? All of these resources are in short supply on the GT7+.
A swapfile works best with applications that maintain steady states that can easily be swapped out and back in as needed. A swapfile is least effective for active background processes.
If, for example, you're running out of memory running too many apps in the background - think clients for sync services, streaming media, system monitoring, etc. - a swapfile is not going to help.
However, if you're running into situations where you are switching between multiple apps such as document viewers/editors, and are finding that you need to reload documents as the apps get silently killed in the background, a swapfile could potentially help.
The only real way to know is to test it but without a kernel with swapfs support for the GT7+, it's impossible to say for certain.
from the opinion, i guess using swapfile for backround process is useless, but using it to switching task (for example : im using browser with lot of pages and beside that im doing some paperwork on office aplication) will help a bit, am i r8? if its r8, then im willing to try using swapfile, because i already freeze/uninstall some aplication that running on backround but still give me lags, when i did the example above.
but again, im running out of luck,..until Garyd9 or any1 else kind enough to make kernel that support swapfs,...
thanks for both of you, for your effort to answering my noob question.
regards,
dan
PS : Gary, i've tried your instruction, and yes it makes my daily use better,...though im still curious using swap,...hehehe.
danielkaboom said:
from the opinion, i guess using swapfile for backround process is useless, but using it to switching task (for example : im using browser with lot of pages and beside that im doing some paperwork on office aplication) will help a bit, am i r8? if its r8, then im willing to try using swapfile, because i already freeze/uninstall some aplication that running on backround but still give me lags, when i did the example above.
but again, im running out of luck,..until Garyd9 or any1 else kind enough to make kernel that support swapfs,...
Click to expand...
Click to collapse
Background processes are fine to swap out if they're steady state, it's active background processes that aren't going to benefit from a swapfile.
However, the lags you're experiencing may continue to persist depending on what is causing those lags. A swapfile won't help if you've got a poorly-optimized app running, particularly one that is not efficient with memory allocations. It also won't help if the lags are caused by a Dalvik thread performing garbage collection on its heap (whether the app on that thread is efficient in its memory allocations or not).
My educated guess is that if you are experiencing lags while using an active, foreground application, then this is not a problem that will be fixed with a swapfile. On the other hand, if you are experiencing lags launching new applications or bringing background apps into the foreground, these types of lags may be reduced with the use of a swapfile though the only way to know for sure is to test it.
I don't have time for an indepth reply to h2g2, but I'll reply simply:
You seem to be knowledgable enough to recompile a kernel - so please feel free to pull my kernel sources and initramfs, turn on swapping (samsung has it disabled by default), and try it. Keep an eye on the swapping and memory stats, as well as what's being swapped, etc... You might be surprised.
(If I had time, I'd do the same.. I've been wrong before and I might be wrong again... )
In either case, Daniel, I'm glad that turning off all that excess crap helps. As much as we all complain about this tablet, it actually runs pretty good without many modifications. If you read the changes I've made in the p6210 kernel, you'll see that I really haven't done much to it. The most invasive change was adding stuff that Samsung didn't have in there (such as UV.)
Take care
Gary
garyd9 said:
I don't have time for an indepth reply to h2g2, but I'll reply simply:
You seem to be knowledgable enough to recompile a kernel - so please feel free to pull my kernel sources and initramfs, turn on swapping (samsung has it disabled by default), and try it. Keep an eye on the swapping and memory stats, as well as what's being swapped, etc... You might be surprised.
(If I had time, I'd do the same.. I've been wrong before and I might be wrong again... )
Click to expand...
Click to collapse
Just to be clear, I have no real stake in this except to make sure that the technical facts about the swapfile are presented properly. In much the same way that you've been frustrated hearing about people recommending that they disable kernel panic reboots, I also am frustrated when people have a knee-jerk "swapfile = terrible" reaction that is largely based on FUD.
That said, you're right, I should just test it myself when I've got some free time.
Dusted off my old Nexus One, loaded up a clean install of CM7 and installed a kernel with CONFIG_SWAP=y. I decided to go with a swap partition on my sd card rather than a swapfile but the effect should be the same.
I haven't had time to do extensive testing but so far but I can confirm that swap is working and I haven't yet noticed a major perceptible impact to performance of the device.
Code:
# free
total used free shared buffers
Mem: 403240 379288 23952 0 60
-/+ buffers: 379228 24012
Swap: 62696 27948 34748
# grep "pswp" /proc/vmstat
pswpin 192
pswpout 7059
---------- Post added at 01:37 PM ---------- Previous post was at 12:49 PM ----------
Been switching back and forth between apps for a while now, paying particular attention to apps like Google Earth and the Browser that load up lots of data.
One particular test that seemed to stress the memory subsystem was using the "Print this page" on multi-page articles on graphics-heavy sites like, e.g. Anandtech (had the Snapdragon S4 review up). With swap enabled, there was a delay of 1-2 seconds when switching back to the browser (no doubt from reading the appropriate pages back into memory) but without the swapfile, the session was gone and the page needed to be reloaded, which took much longer than 1-2 seconds.
Some caveats:
1) I used a rather small swap partition (64MB) compared to the amount of memory available on the device (512MB for the N1). This means that I didn't need to do too much tweaking to the lowmemorykiller settings.
2) I set swappiness to 100, which is intentionally a bit heavy-handed (default seems to be 60).
3) I did not tweak other settings such as dalvik.vm.heapsize, vfs.
_cache_pressure, page-cluster and, as mentioned in #1, lowmemorykiller/parameters/minfree.
Code:
# free
total used free shared buffers
Mem: 403240 390824 12416 0 36
-/+ buffers: 390788 12452
Swap: 62696 59684 3012
# grep "pswp" /proc/vmstat
pswpin 6061
pswpout 31228
h2g2 said:
Dusted off my old Nexus One, loaded up a clean install of CM7 and installed a kernel with CONFIG_SWAP=y. I decided to go with a swap partition on my sd card rather than a swapfile but the effect should be the same.
I haven't had time to do extensive testing but so far but I can confirm that swap is working and I haven't yet noticed a major perceptible impact to performance of the device.
Code:
# free
total used free shared buffers
Mem: 403240 379288 23952 0 60
-/+ buffers: 379228 24012
Swap: 62696 27948 34748
# grep "pswp" /proc/vmstat
pswpin 192
pswpout 7059
---------- Post added at 01:37 PM ---------- Previous post was at 12:49 PM ----------
Been switching back and forth between apps for a while now, paying particular attention to apps like Google Earth and the Browser that load up lots of data.
One particular test that seemed to stress the memory subsystem was using the "Print this page" on multi-page articles on graphics-heavy sites like, e.g. Anandtech (had the Snapdragon S4 review up). With swap enabled, there was a delay of 1-2 seconds when switching back to the browser (no doubt from reading the appropriate pages back into memory) but without the swapfile, the session was gone and the page needed to be reloaded, which took much longer than 1-2 seconds.
Some caveats:
1) I used a rather small swap partition (64MB) compared to the amount of memory available on the device (512MB for the N1). This means that I didn't need to do too much tweaking to the lowmemorykiller settings.
2) I set swappiness to 100, which is intentionally a bit heavy-handed (default seems to be 60).
3) I did not tweak other settings such as dalvik.vm.heapsize, vfs.
_cache_pressure, page-cluster and, as mentioned in #1, lowmemorykiller/parameters/minfree.
Code:
# free
total used free shared buffers
Mem: 403240 390824 12416 0 36
-/+ buffers: 390788 12452
Swap: 62696 59684 3012
# grep "pswp" /proc/vmstat
pswpin 6061
pswpout 31228
Click to expand...
Click to collapse
little of my understanding, if a swapfile is made in an external sd, the sd card must have good r/w capability (minimum required a class 6 sd card), what if the swapfile is made in internal sd (since GTab have 12gb planted chip memory), what is the effect?
and so,....would you be kind enough to build a kernel for GTab 7+ that support swapfile? and if you do, can you do with a flashable zip (which i can flash it through cwm recovery?
so i can answer my own question : swap or not to swap?
and of course if you have spare time
thanks
dan
danielkaboom said:
little of my understanding, if a swapfile is made in an external sd, the sd card must have good r/w capability (minimum required a class 6 sd card), what if the swapfile is made in internal sd (since GTab have 12gb planted chip memory), what is the effect?
and so,....would you be kind enough to build a kernel for GTab 7+ that support swapfile? and if you do, can you do with a flashable zip (which i can flash it through cwm recovery?
so i can answer my own question : swap or not to swap?
and of course if you have spare time
thanks
dan
Click to expand...
Click to collapse
I'm using a Class 2 8GB MicroSDHC card from Sandisk on my Nexus One for testing and it seems to be fine. I'd recommend using an external SD because it's replaceable and swap I/O will wear out your flash faster so you're better off segregating it.
I took a look at the state of the kernel source for the GTab7+ at the moment and it looks like the Samsung sources are out of date and a kernel built from the current sources won't run properly on the LA3 firmware (Garyd9 notes this in the thread for his kernel as well) so right now, building a custom kernel is a nonstarter for me because the LA3 firmware fixed some pretty major shutdown issues for me on my Tab.
Perhaps when the ICS sources are released, I'll take another look.

Categories

Resources