So, swap is not just for hibernation! This activity, swapping out unused pages, can be beneficial in some scenarios and detrimental in others. In these cases, swap will be used to help the system handle any extra load. The system can swap out those pages and free the memory for other programs or even for the disk cache. A significant number of the pages used by these large programs during its startup may only be used for initialization and then never used again. Sometimes, a large program (like OpenOffice, Neverwinter Nights, or a video editor) make the entire system need extra memory. This FAQ makes an important point that no one here mentions, and that is (emphasis mine) The answers on this post are so very wrong, and this comes up as one of the first results in a Google search for "How much swap?"įirst, a good point of reference is the Ubuntu Swap FAQ Whilst you may well do very little with your computer that eats RAM, it's still best to ask the questions about what you're planning to do with it before making the rash judgement that you don't "need" swap. Also disk is very cheap, so why not have swap?Īnyone who says "you don't need swap" without asking you what you're actually doing with your computer is making assumptions. System slows down as heavy swapping happens, you notice and investigate before all swap exhausted. However if you have a bit of swap then the system will carry on, grabbing swap and allowing the system to continue. Under those circumstances it's entirely possible that you will lose data as applications get killed. In the unlikely event that you run out of RAM - perhaps opening a big file, perheps a long running tab in firefox, it doesn't matter, in that event your kernel OOM killer will kick in and start killing applications to get memory back. If you were manipulating massive pictures and video then it makes sense to have a little swap. For example if it were a Sap server then yes, I would add 32gb swap ( we have boxes at work with 128gb ram and 32gb swap ). It entirely depends on what you plan to do with the machine. Original RHEL 5 table: Amount of RAM in the System Recommended Amount of Swap SpaceĤGB of RAM or less a minimum of 2GB of swap spaceĤGB to 16GB of RAM a minimum of 4GB of swap spaceġ6GB to 64GB of RAM a minimum of 8GB of swap spaceĦ4GB to 256GB of RAM a minimum of 16GB of swap spaceĢ56GB to 512GB of RAM a minimum of 32GB of swap space A swap space of at least 100 GB is recommended for systems with over 140 logical processors or over 3 TB of RAM. If your system resources allow for it, increasing the swap space may lead to better performance. > 64 GB At least 4 GB Hibernation not recommendedĪt the border between each range listed in the table above, for example a system with 2 GB, 8 GB, or 64 GB of system RAM, discretion can be exercised with regard to chosen swap space and hibernation support. > 8 GB – 64 GB At least 4 GB 1.5 times the amount of RAM > 2 GB – 8 GB Equal to the amount of RAM 2 times the amount of RAM ⩽ 2 GB 2 times the amount of RAM 3 times the amount of RAM In the system if allowing for hibernation RHEL 8 table: Amount of RAM Recommended swap space Recommended swap space However, given that swap space is usually designated at install time, and that it can be difficult to determine beforehand the memory workload of a system, we recommend determining system swap using the following table. As a consequence, recommended swap space is considered a function of system memory workload, not system memory.Īnd another excerpt from an older version of the page: However, modern systems often include hundreds of gigabytes of RAM. In years past, the recommended amount of swap space increased linearly with the amount of RAM in the system. Here's a very good recommendation from Red Hat: Recommended System Swap Space
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |