memory usuage

[root@new-host 2 ~]# free -m
             total       used       free     shared    buffers     cached
Mem:           997        255        742          0          1         17
-/+ buffers/cache:        235        761
Swap:         2015        132       1883

1) Can some one explains whats is the difference between buffer/cache in 1st and 2nd line.

2) also i noticed swap is used 132 M when we have 742 MB free MB available. Please advise.
ittechlabLinux SupportAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rajesh NandanwarCommented:
Used memory in the first line includes that devoted to the buffers and cache. In second line, the System shows, how much Memory surely is free - free in the first line is only unused memory. In first line, it shows used buffered and cached memory. In second line, it shows mem-usage without buffered and cached memory, because buffers and caches are not fix.

Here's some more information:

Also, you have a small amount of physical RAM in your box. Linux will try and keep a percentage of ram free so it has swapped out some stuff to allow the system to have memory when it is needed.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.