Active Topics

 


Reply
Thread Tools
Posts: 2,829 | Thanked: 1,459 times | Joined on Dec 2009 @ Finland
#1
Hello,

I have enabled all repositories and when i have enough free time I test applications that i find interesting. I´m a little concerned now because i really do not know how to debug memory problems. Quite many times i have read from bugzilla how i should look for non typical process behavior but i do not know what it really means. I have also installed some debug tools for memory/process tracking but it´s bit hard to use them because I can't spot problems and if i find some like UI slowing down and there is no high cpu i still do not know what to search and exactly what range of numbers are worrying or not common on this system.

For example when some process is swapping too much?

Also i´m bit worried how multiple daemons that use python effect on system. It seems that these handy programs merge daily and they might add some basic functions to phone, but is there going to be problems after you have installed e.g. 10 of daemons which rely on python?

Last edited by slender; 2010-03-30 at 20:26.
 
Posts: 2,829 | Thanked: 1,459 times | Joined on Dec 2009 @ Finland
#2
Come on. Give at least some directions :|
 
ossipena's Avatar
Posts: 3,159 | Thanked: 2,023 times | Joined on Feb 2008 @ Finland
#3
does this help:
http://wiki.maemo.org/Maemo_developer_tools

?

e: heres straight link to m5 dev tools:

http://wiki.maemo.org/Documentation/devtools/maemo5

http://wiki.maemo.org/Documentation/...o5/sp-memusage
http://wiki.maemo.org/Documentation/...-smaps-measure
http://wiki.maemo.org/Documentation/...maps-visualize
__________________
Want to know something?
K.I.S.S. approach:
wiki category:beginners. Browse it through and you'll be much wiser!
If the link doesn't help, just use
Google Custom Search

Last edited by ossipena; 2010-03-31 at 11:46.
 

The Following User Says Thank You to ossipena For This Useful Post:
Posts: 2,829 | Thanked: 1,459 times | Joined on Dec 2009 @ Finland
#4
Yes. I have read those but basically I think couple of real life Cases would help a lot.
 
ossipena's Avatar
Posts: 3,159 | Thanked: 2,023 times | Joined on Feb 2008 @ Finland
#5
btw if you get examples, could you please edit those to wiki pages?

See respective man pages
isn't really an usage example, so you have excellent point here.
__________________
Want to know something?
K.I.S.S. approach:
wiki category:beginners. Browse it through and you'll be much wiser!
If the link doesn't help, just use
Google Custom Search
 
juise-'s Avatar
Posts: 186 | Thanked: 192 times | Joined on Jan 2010 @ Finland
#6
Originally Posted by slender View Post
I´m a little concerned now because i really do not know how to debug memory problems. Quite many times i have read from bugzilla how i should look for non typical process behavior but i do not know what it really means.
Don't feel bad, discerning memory usage problems from expected behavior in multitasked environment is non-trivial.

A few things everyone can look for:

* Is there a large amount of swap memory used?
-> Suggests that something is using too much memory, or too many programs open.

* Is some process using a considerable amount of RAM (RES and MEM% columns in htop)?
-> Suggests that this particular program is using a lot of memory, whether it's too much will depend on what it's expected to do.

* Does some process have tendency to grow in it's memory requirements over time (VIRT column in htop increasing)?
-> Suggests that this particular program *may* have memory management issues.

For example when some process is swapping too much?
To some extent, swapping is perfectly good way to handle things. It only gets problematic when it starts to cause latency on the UI. Swap latencies are difficult to relate to a single process, as the swapping decisions are ultimately done by the operating system.

Common sense and somewhat "statistical" approach is necessary to determine if "a process is swapping too much". If having some program running in your system is often causing you and other people swapping related latency, then it might be using the memory in problematic ways. OTOH it's also possible to get swap'd simply because you're trying to do too much with your device.

(My question is, is there any tool to assist in figuring out what is causing the perceived latencies? I know that e.g. 'iostat' can be used to check if there has been swapping activity, but this would need to be polled frequently in order to relate that to another event at some specific time)

Also i´m bit worried how multiple daemons that use python effect on system. [...] is there going to be problems after you have installed e.g. 10 of daemons which rely on python?
A well behaved daemon, written in python or not, (depending on what it's expected to do of course) will typically spend most of their time sleeping, waiting for the OS to wake them up on the specific event they're listening to. This will also make them prime candidates for getting swapped out to disk when they're inactive. I wouldn't be any more worried of python daemons than any other daemons.

Of course, on a portable device with limited resources, anything you can turn off is a win.


Now, I'm sort of expecting you have some candidate suspects for poor memory management. If this is the case, the developer should be among the first people to discuss the issue (or whether there is one or not), because he/she is likely to have reasonable understanding how the app is expected to behave.
 

The Following User Says Thank You to juise- For This Useful Post:
Posts: 2,829 | Thanked: 1,459 times | Joined on Dec 2009 @ Finland
#7
I gave up on my device and flashed it. It has worked quite nicely after that, but this thing with swap memory and slow down issue is still bothering me.

I have followed this bug conversation:
https://bugs.maemo.org/show_bug.cgi?id=8723
And Eero's comments:
"In general it's a bad idea to use Python in an always running process like
Statusbar or Home. I think at least touchsearch uses python (after removing applets, you need to restart Home to get rid of their memory usage in Home too)."

"I think the main issue is Python and whatever brings it into Home (fmtx
applet?). Using things like Python for always running processes is a reallybad idea. Python increases the memory usage significantly and normally one doesn't get rid of almost any memory usage increases created by it (due to memory fragmentation), even if the Python code itself would free it."
Makes me just wonder. How to spot what background processes use python? So what i have understood from Eeros comments is that i should avoid python processes that are constantly running?

What do you think juise-?

Last edited by slender; 2010-04-16 at 08:57.
 
Reply


 
Forum Jump


All times are GMT. The time now is 01:55.