ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

Red Hat 平台的推荐交换大小是多少?

2021-06-28 13:33:44  阅读:180  来源: 互联网

标签:space RAM 交换 amount swap Hat Red


环境

  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 5
  • Red Hat OpenStack Platform (all versions)

问题

  • If I add several hundred gigabytes of RAM to a system, do I really need several hundred gigabytes of swap space?
  • What are the recommended swap size settings for Red Hat Enterprise Linux 5, Red Hat Enterprise Linux 6, Red Hat Enterprise Linux 7, Red Hat Enterprise Linux 8?
  • What are the recommended swap size settings for Red Hat OpenStack Platform?
  • How much swap should I assign to a virtual guest, is the recommendation different from a normal system?

决议

  • In years past, Red Hat recommended a linear increase to the amount of swap space on a system as the amount of RAM increased. Specifically, the recommendation was that swap space should equal twice the amount of RAM when the system has up to 2 GB of RAM installed, and the amount of RAM plus 2GB when the system has more than 2GB of RAM installed.

  • This advice is no longer practical for modern computers and modern platforms as amounts of installed RAM have increased to multiple terabytes on some systems. The following guidelines are a better way to determine the amount of swap space a system should have:

Red Hat Enterprise Linux 5

Amount of installed RAMRecomended swap space
4GB or less 2GB swap space
4GB - 16GB 4GB swap space
16GB - 64GB 8GB swap space
64GB - 256GB 16GB swap space

Note: A swap space of at least 100GB is recommended for systems with over 140 logical processors.

Red Hat Enterprise Linux 6, Red Hat Enterprise Linux 7, Red Hat Enterprise Linux 8, Red Hat OpenStack Platform (all versions)

Amount of installed RAMRecommended swap spaceRecommended swap space if allowing for hibernation
2GB or less Twice the installed RAM 3 times the amount of RAM
> 2GB - 8GB The same amount of RAM 2 times the amount of RAM
> 8GB - 64GB At least 4GB 1.5 times the amount of RAM
> 64GB or more At least 4GB Hibernation not recommended

Note: A swap space of at least 100GB is recommended for systems with over 140 logical processors or over 3TB of RAM.

  • The following items also influence the decision on how much swap space should be allocated:

    • Do specific application requirements exist? Applications may have been written with a specific amount of swap space in mind. If this is the case, the system should be set up with the amount of swap that is recommended by the application vendor.
    • Do other requirements exist? Workstations and laptops may use hibernation functions that store the RAM contents in the swap area. In this case, the swap space would need to be equal to or greater than the amount of RAM installed in the system to enable hibernation.
    • Assigning swap as 'last effort' memory While the block devices hosting swap are generally many times slower than RAM, it is useful to have swap as another layer of memory that's available when needed. In the case of applications with high memory utilization, swap space can allow memory to be swapped out to disk to delay or prevent the termination of applications by the OOM killer.
  • Virtual guests: for virtual guests, the same considerations as for physical systems apply. Also for these, using a bit of swap can influence the behaviour of a process requesting more and more memory, so the process gets slowed down first (leaving time for a sysadmin to manually fix the situation) before eventually also the swap is exhausted and the OOM killer terminates processes. If the memory written by the processes is not exceeding the available swap, the system will just experience a temporary slowdown.

  • Red Hat OpenStack Platform: Red Hat OpenStack Platform Director swap space is configured at install time following the standard RHEL partitioning guidance provided above. To configure swap space for Director deployed overcloud nodes please refer to Solution 4005521.

 

 

https://access.redhat.com/solutions/15244

标签:space,RAM,交换,amount,swap,Hat,Red
来源: https://www.cnblogs.com/augusite/p/14944066.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有