LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Memory cached & bash problem (https://www.linuxquestions.org/questions/linux-newbie-8/memory-cached-and-bash-problem-846163/)

a_1 11-23-2010 09:32 PM

Memory cached & bash problem
 
Hello.

i have problem when i run this command to ssh to get free ram ,

Code:

echo 3 > /proc/sys/vm/drop_caches
this is code must give me free ram and empty ram cached, i already run this command many time on other nodes i have but with one node when i run this command, i found the ssh hang and can not do any thing , so when i open anther ssh window and type command " top " i see "bash" is take from 89 to 100 % of CPU

i'm try to use kill command like this to stop this bash but can not stop

kill -9 56565
or
killall -9 56565
OR
killall -9 bash

there is nothing need to stop this bash on top using high CPU,


so please if any one can help me ?

Thank you

TobiSGD 11-23-2010 09:38 PM

It is not needed to "free" RAM this way. If an application needs RAM, the cache will be automatically dropped and the RAM will be assigned to that application. In fact, freeing RAM this way can even decrease performance.

a_1 11-23-2010 09:47 PM

my nodes used for hosting vpSs and when i need to see the Free -m i see it's like 100 MB only and my node have 16 GB ram , the cached memory is 8 GB . and also the problem now is how to stop/kill this bash on top using all this CPU !!!

Tinkster 11-23-2010 09:48 PM

Quote:

Originally Posted by a_1 (Post 4168943)
my nodes used for hosting vpSs and when i need to see the Free -m i see it's like 100 MB only and my node have 16 GB ram , the cached memory is 8 GB .

And that needs to be changed why exactly? :}



Cheers,
Tink

a_1 11-23-2010 09:53 PM

Quote:

Originally Posted by Tinkster (Post 4168946)
And that needs to be changed why exactly? :}



Cheers,
Tink

i'm sorry but i dont know what you mean !

catkin 11-23-2010 10:24 PM

Quote:

Originally Posted by a_1 (Post 4168951)
i'm sorry but i dont know what you mean !

Why do you think "my nodes used for hosting vpSs and when i need to see the Free -m i see it's like 100 MB only and my node have 16 GB ram , the cached memory is 8 GB" is a problem?

a_1 11-23-2010 10:37 PM

Yes problem happend inside vpSs . and it's not problem now to know this info . i'm looking to get help for my orginal post if any one can help me to fix the issue please reply

catkin 11-23-2010 10:49 PM

Quote:

Originally Posted by a_1 (Post 4168983)
Yes problem happend inside vpSs . and it's not problem now to know this info . i'm looking to get help for my orginal post if any one can help me to fix the issue please reply

Why do you think it is a problem? Do you know about file system caching as explained on Steve Miller's blog?

EDIT: what Steve Miller doesn't make clear is that unchanged (= not dirty) file system cache pages do not need to be flushed -- the memory they use is available immediately when required for other purposes.

a_1 11-24-2010 02:07 AM

i'm not talking now about what cach doing i'm talking about how to fix this issue i have

TobiSGD 11-24-2010 04:57 AM

You wouldn't have an issue if you wouldn't drop the cache, which is an completely unneeded action.

Tinkster 11-24-2010 10:26 AM

Quote:

Originally Posted by a_1 (Post 4169150)
i'm not talking now about what cach doing i'm talking about how to fix this issue i have

That's the whole point. You don't actually have an issue; yet
your attempt to fix a non-issue brought you here.

a_1 11-24-2010 12:58 PM

1 Attachment(s)
See the attach file , this day number 3 and i still see this bash take 99% to 100 % kill id not working with this top bash


All times are GMT -5. The time now is 05:26 AM.