Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 05-15-2005, 01:50 PM   #1
Registered: Jul 2004
Location: Pakistan
Distribution: Slackware 10.0, SUSE 9.1, RH 7, 7.3, 8, 9, FC2
Posts: 413

Rep: Reputation: 32
memory command details

Following is the output of my "free" command

root@darkstar:/usr# free -m
             total       used       free     shared    buffers     cached
Mem:           123        120          2          0          1         18
-/+ buffers/cache:        100         22
Swap:            0          0          0
every thing looks fine, I have 128 mb of ram and swap is disabled but I can't understand from where "buffers/cache" memory came from?
Old 05-15-2005, 06:41 PM   #2
LQ Guru
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
I can't answer for why the output of 'free' is so cryptic, but I can tell you that the "buffers/cache" line shows your actual used/free memory. So in your output, you have 100MB used and 22MB available.

The top "Mem" line has something to do with memory that is allocated, but not actually being used, which is why it shows less free memory. You can usually ignore that line.
Old 05-15-2005, 06:58 PM   #3
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 16,001

Rep: Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219
Do some searching - this comes up all the time.
128Meg and no swap - brave lad.

From a post a little while ago, think of buffers as "in-flight" data. Cache is disk cache - helps alleviate hard disk latency.
Fluctuates based on demand for pages from applications - as demand goes up, the cache shrinks.

Leads to high storage occupancy, but in the Linux world this is considered a good goal.
Old 05-17-2005, 09:19 AM   #4
Registered: Jul 2004
Location: Pakistan
Distribution: Slackware 10.0, SUSE 9.1, RH 7, 7.3, 8, 9, FC2
Posts: 413

Original Poster
Rep: Reputation: 32
no I want to say I have just 128 mb ram.
then where the buffer is stored?
Old 05-17-2005, 05:17 PM   #5
Senior Member
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 52
buffer mapps a file descripter into a series of virtual memory locations making tranparent i/o
exactly as syg00 said
but it's important to read virtual here
linux memory use is multilayered and as far as i know all that is returned on creation of a buffer is a pointer to one or more virtual not actual memory pages that are then mapped to actual memory in another lower layer array. The virtual memory space for 32 bit processors is 4gb wide 1 gb kernel space and 3 gb user space. you only have 128mb of ram so exactly what pages are actually in physical ram and what of that physical ram is then being cached by the cpu mmu pipes and what pointers to pages are being cached or buffered at each instant is something that can only be determines by debuggers and what not.

short answer: why bother thinking about "where" the buffer is. It lives in software.


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
at command details shukla_chanchal Linux - General 2 11-21-2005 11:06 PM
Memory stress test command/script twantrd Solaris / OpenSolaris 5 11-02-2005 01:38 AM
memory command? kboyd001 Linux - General 1 02-08-2005 04:28 PM
command line for determining memory type jdier Linux - Newbie 1 06-10-2004 10:00 AM
Command for output of avaliable memory in PC ? svarreby Slackware 3 01-01-2004 11:07 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:01 PM.

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