LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 07-30-2003, 04:38 AM   #1
carboncopy
Senior Member
 
Registered: Jan 2003
Location: Malaysia
Distribution: Fedora Core, Slackware, Mac OS X, Debian, OpenSUSE
Posts: 1,210
Blog Entries: 4

Rep: Reputation: 45
Question 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.
 
Old 07-30-2003, 06:04 AM   #2
neenee
Member
 
Registered: Feb 2003
Location: Netherlands
Distribution: debian (sid)
Posts: 693

Rep: Reputation: 30
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?
 
Old 07-30-2003, 06:15 AM   #3
Noryungi
Member
 
Registered: Jul 2003
Location: --> X <-- You are here.
Distribution: Slackware
Posts: 262

Rep: Reputation: 30
Are you absolutely, 100% sure it is used??

Try launching "top" to check this...

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!
 
Old 07-30-2003, 09:18 AM   #4
reclusivemonkey
Member
 
Registered: May 2003
Location: Halifax, WY, UK
Distribution: Slackware 9
Posts: 167

Rep: Reputation: 30
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.
 
Old 07-30-2003, 10:42 AM   #5
neenee
Member
 
Registered: Feb 2003
Location: Netherlands
Distribution: debian (sid)
Posts: 693

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

Last edited by neenee; 07-30-2003 at 10:43 AM.
 
Old 07-30-2003, 10:57 AM   #6
reclusivemonkey
Member
 
Registered: May 2003
Location: Halifax, WY, UK
Distribution: Slackware 9
Posts: 167

Rep: Reputation: 30
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.
 
Old 07-30-2003, 11:02 AM   #7
jvds
Member
 
Registered: Jul 2003
Posts: 88

Rep: Reputation: 15
You can try to free up some buffer cache using "sync"

Rus
 
Old 07-30-2003, 11:41 PM   #8
carboncopy
Senior Member
 
Registered: Jan 2003
Location: Malaysia
Distribution: Fedora Core, Slackware, Mac OS X, Debian, OpenSUSE
Posts: 1,210
Blog Entries: 4

Original Poster
Rep: Reputation: 45
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?
 
Old 07-31-2003, 05:35 AM   #9
Noryungi
Member
 
Registered: Jul 2003
Location: --> X <-- You are here.
Distribution: Slackware
Posts: 262

Rep: Reputation: 30
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...

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

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...
 
Old 07-31-2003, 07:57 AM   #10
reclusivemonkey
Member
 
Registered: May 2003
Location: Halifax, WY, UK
Distribution: Slackware 9
Posts: 167

Rep: Reputation: 30
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?
 
Old 07-31-2003, 08:06 AM   #11
Noryungi
Member
 
Registered: Jul 2003
Location: --> X <-- You are here.
Distribution: Slackware
Posts: 262

Rep: Reputation: 30
Quote:
Is it possible your machine has been compromised?
That's another possibility, especially if "carbon copy" is connected through a high-speed link...
 
Old 07-31-2003, 11:03 PM   #12
carboncopy
Senior Member
 
Registered: Jan 2003
Location: Malaysia
Distribution: Fedora Core, Slackware, Mac OS X, Debian, OpenSUSE
Posts: 1,210
Blog Entries: 4

Original Poster
Rep: Reputation: 45
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ide Flushing Colinux_Tlinux_noob Linux - Newbie 2 10-14-2005 12:25 AM
flushing disk and cache spejbl02 Programming 3 07-08-2004 01:18 AM
iptable flushing name_in_use450 Linux - Security 1 06-07-2004 01:26 PM
Flushing DNS w/RH9 Colonel Kurtz Linux - Networking 3 06-26-2003 06:22 PM
Flushing the Sendmail queue DarkSTech Linux - Networking 1 02-19-2003 07:34 AM


All times are GMT -5. The time now is 06:56 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration