![]() |
Clear RAM?
Is there a xterm command to clear out ram that may still be used by apps that you have shut down?
At times my n900 feels slugish. And I dont feel like rebooting everytime. Thanks |
Re: Clear RAM?
I wanted to know this too
|
Re: Clear RAM?
If an application is shut down the memory is freed, thats how more or less all systems work.
|
Re: Clear RAM?
pkill command
kill the process you like with PID. |
Re: Clear RAM?
run "top" on your XTerminal and then use "kill <pid>" to kill a process of your choice. For some, you might need to have root access...
|
Re: Clear RAM?
ah, so no super command to free up any memory thats being used up uselessly.
thanks for the rplkies guys. ill have to keep "kill" in mind and figure out what i need to kill. |
Re: Clear RAM?
Quote:
|
Re: Clear RAM?
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).
i enjoy my ferrari, i just want to keep it running well. :) |
Re: Clear RAM?
Quote:
90% of the time sluggish behavior is less from memory usage and more from cpu/disk usage. I've found it tends to be the background daemons like the mail daemon, tracker, and the thumbnailer. |
Re: Clear RAM?
wakkamis: RAM (memory) on the N900 (or any Linux system) does not work the way you think. It really doesn't. There's no reason to worry about dirty RAM.
|
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 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. |
Re: Clear RAM?
thats all ok but, how much free memory do you have on normal usage?
ill share you mine Code:
$ free |
Re: Clear RAM?
right. i understand now with the replies to this thread that my skipping / freezing issues are more related to the processor.
|
Re: Clear RAM?
Quote:
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) |
Re: Clear RAM?
yah.. chalk it up to being a windows noob. thanks for all the info guys. this is a great community! :)
|
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. |
Re: Clear RAM?
Free RAM = Wasted RAM, i have paid for the RAM in my N900, so i want to use it.
|
Re: Clear RAM?
so guys, if my RAM is 70% busy it means not so bad ?? hehe :)
|
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. |
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.
|
Re: Clear RAM?
Quote:
|
All times are GMT. The time now is 10:30. |
vBulletin® Version 3.8.8