LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   free memory confusion problem (https://www.linuxquestions.org/questions/linux-newbie-8/free-memory-confusion-problem-631971/)

kpachopoulos 03-31-2008 01:09 PM

free memory confusion problem
 
Hi,
i have rented a virtual server from a web services company. I am trying to create a java virtual machine and teh responce is that there is no memory. So i do a "free -m" and i get the following:
Code:

xxx:~# free -m
            total      used      free    shared    buffers    cached
Mem:          3790      3763        27          0        14        821
-/+ buffers/cache:      2926        863
Swap:        8001        336      7664

(1) I would just like to confirm that:
-the total memory is ~3.7GB
-for some reason -i am not executing anything- my guest seems to be using almost all of it
before contacting the customer support.

The contract guarantess 384 with a maximum of 1024MBs...

pljvaldez 03-31-2008 01:18 PM

The line to look at is the -/+ buffers/cache. You have 863MB available for applications.

kpachopoulos 03-31-2008 02:02 PM

Could you please explain the difference or better post a link in order to get an explanation of this? "man free" is not comprehensive at all.
Thnx

pljvaldez 03-31-2008 03:18 PM

Basically, linux caches information in unused RAM so that it can be accessed quicker. That's basically the first line that says 3763MB is "used" and only 27MB is "free". But the line below it that I mentioned above is what is available to run applications. So if you open, for example, Firefox, linux will free up the cached RAM and allow it to be used for applications to run. So that line with "-/+ buffers/cache" shows that 2926MB is used by applications, and therefore unavailable to other applications to use. It also shows that you have 863MB "free" for applications to use.

Here's a link explaining it a bit better than me.

H_TeXMeX_H 03-31-2008 03:30 PM

If only I had $1 for every time this question is asked, maybe I'll put it in my sig so I can refer to it easier.

syg00 03-31-2008 03:59 PM

Yes you have a bit under 4 Gig.
Something is eating it up - including swap. Shouldn't happen on a quiet system IMHO - have a look in "top" and sort by RES or %MEM to see who the offenders are.


All times are GMT -5. The time now is 04:05 PM.