| About InfoWorld : Advertise : Subscribe : Contact Us : Awards : Events : Store |
|
||||
|
||||
Linux 2.4 RAM Ham A COUPLE OF weeks ago, I described how having the Reiserfs source code saved me from losing data to a disk crash on my Linux-based VarLinux.org server (see The Open Source, Aug. 6).
Here's a brief rundown of what I did to reconstruct the server. The server has two identical model IBM 46GB drives. The second drive was meant to be a bootable mirror of the first, but I never created that mirror until a partition on my first drive went bahooties. After I had recovered enough data from the crash, I mirrored all the partitions from the first drive to the second. Only a few Linux files are drive-specific, so you don't have to change much to boot from a mirrored drive. In my case, all I needed to do was edit the /etc/fstab and /etc/lilo.conf files. Once I had confirmed the mirror worked, I re-edited those files to let me swap the drives. I powered down, switched the master/slave jumpers on my two drives, and booted up the server. The new VarLinux.org was online and running fine. Or so I had thought. As luck would have it, I published a controversial story on VarLinux.org shortly afterward. The story was picked up by the popular Slashdot site (http://slashdot.org), and page views started rolling in. What is commonly known as the "Slashdot" effect has brought down many a Web server, but I thought my wimpy DSL line would be enough of a bottleneck to prevent VarLinux.org from being overloaded by page hits. But the server froze. I rebooted, logged in, and ran the "top" command to monitor server activity to see what was happening. As the Web server requests mounted up, they filled all available RAM. The server seized up without writing anything to the swap file. D'oh! I had created a swap partition on the new drive, but I never initialized it. I hadn't noticed before because the server didn't need a swap file until I got "Slashdotted." Once I initialized the swap file, the system handled the load, but just barely. It was usually too busy swapping to respond to any commands that I issued. I had fallen victim to the now infamous virtual memory performance characteristics of the latest 2.4 Linux kernels. The Linux Kernel developers are currently working diligently on this issue, but I bypassed it for only $50. All I needed was another 256MB of RAM to move the bottleneck from disk swapping to the DSL line. Moral: Initialize your swap files; keep an eye on the new Kernels; and buy enough RAM; it's cheap, and you can never have too much, even if you run Linux. Nick is the founding editor of VarLinux.org ( www.varlinux.org ). Reach him at nicholas @petreley.com. RELATED SUBJECTS Discuss this article in our online forums MORE > SPONSORED WHITE PAPERS
SPONSORED LINKS
|
|||||||||||||||||||||||||||||||||||||||||
|
||||||||||