When I use top to see memory usage, I have 65gb ram but only 1.3gb of it free and remaining is shown as used. When I ran my program It gives memory insufficiency error. Although no other program is using the remaining 63.7gb ram it is hold. how can I get free the unused ram?
|
feedback
|
|
Too many duplicates to list. But long story short, the memory is in use as cache and buffers, and will be freed as applications consume more real memory. | |||
|
feedback
|
The +/- buffers line is your actual memory usage. What program are you trying to run? It's very possible that it's not actually a lack of available memory, but some other issue. Are you perhaps running a 32 bit operating system in PAE mode on this machine? Your application may want more than 2GB of virtual address space, which PAE cannot provide. (A kernel recompile can bump that up to 3GB, but you really are better off going to 64 bit if that's the case.) | |||
|
feedback
|
|
If you want the memory not to be used, take it out of the computer and sit it on your desk. There is a common misunderstanding that free RAM is good. Actually, every byte of RAM that is free represents a failure of the system to make effective use of that RAM. Free RAM won't make your system any faster. Consider a grossly oversimplified scenario. A program runs, and then finishes. Your operating system has two choices: 1) It could make the memory that held the program free. This requires a specific operation to make it free, and a specific operation to allow it to be used again. And if the program runs again, it will have to be loaded in from disk. 2) It could not make the memory that held the program free. This requires no operation to make it free, but a specific operation might be needed later to move it to another use. And if the program runs again, it will not have to be loaded in from disk. So, under most conditions, option 2 is a pure win. It saves an operation if the memory needs to be used for something else (it can just switch from one use to another in one step rather than two steps, one to make it free and one to make it not free). And it may save the program from having to be loaded in from disk, which would be a huge win. So, the short version is, you don't want free RAM. | |||
|
feedback
|
top -bn1 | head -n 6as an edit to your question. – Dennis Williamson Apr 25 '10 at 13:29