Swap Memory

ItsOnlyMe

Verified User
Joined
Apr 3, 2009
Messages
126
Location
Netherlands
hello,

uhmm last night i runned the CP -a command and my 8 GB mem was fully cashed is there any way to create a swapfile or a command to empty the Cash mem ?

greetings itsonlyme
 
You have to stop the process that is using up the ram.
 
uhmm mate i cant stop the proces cuz it was done and it cashed memory wasnt giving free it sayed the same for like 2 hr then i restarted the server

Mem: 8181632k total, 7073172k used, 1108460k free, 152364k buffers
Swap: 0k total, 0k used, 0k free, 5621604k cached

You have to stop the process that is using up the ram.
 
Swap: 0k total, 0k used, 0k free, 5621604k cached

I don't understand how you have have a certain amount of swap cached when you don't have any swap to begin with. How can you cached something you never had?
 
I dont know thats the whole problem yesterday my full 8GB cashed .. needed to restart server.. maybe anyone knows how to make swap file


I don't understand how you have have a certain amount of swap cached when you don't have any swap to begin with. How can you cached something you never had?
 
By the way, your problem is not a problem.
Cached memory is freed up when necessary, if no process needs new memory space its content will stay like that forever.
This doesn't make you server slower or anything; it just makes faster the next launch of the process that filled the cached memory to begin with.

You can remove manually the cache (read http://egloo.wordpress.com/2008/10/29/linux-cached-memory/) but it's just the dumbest thing to do. :)
 
By the way, your problem is not a problem.
Cached memory is freed up when necessary, if no process needs new memory space its content will stay like that forever.
This doesn't make you server slower or anything; it just makes faster the next launch of the process that filled the cached memory to begin with.

You can remove manually the cache (read http://egloo.wordpress.com/2008/10/29/linux-cached-memory/) but it's just the dumbest thing to do. :)

what would happen if i empty my cashed memory? is there any difference ?
 
Did you read the article?
Freeing memory buffer does not make your programs faster… Actually it makes disk access slower.
That's all. Linux will have to read more from the disk instead of recovering the mmap()ed files and executables from the memory cache.
 
Did you read the article?

That's all. Linux will have to read more from the disk instead of recovering the mmap()ed files and executables from the memory cache.


aah okay,, so its no problem with the cashed memory only i thought like WTF is happening here all my 8GB gone

thnx
 
Last edited:
aah okay,, so its no problem with the cashed memory only i thought like WTF is happening here all my 8GB gone

thnx
You're probably used to seeing in Windows XP and similar versions where all you'd have is Free Memory and Total Memory. All you had to do was look at the first value to tell whether things were running like you wanted. With Linux, it treats free memory as wasted memory. It caches all the data it can with the free memory, but will give up that cached memory to any programs that need it. It doesn't harm anything. It can only help. So when you see that you only have 30mb of free memory, don't freak. Check first to see how much of your total is actually cached.
 
Back
Top