Hi,
I noticed that OS constantly unloads my applications.
Say, I visit some page using IE, then switch to another application, then switch back - it is usually at the same page, but, probably depending on idle time, it sporadically gets closed.
That said, when I go to IE again, it starts afresh on its initial page and I must reload my page again. Needless to say, in most cases this is unacceptable. (extra traffic, so it costs $$, also GPRS could become unavailable etc :x )
How do I PREVENT this behaviour?
Not only IE suffers, any application! Sporadically exits despite of fact there are tons of free memory and I would better free resources with another way than just closing what is required for me.
I have elder device with PocketPC 3.0 (Cassiopeia E-125) and it does NOT behave in such a way. Does not close even it has 4times less memory! Now I understand how nice it is.
While this problem persists, I forced to have both devices with me.
Please help me solving this!
Vadim.
I've noticed the same behavior randomly also. I don't have a fix, but you're not alone.
What ROM version are you using? There was an issue with the earlier ROMS in that there were too many programs running and when you launched another program the OS would terminate a background program to provide the necesssary process space.
The newer ROMs have solved this problem, but CheckNotify and ClearNotify (search the forum) will help with the earlier ROMs.
This is an old problem, related to the number of running processes.
Consult this thread
http://www.ppcw.net/?itemid=1645
which will show you how to solve it. Also the newer roms cut down on the number of processes at startup, which helps.
Surur
Mine is much more random than that described. Sometimes I can have a half dozen apps open with no problem, and sometimes a single app will close itself while I work in the phone or the Today screen.
Carlos said:
Mine is much more random than that described. Sometimes I can have a half dozen apps open with no problem, and sometimes a single app will close itself while I work in the phone or the Today screen.
Click to expand...
Click to collapse
Don't forget that we are talking processes, not appications, here. One app. may have many processes and multiple app's may use the same common processes. Therefore, launching one application can generate a number of new processes and that can push you over the limit (e.g. ActiveSync, which launches three or four I recall), so something gets nuked.
I understand, and was looking for a pattern, but there is none. In fact, it seems reversed, as it happens more often while I'm just out and about and less frequenty while the device is in the cradle. Very often it happens after a fresh boot with a single app running.
I may look at it more closely with a process viewer. It's not bugging me enough to make it a priority.
Thank you all for providing many help!
surur said:
This is an old problem, related to the number of running processes.
Consult this thread
http://www.ppcw.net/?itemid=1645
which will show you how to solve it. Also the newer roms cut down on the number of processes at startup, which helps.
Click to expand...
Click to collapse
That explains it all, many fruitful comments, and a prove that there could be no fix but just temporary solutions to reduce a problem a bit.
It is a bit larger problem in my case, because I use special sotware to support Russian.
Too bad MS can't recognize and fix such a big design mistakes.
Hi,
I have noticed that my Nexus' performance starts to drop after some hours on: going from one home screen to the other becomes quite choppy, and so do the animations of opening an application.
Have you guys noticed that too, or is it just me?
It was like this for me until I bought Advanced Task Manager. I have it auto end applications that I don't need to run all the time. It runs much better now.
The issue is RAM. The kernel that shipped with the Nexus One doesn't support the full 512MB of RAM. However, CyanogenMod 5.0-beta4 does and the difference in speed is amazing. With 26 apps running I have 167MB free atm.
But like stickerbob said, you should have Advanced Task Manager at the least.
Deathwish238 said:
The issue is RAM. The kernel that shipped with the Nexus One doesn't support the full 512MB of RAM. However, CyanogenMod 5.0-beta4 does and the difference in speed is amazing. With 26 apps running I have 167MB free atm.
Click to expand...
Click to collapse
I don't get it. Isn't Android supposed to kill unused apps when it's running out of RAM?
frandavid100 said:
I don't get it. Isn't Android supposed to kill unused apps when it's running out of RAM?
Click to expand...
Click to collapse
Yep but some people just don't get that, ah well...
efeltee said:
Yep but some people just don't get that, ah well...
Click to expand...
Click to collapse
Well, that doesn't really explain the performance drops. Does the phone run out of RAM, or not? It seems to be snappy again after a reboot, so there must be something.
frandavid100 said:
I don't get it. Isn't Android supposed to kill unused apps when it's running out of RAM?
Click to expand...
Click to collapse
That is what I have read, but it did not work for me. I downloaded the free version of advanced task man to troubleshoot the problem and found that most of my apps were still running in the background even when my ram was down to 10-20mb. That is about when the phone would start acting up on me. When I ended the tasks the phone would act normal again. So I just broke down and bought the app for $.99. If you do this make sure you exclude some system apps, if you don't your phone could freeze while it is trying to restart them.
10-20mb free is normal operation. This is how the OS is designed to operate, linux and even windows7 now also operate in this fashion (show very little 'free' memory). there is no performance problem with low free memory, purely a misconception on modern memory managment. Whats going on is that you have a buggy application, which is why 'killing' apps looks to be resolving your issue. You're only resolving the symptom, not the problem.
I never kill apps and have had weeks of uptime without any slow down. This gets rehashed over and over again by people claiming task killers help performance. The reality is they do nothing for performance, only nice to have around for that great once and a while an app runs away from you, or in troubleshooting if you have a poorly written app. It should not be anyones habit to do a kill all on a regular basis, if it were the OS would do this automatically.
btw, compcache has been known to cause this slowdown over time issue, it has since been removed from most of the popular custom baked rom's.
frandavid100 said:
I don't get it. Isn't Android supposed to kill unused apps when it's running out of RAM?
Click to expand...
Click to collapse
Yes it does...
bofslime said:
10-20mb free is normal operation. This is how the OS is designed to operate, linux and even windows7 now also operate in this fashion (show very little 'free' memory). there is no performance problem with low free memory, purely a misconception on modern memory managment. Whats going on is that you have a buggy application, which is why 'killing' apps looks to be resolving your issue. You're only resolving the symptom, not the problem.
I never kill apps and have had weeks of uptime without any slow down. This gets rehashed over and over again by people claiming task killers help performance. The reality is they do nothing for performance, only nice to have around for that great once and a while an app runs away from you, or in troubleshooting if you have a poorly written app. It should not be anyones habit to do a kill all on a regular basis, if it were the OS would do this automatically.
btw, compcache has been known to cause this slowdown over time issue, it has since been removed from most of the popular custom baked rom's.
Click to expand...
Click to collapse
Well then there must be many buggy applications. I had to rely on Advanced Task Manager to keep my G1 running acceptably fast. The N1 slows down without its full RAM available so I needed to use Advanced Task Manager then too.
If the RAM is not the issue, why does having the extra 200 MB available make the phone run much smoother with 20+ apps running?
frandavid100 said:
I don't get it. Isn't Android supposed to kill unused apps when it's running out of RAM?
Click to expand...
Click to collapse
well technically no, it reallocates what is being used and frees up memory for programs currently running but non the less the OS manages itself
personally i close apps that i do not have going with the task manager. i seem to notice a performance difference if i do it manually, it takes 2-3 extra taps for peace of mind rather than relying on the OS to figure it out for me...
Deathwish238 said:
The issue is RAM. The kernel that shipped with the Nexus One doesn't support the full 512MB of RAM. However, CyanogenMod 5.0-beta4 does and the difference in speed is amazing. With 26 apps running I have 167MB free atm.
But like stickerbob said, you should have Advanced Task Manager at the least.
Click to expand...
Click to collapse
The speed benefits of CM's ROM isn't due to the HIGHMEM supporting kernel, but rather other tweeks he's done with his build. Extra ram is nice, but there is certainly no limitation with the 213 or so userspace memory that is available now. Android itself does not even use this memory, it has its own reserved memory space, userspace memory is only for applications to be loaded in. And there is speed for keeping as much of your applications loaded in memory as possible.
swetland said:
Roughly 220MB is available to userspace in the shipping build (ERD79).
Quite a lot of memory is dedicated to the radio firmware (41MB), dsp firmware (32MB), display surfaces (32MB), gpu (3MB), camera (8MB), a/v buffers (41MB), and dsp buffers. Much of this needs to be set aside for these specific tasks due to hardware requirements of very large physically contiguous buffers which can be difficult or impossible to obtain after boot once the physical memory space gets fragmented.
The big limitation though is that the Linux kernel needs to do a 1:1 physical:virtual map of general purpose memory used by the kernel and userspace (which excludes the special purpose stuff described above). This eats into the available kernel virtual address space, which is also needed for cross process shared memory used by the binder, etc. Run out of virtual memory and things get unhappy.
In 2.6.32, HIGHMEM support for ARM will allow us to avoid this requirement for a 1:1 mapping which will allow us to increase memory available to userspace without running the system out of virtual memory adddress space.
Click to expand...
Click to collapse
The speed difference I'm talking about is what I experienced when running CM beta3 and CM beta3 w/ highmem. The difference was huge. I assumed the change was mainly attributed to the double RAM available.
Even now with the full RAM available, things run faster when I end the other apps running. It's not necessary, but the difference is there.
It would be nice to be able to pinpoint which apps caused slow downs.
The best way I've seen this put I found in a thread where someone wanted to disable apps from auto-starting entirely. I saved it, because I though it was very elegant way to explain androids mem management.
equid0x said:
I just wanted to chime in here about the whole apps on startup thing....
Android has the concept of services which are programs that typically have a frontend piece, like a GUI for IM that you would normally use, that only runs when you are using it, and a background piece, the service, which is constantly running to keep you connected to your IM servers. This will account for some portion of the things you see running on startup, depending on how many apps you have installed, and whether or not they were written to run as a service.
There are also some, usually older, android programs that existed before "services" were really used.. that basically use triggers to keep reloading themselves. These programs are less efficient, and probably should be re-written to use the official service method of operation, caveat emptor.
Android also makes several modifications to the stock process handling that comes with any Linux kernel, which is already radically different from what most would be used to seeing on Windows as it is. Android attempts to keep commonly used applications running(loaded into memory), but in a sleeping state (using no cpu), so that they may be quickly resumed on request. Android also contains some agressive modifications to the behavior of the OOM(out of memory) task killer in Linux, that seem to cause it to keep applications running until nearly all memory is consumed, killing apps it deems unnecessary only when absolutely necessary. However, Android also supports a methodology of saving the running state of a program, so that if it is killed due to an OOM condition, it may be restarted with relevant data restored, to give the appearance of never having been killed at all.
This functionality is not all to alien to Linux as a platform in general, though Android has many modifications which tend to favor aggressive app management in memory, and less so filesystem cache. This was likely a design choice made to suit the low-speed/low memory platforms Android targets.
Click to expand...
Click to collapse
Good read.
So then given that...only services running should slow down the phone and not the background apps running.
However, this doesn't really answer the OP's question. If it's not a memory issue...what's causing his slowdowns?
Could be too many widgets on the home screen, I don't run that many but its possible that while in an app for a while, and switching back to home the OS may have to kill a whole bunch of apps to allow it to reload all the widgets on the home screen.
I tested this, and loaded the crap out of my home screens with widgets, and then launched a game. When I exited the game there was a good 500ms - 800ms delay in my homescreens from displaying anything other than the background. However, after it loaded, scrolling between screens looks smooth. The new kernel with highmem support can help this, but I would suspect some crazy widget filled homescreen with a 3rd party live wallpaper (star's configured with too many stars) and all of that combined could be an issue even still. Apple combats this by allowing only one app at a time, they know people will go overboard if allowed.
Well, that doesn't really explain the performance drops. Does the phone run out of RAM, or not? It seems to be snappy again after a reboot, so there must be something.
Click to expand...
Click to collapse
There's probably no easy answer to this question. There could be IO contention, a runaway process, high CPU usage, a memory leak, shoddy code in some app, etc etc... One would really have to take a look at the whole state of the system at the time the problem is happening to be able to ascertain what is causing the slowdown.
The phenomenon is in no way unique to Android. I'm sure nearly everyone is familiar with the common complaint "my computer is running slow". The reasons that can happen on a common PC are the very same reasons that can be happening here, and unfortunately there are many of those reasons. While in many cases, throwing memory at the issue may appear to solve the problem temporarily, it often is not a permanent fix.
The amount of userspace memory available really amounts to 1 thing and 1 thing only -> the total number of running processes that we can keep totally in memory at any given time. On stock android, slowdown due to an OOM condition should be minimal, since stock android doesn't swap. Discounting any other bottlenecks, there is a practical limit to the number of programs once would be able to run in the memory space that is available. Realistically speaking, android programs tend to be fairly small, so you'd really have to be running a lot of them to exhaust this space. It is far more likely one or 2 poorly written programs are hogging huge amounts of memory (and probably other resources), which is causing constant killing and restarting of other apps you are trying to run concurrently. You end up with contention on the slow flash, resulting in poor performance.
You can't even really compare the Nexus One to the G1 in this regard, because the G1 truly is terribly deprived of memory. Though, the argument in both cases could really be made that you are attempting to run the hardware beyond its design specifications...
Its been my experience that the culprit is usually one or 2 specific programs. Sometimes the best, although inconvenient, way to figure out which programs these are, is to keep watch of your usage habits, and if you suspect something is the problem, uninstall it, and see if the issue persists. Its time consuming but there really isn't any better way to figure it out without using all kinds of tools that android doesn't really provide convenient access to. There are a few apps on the market that help with this but I am not sure what they are called offhand.
Programs that were identified as sources of slowdown for me have been:
Weatherbug
The Weather Channel
Calorie Counter
Locale
SMS Popup
10000
USA Today
National Geographic Wallpapers
CNN News Widget
Streamfurious
Nav4All
Waze
Just about every app with Admob Ads
And this is really just what I can think off offhand... there are more...
equid0x said:
There's probably no easy answer to this question. There could be IO contention, a runaway process, high CPU usage, a memory leak, shoddy code in some app, etc etc... One would really have to take a look at the whole state of the system at the time the problem is happening to be able to ascertain what is causing the slowdown.
The phenomenon is in no way unique to Android. I'm sure nearly everyone is familiar with the common complaint "my computer is running slow". The reasons that can happen on a common PC are the very same reasons that can be happening here, and unfortunately there are many of those reasons. While in many cases, throwing memory at the issue may appear to solve the problem temporarily, it often is not a permanent fix.
The amount of userspace memory available really amounts to 1 thing and 1 thing only -> the total number of running processes that we can keep totally in memory at any given time. On stock android, slowdown due to an OOM condition should be minimal, since stock android doesn't swap. Discounting any other bottlenecks, there is a practical limit to the number of programs once would be able to run in the memory space that is available. Realistically speaking, android programs tend to be fairly small, so you'd really have to be running a lot of them to exhaust this space. It is far more likely one or 2 poorly written programs are hogging huge amounts of memory (and probably other resources), which is causing constant killing and restarting of other apps you are trying to run concurrently. You end up with contention on the slow flash, resulting in poor performance.
You can't even really compare the Nexus One to the G1 in this regard, because the G1 truly is terribly deprived of memory. Though, the argument in both cases could really be made that you are attempting to run the hardware beyond its design specifications...
Its been my experience that the culprit is usually one or 2 specific programs. Sometimes the best, although inconvenient, way to figure out which programs these are, is to keep watch of your usage habits, and if you suspect something is the problem, uninstall it, and see if the issue persists. Its time consuming but there really isn't any better way to figure it out without using all kinds of tools that android doesn't really provide convenient access to. There are a few apps on the market that help with this but I am not sure what they are called offhand.
Programs that were identified as sources of slowdown for me have been:
Weatherbug
The Weather Channel
Calorie Counter
Locale
SMS Popup
10000
USA Today
National Geographic Wallpapers
CNN News Widget
Streamfurious
Nav4All
Waze
Just about every app with Admob Ads
And this is really just what I can think off offhand... there are more...
Click to expand...
Click to collapse
I'm banking on it being an issue with an app that the OP has installed as well...not the phone or Android. I have only a handful of tried and true apps, and haven't experienced a slowdown even after 150 hours without a reboot.
OP... start uninstalling apps a couple at a time and wait several hours in between to narrow down the problem app.
I can't speak for the OP, but when I was having that problem I had 5 widgets running on my home screen. The Google Search, Sports Tap, Power Control, Calendar, and The Small Weather Channel. Does this seem like too much? I hope not.
stickerbob said:
I can't speak for the OP, but when I was having that problem I had 5 widgets running on my home screen. The Google Search, Sports Tap, Power Control, Calendar, and The Small Weather Channel. Does this seem like too much? I hope not.
Click to expand...
Click to collapse
It's not just widgets that you should be thinking about... any app you've installed can throw something off.
stickerbob said:
I can't speak for the OP, but when I was having that problem I had 5 widgets running on my home screen. The Google Search, Sports Tap, Power Control, Calendar, and The Small Weather Channel. Does this seem like too much? I hope not.
Click to expand...
Click to collapse
I removed the weather & news widget and the phone seems much faster now. I'll keep it like that for a day, see if it stays fast.
So I've been investigating into some recent issues I've been having with apps not staying open i.e. couldn't even keep one app open in the background, and home would reload every time I visited it from anything but the lightest apps. I didn't want to try any RAM Hack ROMs because I run 3D games quite a lot.
I'm using Blue Magic and I found out that both Swype and HTC Touch Input use 12-18MB of RAM even when in the background (according to Astro Process Manager). Since disabling them I've found things to be much snappier. I barely used them anyway. Has anyone else disabled soft keyboards for performance reasons?
don't mean to be an a$$ but i think most people know this, I for one, have my android keyboard set to ignored because i always use it, and have other keyboards disabled, as i don't use them, and i use ram hack, and i have a happy 45-50mb ram when everything is closed, i also have swap, and for the hell of it i've tested how many apps i can have open at one point, and they are news and weather, browser, opera, market, world war, phone, messaging, google talk, all of that open, and switching in between, none of them ever restarted, of course my phone was a little slower, but well thats the price you pay, our hardware is sorta outdated, but if you know how to boost it, it will help a lot, i got a 96swap
You have a point but I would never have thought that the keyboards would be such RAM hogs, especially when in the background, and it helps me a lot because I prefer to run without swap. So I thought I'd mention it in case people who don't really use them but haven't disabled them would like to give it a try.
CompactDstrxion said:
So I've been investigating into some recent issues I've been having with apps not staying open i.e. couldn't even keep one app open in the background, and home would reload every time I visited it from anything but the lightest apps. I didn't want to try any RAM Hack ROMs because I run 3D games quite a lot.
I'm using Blue Magic and I found out that both Swype and HTC Touch Input use 12-18MB of RAM even when in the background (according to Astro Process Manager). Since disabling them I've found things to be much snappier. I barely used them anyway. Has anyone else disabled soft keyboards for performance reasons?
Click to expand...
Click to collapse
Add up all the memory reported as used by astro. Compare that with the ACTUAL memory. Notice something funny about it? More memory in use than total memory?
Congrats. You have just become acquainted with VIRTUAL MEMORY. (not to be confused with swap space, which is very different).
I never noticed my G1 being any slower with the HTC IME running.
if there was a way to permanently disable Google Enhanced Search and Quick Search Box, that'll be another 10mb of Ram easily.
Now when installed a lot of apps including juicedefender and advanced task killer (set to aggressive when screen off with lots of exclusions) the lag has become more of an issue.
Now tell me whats the logic behind having installed a lot of apps and a lag? Running several apps multitasked will offcource produce performance-dips but just having them installed?
What exactly is "aggressive" on the task killer anyway? Some people say its just bad to kill tasks.
I have the idea that its the widgets that causes trouble, since they actually needs to run in the background all the time. I noticed today that the fancy-widget got stuck on upboot for like 60 seconds, that caused the 4 buttons below to not load properly. Alto the rather useless "daily brefing" seems to slow down.
I dont want to root and hack with sd-hacks now when froyo is confirmed to be released officially soon.
Do you have experice with sertain apps/widgets causing lag. If so, it would be great to make a list of "bad" apps.
PS, I tested the 30-day navigon today in car and it worked with no problems at all. Fix in 2 seconds and right on track.
robnil said:
Now when installed a lot of apps including juicedefender and advanced task killer (set to aggressive when screen off with lots of exclusions) the lag has become more of an issue.
Now tell me whats the logic behind having installed a lot of apps and a lag? Running several apps multitasked will offcource produce performance-dips but just having them installed?
What exactly is "aggressive" on the task killer anyway? Some people say its just bad to kill tasks.
I have the idea that its the widgets that causes trouble, since they actually needs to run in the background all the time. I noticed today that the fancy-widget got stuck on upboot for like 60 seconds, that caused the 4 buttons below to not load properly. Alto the rather useless "daily brefing" seems to slow down.
I dont want to root and hack with sd-hacks now when froyo is confirmed to be released officially soon.
Do you have experice with sertain apps/widgets causing lag. If so, it would be great to make a list of "bad" apps.
PS, I tested the 30-day navigon today in car and it worked with no problems at all. Fix in 2 seconds and right on track.
Click to expand...
Click to collapse
I haven't used it in a while, but "spare parts" in the marketplace tells you which apps are consuming your processor IIRC. This will obviously give you a temporary hit to your ability to load and run processes but will let you know more details about your phone that you don't already have and the battery use section of settings obviously only talks about what is using your battery but that isn't going to tell you the whole picture.
I am also someone who says you shouldn't use ATK, at least the way you do, but I have it installed and use it a bit differently. What I try to do is kill all tasks after I've used the marketplace or before I do anything intensive (gaming, GPS tracking) and I kill all apps including ATK. ATK will consume processor, battery and will free up memory which then Android uses to open more tasks you don't need (using processor and battery in the process -> repeat cycle). If you need to free up memory 1-5 times a day I think my way will save maybe 15-30% of your battery over a 24 hour period while costing you less than a minute of hassle (too much for some, sure). Again, I only kill after marketplace (because everything opens to check for updates, AFAIK) and before something that will use heavy memory and processor.
robnil said:
Now when installed a lot of apps including juicedefender and advanced task killer (set to aggressive when screen off with lots of exclusions) the lag has become more of an issue.
Now tell me whats the logic behind having installed a lot of apps and a lag? Running several apps multitasked will offcource produce performance-dips but just having them installed?
What exactly is "aggressive" on the task killer anyway? Some people say its just bad to kill tasks.
I have the idea that its the widgets that causes trouble, since they actually needs to run in the background all the time. I noticed today that the fancy-widget got stuck on upboot for like 60 seconds, that caused the 4 buttons below to not load properly. Alto the rather useless "daily brefing" seems to slow down.
I dont want to root and hack with sd-hacks now when froyo is confirmed to be released officially soon.
Do you have experice with sertain apps/widgets causing lag. If so, it would be great to make a list of "bad" apps.
PS, I tested the 30-day navigon today in car and it worked with no problems at all. Fix in 2 seconds and right on track.
Click to expand...
Click to collapse
Forgot the first part of your question, forgive me. I believe, the reason for more apps causing more lag is at least 2 fold. There are more apps that can be opened when you have free memory (in the vicious cycle I described above). There is also something that might be a bit unique to our phone, and I've only recently read this, it's a bit of speculation so I'm not trying to pass it off as fact but I think it's likely to be knowledgeable on the issue, even if not completely correct. Samsung's internal storage method is an SD card, that allows extra apps to be written to the internal storage but comes with a trade off of lag due to a potential combination of:
slow random-access
bad partition
I think I'm missing an important reason, I'll try to look and edit.
When I initially got my SGS I loaded it with a heap of apps and suddenly noticed the lag and quick battery drain. Problem was I couldn't track down the culprit.
I recently reset my device and was a bit more organized with what I installed. One of the things I started doing was checking what services were being used in the process which you can find under the manage apps part of the system.
So while you can load apps and they may/may not be killed by android or a task killer, the services will always be running - taking up memory, sometimes cpu, network. Things like weather checking, news checking, even email sync are some examples. These services plus any apps you run are I think what starts the lag. You need to be aware of which apps are also run as services.
Yes, there are some bad apps (last Facebook version was found to be a heavy drain) but I think they tend to add up with all the other services running.
As for 'Aggressive' depends on the app killer but my understanding (with the one I use), is that there is a memory limit before the app is killed. Once the limit is reached on aggressive, it doesn't take much before memory is cleared.
One thing to install is SeePU as this gives an indication of CPU, memory and network on the top menu bar. This also helps when the system lags (usually CPU is high and memory is low) and helps to know when to clean (or what threshold to set).
Hope this helps.