maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Clear RAM? (https://talk.maemo.org/showthread.php?t=47173)

pycage 2010-03-12 16:38

Re: Clear RAM?
 
In my experience sluggishness comes from the crazy swapping that's going on all the time.

The N900 is set to the highest swappiness level by default, meaning it will favor swapping out to flash memory rather than using RAM that was just holding cache.

As root, do
Code:

echo 1 >/proc/sys/vm/swappiness
It should have no ill side-effects and sets the swappiness level to the lowest. The N8x0 (Diablo) is using this level by default e.g.

After reducing the swappiness level, I experienced a much more responsive device, especially with several applications open running for a few days, and it looks like it has increased battery life, too.

clasificado 2010-03-12 16:39

Re: Clear RAM?
 
thats all ok but, how much free memory do you have on normal usage?

ill share you mine
Code:

$ free
              total        used        free      shared      buffers
  Mem:      245540      235532        10008            0          708
 Swap:      786424      110340      676084
Total:      1031964      345872      686092

my ferrari is out of fuel long time ago :D

wakkamis 2010-03-12 17:02

Re: Clear RAM?
 
right. i understand now with the replies to this thread that my skipping / freezing issues are more related to the processor.

cashclientel 2010-03-12 17:06

Re: Clear RAM?
 
Quote:

Originally Posted by wakkamis (Post 564666)
think of the memory as oil. if the oil is dirty or low (fragments of memory being used by programs you thought were closed) the car starts running bad and making funny noises(other programs you are running start to skip or freeze)

Erroneous analogy alert! Erroneous analogy alert!

There are a number of issues I commonly experience that can only be solved by a reboot - for example being unable to connect to certain wifi points. Really irritating, so not sure if there are any solutions out there for a 'soft reboot'? (and not just restarting from the console)

wakkamis 2010-03-12 17:09

Re: Clear RAM?
 
yah.. chalk it up to being a windows noob. thanks for all the info guys. this is a great community! :)

Scottlfa 2010-03-12 17:23

Re: Clear RAM?
 
terminal
htop [or top]
and then kill pid [number for the app you want dead]

But seriously the biggest cause of "slow ups" will be processes spiking into the 30% or more range of cpu usage.

biggzy 2010-03-12 17:33

Re: Clear RAM?
 
Free RAM = Wasted RAM, i have paid for the RAM in my N900, so i want to use it.

raverpol 2010-04-09 14:11

Re: Clear RAM?
 
so guys, if my RAM is 70% busy it means not so bad ?? hehe :)

TA-t3 2010-04-09 14:47

Re: Clear RAM?
 
Not bad at all. Except that it's using _too little_ (unless you just booted up your N900). Linux tries to use all the RAM, because (as biggzy said), free RAM = wasted RAM. Linux will read all files (including applications) _through_ RAM, so that next time something accesses that file (or application) it's already in RAM. Saves time, and battery (no need to actually access flash/disk whatever). Same when you write to a file, the data will be in RAM too, so that when another application comes around to read the file it'll get the data from RAM. That's fast.

As soon as an application needs RAM for something for itself (e.g. its data structures) it'll get its RAM from some of the RAM used as above (aka 'buffer cache'), unless there's still 'free RAM' (if you just booted, remember), and if the file that was buffered this way is accessed again it'll have to be dragged from flash/disk. There's no speed penalty in this either, at least nothing to talk about.

It's all very efficient.

wakkamis 2010-08-30 20:53

Re: Clear RAM?
 
After a few months I have come back to this thread. The question now is, and I should have asked it back then, How do you free up the cpu usage without having to reboot. I know I saw a script you could run but the search isnt turning up anything for me.


All times are GMT. The time now is 00:51.

vBulletin® Version 3.8.8