LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   flushing RAM? (https://www.linuxquestions.org/questions/slackware-14/flushing-ram-77231/)

carboncopy 07-30-2003 04:38 AM

flushing RAM?
 
Is there away to flush RAM in Linux?

I have 1Gbyte of RAM and it is used up.

And I am not even running anything significant. Just that my slack has been up for 2 days only.

Well, I do have lots of fonts. About 400Mb of them.

neenee 07-30-2003 06:04 AM

linux shares memory between apps, and it caches a lot. as long
as your hard drive is not swapping a lot, you're fine and need
not worry about reported ram usage. the ram's there to be
used; so why should it be free?

Noryungi 07-30-2003 06:15 AM

Are you absolutely, 100% sure it is used??

Try launching "top" to check this... :D

1GB RAM -- Oh please! I have a Pentium 133MHz with 96 MB of RAM... and most of it is *not* used!! On the other hand, if it *is* used, you have too many daemons running on your machine.

Besides, as neenee pointed out, RAM is there to be used! :D

reclusivemonkey 07-30-2003 09:18 AM

Memory in Linux
 
This causes a lot of people confusion at first. If you type:-

free -h

This will show your memory usage. The "-h" flag outputs in "human" readable format, so you can see the results in meaningful values (too see what I mean try it without the -h).

The top line is the memory that has been used on your system, but the important line is the next one down, the +/- buffers/cache. This is the true picture of the memory in use by your system.

If you are using something like GKrellM to monitor your memory usage, there is a box to tick that will give you a similar result to using free.

neenee 07-30-2003 10:42 AM

there is no -h option (and no spoon); perhaps you
meant free -m, which shows the values in megabytes.

reclusivemonkey 07-30-2003 10:57 AM

D'OH

You're quite right. Its -h on df! Thats what comes of being sat on a winbloze box all day! Thanks for correcting that.

jvds 07-30-2003 11:02 AM

You can try to free up some buffer cache using "sync"

Rus

carboncopy 07-30-2003 11:41 PM

I rebooted my slackware after posting the thread.

Why am I asking how to free the RAM because the programs began to lag when I switch between programs. Prior to that, I did intense disk activity.

Yes I uses top and free to monitor the RAM usage.

As for deamons, I have the usual, but i switch off samba, sendmail, nfs which is on by default in Slackware. I have two httpd running on the same machine. Anyhow, nobody accesses it or even know of its existance.

After booting up. I did a free and it says that 60++Mbyte has been used. after starting X with KDE. It says 150M++. After that, I left it over night and this morning when I checked it reports 630M used 402M free 174M cache.

How should we interprate the data from free and top? If I do a ps -aux, the RAM usage when I totalled up together is about 22.3 %.

How do I use sync? What is it?

Noryungi 07-31-2003 05:35 AM

Quote:

As for deamons, I have the usual
And could you tell me what is usual, as far as daemons are concerned? :)

All my Slackware machines have exactly one daemon running: SSH.

Quote:

I have two httpd running on the same machine.
That's probably one too many... :D

Quote:

after starting X with KDE. It says 150M++
And how is that surprising? :D

Honestly, I think that you don't need two httpd running on the same machine and that running X+KDE on top of that simply results in huge RAM consumption... These are simply HUGE applications!

If you need a small www server, run "thttpd" instead of "Apache".

If you need a big www server, with lots of users, run Apache and SSH and that's it: no X, no KDE, no nothing.

If you need a HUGE www server, with GB od download every day, swith to FreeBSD or start buying lots of Linux machines... Just my US$ 0.02...

reclusivemonkey 07-31-2003 07:57 AM

Quote:

Originally posted by carboncopy
After booting up. I did a free and it says that 60++Mbyte has been used. after starting X with KDE. It says 150M++. After that, I left it over night and this morning when I checked it reports 630M used 402M free 174M cache.
60 Mbyte at the console??? That sounds an awful lot. I think even with smbd, httpd, sendmail, and pretty much anything else Slackware has availible to start up, it shouldn't take 60 Mbyte of RAM. I'm pretty sure that I use around 8 Mbyte of RAM at the console, even with sendmail and httpd running. Is it possible your machine has been compromised?

Noryungi 07-31-2003 08:06 AM

Quote:

Is it possible your machine has been compromised?
That's another possibility, especially if "carbon copy" is connected through a high-speed link... :D

carboncopy 07-31-2003 11:03 PM

Re: Memory in Linux
 
I am connected to the university campus lan. Not accessible directly from the Internet. Compromised? Maybe, but not likely.

Anyhow, I have decided that I have inteprated the info wrongly. As what reclusivemonkey says:

Quote:

Originally posted by reclusivemonkey

The top line is the memory that has been used on your system, but the important line is the next one down, the +/- buffers/cache. This is the true picture of the memory in use by your system.

Still, nobody explained about the sync thing which was mentioned by jvds.


All times are GMT -5. The time now is 11:13 AM.