Hoaxblog.com

Everything is hoax!

Pages:

  • About

Categories:

  • Apache (6)
  • backup (1)
  • cache (2)
  • Cpanel/WHM (11)
  • ddos (1)
  • exam (1)
  • file hosting (2)
  • General (11)
  • Hosting (1)
  • It’s me (2)
  • linux (1)
  • Linux Shell (14)
  • Make Money Online (2)
  • Mysql (2)
  • mysqldump (1)
  • php (1)
  • Programming (3)
  • proxy (1)
  • Reseller (1)
  • SEO (1)
  • Servers (21)
  • VPN (1)
  • Windows (6)
  • wordpress (1)

Archives:

  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • October 2007
  • May 2007
  • April 2007

Blogroll

  • Free Rapidshare Downloads

Meta:

  • Register
  • Login
  • Valid XHTML
  • XFN
  • WordPress


Swap Crashed!

Yesterday was one of the worst day in the life. I have understood the important of Swap / Virtual Memory on the server yesterday. The server load went to over 40% and the memory usage over 60% even on off-peak hours after my swap partitions got corrupted in one of the master reseller server. First time, i couldn’t get the point that, swap got corrupted, though, after running burnintest, i found this from debug, “Invalid Entry ’swap’ on /etc/fstab”. This made the sense that my swap paritions were unusable after i made a reboot in the morning.

The easiest way to find whether swap is working or not, is the memory usage. If the memory usage goes over 50% with a few http processes, you can easily guess your swap is not working perfectly. You can run burnintest to find out whether the swap is corrupted or not. A re-initialization of swap files/partition should sort the problem and the server should come back to normal as usual. One of basic reason behind having high load and memory usage without swap on dedicated boxes is, Swap allows the http processes to think they have bigger space to allocate in memory. This helps a lot to improve the apache performance. While without the swap, this isn’t possible and apache makes different parts of the process to allocate data in different memory locations. This creates more stress when the requests are gathered from different locations too. Usually, some small php scripts then can create heavy load on the server without the swap partition. One of the common way to make the server performance faster and preventing the server from being hung is using a big swap partition. Usually it is better to keep the swap partiton, double then your physical RAM. Like if you have 4 GB Physical RAM, you should consider in keeping 8 GB Swap for it. Though, its not important to keep that amount of space only for swap, but it shouldn’t go down below 4GB according to my assumption.

This entry was posted on Sunday, April 6th, 2008 at 11:47 pm and is filed under Servers. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply


© Copyright by Hoaxblog.com