Tech Support > Operating Systems > Linux / Variants > memory still used after killall -9 APP
memory still used after killall -9 APP
Posted by Andrew Arro on March 5th, 2004


my linux box [celeron 2000 with 512 ram] was running some application
which was using about 800 megs of ram
[95% ram used + 300megs of swap]
for like 2 days

then i killed it with "killall -9 applicaion_name"

but even after i killed this application i get more then 50% of the
box used:

[root@localhost root]# free
total used free shared buffers
cached
Mem: 1014764 493684 521080 0 29700
122520
-/+ buffers/cache: 341464 673300
Swap: 2040244 3404 2036840

so i type "top", press "M" [sort by memory usage] and i get this:

11710 root 24 0 2288 2288 1168 S 0.0 0.2 0:00 0
00-logwatch
11915 root 15 0 1688 1688 1352 S 0.0 0.1 0:00 0 sshd
14682 root 16 0 1364 1364 1096 S 0.0 0.1 0:00 0 bash
11914 root 15 0 1208 1208 944 S 0.0 0.1 0:00 0
removeheaders
11913 root 15 0 1188 1188 956 S 0.0 0.1 0:00 0
onlyservice
14772 root 15 0 1156 1156 856 R 0.0 0.1 0:00 0 top
11687 root 23 0 588 588 464 S 0.0 0.0 0:00 0
run-parts
....
....

which shows me not so much ran used, much less than 341meg

what could be a problem? which futher steps should i try? the only
only option i have now is reboot

PS:
uname -a
Linux rh 2.4.20-8 #1 Thu Mar 13 17:54:28 EST 2003 i686 i686 i386
GNU/Linux
cat /etc/redhat-release
Red Hat Linux release 9 (Shrike)

Posted by Davide Bianchi on March 5th, 2004


Andrew Arro <arro@arro.ru> wrote:
Memory not used=wasted memory. Your system will never give up the
memory until you start some application that is going to use it
for something better than caching. Unix memory management isn't
Windows.

Ain't a problem. If you see a lot of swap used, it means you have
not enough ram and you should think about buying some.

Davide

--
| "I'd love to go out with you, but I'm taking punk totem pole carving."
|
|
|

Posted by David on March 5th, 2004


Andrew Arro wrote:
Linux actually uses the memory. It uses it to cache recently
opened files and/or programs which helps in the speed of linux
since it is much faster to read from memory than it is to read
from the hard drive.

This is normal memory useage for Linux. It isn't broken so there
is no need to try and fix it. If the system does a lot of swaping
then you need to add more memory.

--
Confucius: He who play in root, eventually kill tree.
Registered with The Linux Counter. http://counter.li.org/
Slackware 9.1.0 Kernel 2.4.25 SMP i686 (GCC) 3.3.3
Uptime: 15 days, 2:16, 1 user, load average: 2.06, 1.95, 1.79

Posted by John-Paul Stewart on March 5th, 2004


Andrew Arro wrote:
The first line shows you that you have 1GB RAM with approx. 493MB used,
and 521MB free. The last two numbers on that line show nearly 30MB for
buffers and 122MB cached. That's over 150MB that's currently in use by
the kernel (caching stuff to speed up access) but can be freed quickly
if needed by an application. The second line from free is always the
more important one: it shows you how much is actually used (341MB) and
how much is effectively available (673MB) after adjusting for the
buffers and cache.

(BTW, the default for free is to show values in KBytes which indicates
you've got twice as much RAM as you said you have.)

Posted by Andrew Arro on March 5th, 2004


David, look at my "free" again

Mem: 1014764 493684 521080 0 29700
122520
-/+ buffers/cache: 341464 673300


i am not asking about 120megs uses for buffers and cache - i KNOW
about this thing, and i am glag linux is so smart

i am asking about the 341megs used NOT for cache or buffers

Posted by David on March 5th, 2004


Andrew Arro wrote:
I still don't see why you think you have a problem. Here is a
clip from my system, using the "free -m" option, which has 2GB of
memory. Needless to say my system does a really great job
considering it's age.

free -m
total used free shared buffers cached
Mem: 2020 1478 542 0 408 598
-/+ buffers/cache: 470 1549
Swap: 972 0 971

I don't see why your worried about the memory being used. Why put
all that memory in the system if you don't want it to be used?
When more memory is needed Linux will either free physical memory
or use swap.

--
Confucius: He who play in root, eventually kill tree.
Registered with The Linux Counter. http://counter.li.org/
Slackware 9.1.0 Kernel 2.4.25 SMP i686 (GCC) 3.3.3
Uptime: 15 days, 15:01, 1 user, load average: 1.10, 1.17, 1.20

Posted by Bill Marcum on March 5th, 2004


On 5 Mar 2004 07:38:45 -0800, Andrew Arro
<arro@arro.ru> wrote:
Use top to see which processes are using the memory.


--
Incrsease your earoning poswer and gaerner profwessional resspect.
Get the Un1iversity Dewgree you have already earned.
[from the prestigious, non-accredited University of Spam!]

Posted by Andrew Arro on March 5th, 2004


ok, i confirm i've made a fault reporting total amount of RAM - it is
1g not 512m

i am glad we both understand this value - 341MB as how much is
actually used

so, here is the top of "top", SORTED BY RAM USAGE ["M" option]
[i am sorry not to post the whole top page]

11710 root 24 0 2288 2288 1168 S 0.0 0.2 0:00 0
00-logwatch
11915 root 15 0 1688 1688 1352 S 0.0 0.1 0:00 0 sshd
14682 root 16 0 1364 1364 1096 S 0.0 0.1 0:00 0 bash
11914 root 15 0 1208 1208 944 S 0.0 0.1 0:00 0
removeheaders
11913 root 15 0 1188 1188 956 S 0.0 0.1 0:00 0
onlyservice
14772 root 15 0 1156 1156 856 R 0.0 0.1 0:00 0 top
11687 root 23 0 588 588 464 S 0.0 0.0 0:00 0
run-parts
....
....


which gives us about 10 megs used, maybe some more under the end of my
copy-paste... this box was running NOTHING, no http mysql names,
NOTHING

so, should i understand the silence as nobody ever seen same problems
with linux and ram?

Posted by Harold W. Stevens on March 5th, 2004


In <17118df1.0403051601.2828b01e@posting.google.com>, Andrew Arro:

[Snip...]

Define "problems".

--
Regards, Weird (Harold Stevens) * IMPORTANT EMAIL INFO FOLLOWS *
Pardon any bogus email addresses (wookie) in place for spambots.
Really, it's (wyrd) at airmail, dotted with net. DO NOT SPAM IT.
Standard Disclaimer: These are my opinions not Internet America.

Posted by John-Paul Stewart on March 6th, 2004


Andrew Arro wrote:
What version of 'top' are you using? Also, what does 'cat
/proc/meminfo' show?