The Story on SWAP

I hate slashrotsometimes. I don’t know why I keep reading it, but I always get so upset when I read some article that shows how linux centric or inexperienced their ‘geeks’ are.

Todays rant is about the recent post on “Is Swap Necessary”. It is 2004 and the Linux kernel gang is finally getting hip to reality. Here is the article.

First, computer memory and performance are not ‘one size fits all’. Second, swap in the old days was an entire process granularity. Paging went to the ‘page file’ and Swaps went to a ‘swap file’. It is important to make the distinction.

As for the topic of paging, and the algorithms behind aging pages from the VM (cache or executable/text), I am a firm believer that production systems should avoid having a SWAP system enabled. Why? If you are building a production system for the internet, you will expect certain guarantees on performance. Therefore, you will weight your data requirements and only allow a certain number of resources to be consumed by one box. If you do your job right, you will not require a paging file. If you don’t, and you have swapping, you will go ‘hmm. why is machine 73 doing only 1/100th the load it can typically handle’. Swapping will cause the system to still work, but perform poorly. In some cases, so poorly, you will not be able to login and fix the problem. If you didn’t have the page file, your kernel should kill the process that went wild, which will now let you get in and fix the issue.

The bottom line is that I cannot think of any high-performance applications which would stay near their high-performance levels WHILE using a page-file for a backing store.

As for the post, in general…. I come away with this with several feelings.

  1. OS research is dead and the inexperienced admins are running the discussion. There are very few nuggets of advanced technology in the real linux kernel. If we had real OS research, we would see more of these inovations in the kernels.

  2. There is also a lack of good documentation or books that will give these people the real know-how. I mean, there should be a man page that states explicitly how the Linux, Freebsd, or Windows VM system works and what parameters they operate with. Solaris was getting near that point and they even had some innovative techniques. I’m sure Windows NT/XP has some as well, but I can’t find the easy docs for that (nor have I looked). Still, it’s only the third parties that publish the documentation on these simple systems rather than Sun or Microsoft.

  3. The internet is still learning, and it is still in the dark ages. There are still serious communications problems on the internet (noise – think SPAM or newbies). Too often the wrong voices are crowding the right ones. If there is a slashdot topic on how to eliminate system noise, I want to see the posts from the research leaders of that field. Instead, I see this newbie post with a bunch of newbie conjecture or posts marked ‘funny’ that should be marked as ‘attempted funny’.

Occasionally, I read the comments on posts like that, and I notice that the vast majority of the respondents does have a forebrain. However, it is still a culture of self-proclaimed geeks which aren’t academics. What does this say about me that I read this computer-world yellow-journalism?

This entry was posted in General. Bookmark the permalink.