Jump to content

[SOLVED] Swap


jaymc

Recommended Posts

My server is swapping 1.4GB

 

I have a total of 3GB on the server

 

I know most of it is because of mysql, if I restart apache it drops 200MB so the rest must be mysql

 

The funny thing, it is not impacting performance at all. The server is pretty busy, yet my load averages are always around 0.9 and CPU 30%

 

In the past 500MB swap has killed my server off, so why is 1.4 sitting nicely on my disk yet not impacting the server

 

Infact, its probably running better than it ever has!

Link to comment
https://forums.phpfreaks.com/topic/117129-solved-swap/
Share on other sites

(This entirely piggy-backs on thorpe's answer ;p)

 

 

I'm not sure if this is how the Linux kernel works, but as far as the Windows kernel goes, [assuming I remember correctly], this is the order in which memory is used:

 

-All available RAM will be assigned first

-If a program requests memory, memory from an inactive program may be moved to the swap file

-Things will not be removed from the swap file until it is either cleared, or the space is needed

 

 

So, pretty much it uses it because it can.  Also, just because the data is there doesn't mean it's actively using it.  It could be there 'just in case' it's needed later.

 

And, just because 1.4GB of the swap file is used, that doesn't mean all of the RAM is used, and even if all of the RAM is used, that doesn't mean that at that point in time, no RAM is available to be cleared up.  Memory on computers is a strange thing.

Link to comment
https://forums.phpfreaks.com/topic/117129-solved-swap/#findComment-602865
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.