Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.