
2009/12/2 Narender <narender.hooda(a)gmail.com>:
I have done a lot of research, but I do not have any real world experience so I'm hoping you can help me understand the real world differences in performance. The research tells me that if you create a swap file on an empty disk and on a OS using kernel 2.6 then the performance differences are minor, but that the swap partition is a slight favorite in terms of pure performance. Our Scenario:
Raid 1 146GB partition 33GB Swap File created on / (Note: the swap file was created when the OS was built, so the hard drives were not full and they were very empty) Kernel 2.6
If you have to ask this question then I would say 33G is likely far more than you need. As a general rule of thumb I advise 2* physical ram for anything up to 2G ram, and ram=swap for anything over 4G Also I think that the difference in performance between a swap partition and swap file is minimal, and the swap file has the advantage of being easily resized when you figure out that you don't actually need 33G. Also swap always wants to be on the fastest drive available. I suspect a swapfile on a RAID5 filesystem would be better than a swap partition on a single drive (though someone will no doubt correct me if I'm wrong) -- Disclaimer: By sending an email to any of my addresses you are agreeing that: 1. I am by definition, "the intended recipient" 2. All information in the email is mine to do with as I see fit and make such financial profit, political mileage, or good joke as it lends itself to. 3. I may take the contents as representing the views of your company. 4. This overrides any disclaimer or statement of confidentiality that may be included on your message.