Increasing CPU or memory resources

You can increase the CPU or memory resources for a GitHub Enterprise Server instance.

警告:分配新系统资源的过程因虚拟化平台和资源类型而异。 您应该始终配置系统关键资源的监测和警报。 更多信息请参阅“监控 GitHub Enterprise Server 设备”。

Adding CPU or memory resources for AWS

Note: To add CPU or memory resources for AWS, you must be familiar with using either the AWS management console or the aws ec2 command line interface to manage EC2 instances. For background and details on using the AWS tools of your choice to perform the resize, see the AWS documentation on resizing an Amazon EBS-backed instance.

Resizing considerations

Before increasing CPU or memory resources for your GitHub Enterprise Server instance, review the following recommendations.

  • Scale your memory with CPUs. 增加 CPU 资源时,我们建议为实例预配的每个 vCPU(最多 16 个 vCPU)增加至少 6.5 GB 的内存。 如果您使用的 vCPU 超过 16 个,则无需为每个 vCPU 添加 6.5 GB 内存,但应监控您的实例以确保其有足够的内存。
  • Assign an Elastic IP address to the instance. If you haven't assigned an Elastic IP to your instance, you'll have to adjust the DNS A records for your GitHub Enterprise Server host after the restart to account for the change in public IP address. Once your instance restarts, the instance keeps the Elastic IP if you launched the instance in a virtual private cloud (VPC). If you create the instance in an EC2-Classic network, you must manually reassign the Elastic IP to the instance.

Supported AWS instance types

You need to determine the instance type you would like to upgrade to based on CPU/memory specifications.

注意:您可以随时通过调整实例大小来扩展 CPU 或内存。 但由于调整 CPU 或内存的大小需要对用户停机,因此我们建议超配资源来应对扩展。

GitHub 建议对 GitHub Enterprise Server 使用内存优化的实例。 更多信息请参阅 Amazon EC2 网站上的 Amazon EC2 实例类型

Resizing for AWS

Note: For instances launched in EC2-Classic, write down both the Elastic IP address associated with the instance and the instance's ID. Once you restart the instance, re-associate the Elastic IP address.

It's not possible to add CPU or memory resources to an existing AWS/EC2 instance. Instead, you must:

  1. Stop the instance.
  2. Change the instance type.
  3. Start the instance.
  4. 实例完全重启后即可访问,使用 SSH 管理 shell 可验证是否已识别新资源配置:
    $ ssh -p 122 admin@HOSTNAME
    $ ghe-system-info

Adding CPU or memory resources on Microsoft Azure

Note: To add CPU or memory resources in Microsoft Azure, you must be familiar with using either the Azure Portal, Azure CLI or Azure Powershell to manage VM instances. For background and details on using the Azure tools of your choice to perform the resize, please refer to the Azure documentation on changing the size of a virtual machine.

Resizing considerations

Before increasing CPU or memory resources for your GitHub Enterprise Server instance, review the following recommendations.

  • Scale your memory with CPUs. 增加 CPU 资源时,我们建议为实例预配的每个 vCPU(最多 16 个 vCPU)增加至少 6.5 GB 的内存。 如果您使用的 vCPU 超过 16 个,则无需为每个 vCPU 添加 6.5 GB 内存,但应监控您的实例以确保其有足够的内存。
  • Assign a static IP address to the instance. If you haven't assigned a static IP to your instance, you might have to adjust the DNS A records for your GitHub Enterprise Server host after the restart to account for the change in IP address.

Supported Microsoft Azure instance sizes

You need to determine the instance size you would like to upgrade to based on CPU/memory specifications.

注意:您可以随时通过调整实例大小来扩展 CPU 或内存。 但由于调整 CPU 或内存的大小需要对用户停机,因此我们建议超配资源来应对扩展。

GitHub Enterprise Server 设备需要高级存储数据磁盘,可以在支持高级存储的任何 Azure VM 上使用。 带有 `` 后缀的 Azure VM 类型支持高级存储。 更多信息请参阅 Azure 文档中的“Azure 中有哪些磁盘类型?”和“Azure 高级存储:高性能设计”。

GitHub 建议对 GitHub Enterprise Server 使用内存优化的虚拟机。 更多信息请参阅 Azure 文档中的“内存优化的虚拟机大小”。

GitHub Enterprise Server 可以在支持您的 VM 类型的任何地区使用。 有关各个 VM 的支持地区的更多信息,请参阅 Azure 的“可用产品(按地区)”。

Resizing for Microsoft Azure

You can scale the VM up by changing the VM size. Changing its size will cause it to be restarted. In some cases, you must deallocate the VM first. This can happen if the new size is not available on the hardware cluster that is currently hosting the VM.

  1. Refer to the Azure documentation on changing the size of a virtual machine for the required steps.
  2. 实例完全重启后即可访问,使用 SSH 管理 shell 可验证是否已识别新资源配置:
    $ ssh -p 122 admin@HOSTNAME
    $ ghe-system-info

Adding CPU or memory resources for OpenStack KVM

It's not possible to add CPU or memory resources to an existing OpenStack KVM instance. Instead, you must:

  1. Take a snapshot of the current instance.
  2. Stop the instance.
  3. Select a new instance flavor that has the desired CPU and/or memory resources.

Adding CPU or memory resources for VMware

增加 CPU 资源时,我们建议为实例预配的每个 vCPU(最多 16 个 vCPU)增加至少 6.5 GB 的内存。 如果您使用的 vCPU 超过 16 个,则无需为每个 vCPU 添加 6.5 GB 内存,但应监控您的实例以确保其有足够的内存。

  1. Use the vSphere Client to connect to the VMware ESXi host.
  2. Shut down your GitHub Enterprise Server instance.
  3. Select the virtual machine and click Edit Settings.
  4. Under "Hardware", adjust the CPU and/or memory resources allocated to the virtual machine as needed: VMware setup resources
  5. To start the virtual machine, click OK.
  6. 实例完全重启后即可访问,使用 SSH 管理 shell 可验证是否已识别新资源配置:
    $ ssh -p 122 admin@HOSTNAME
    $ ghe-system-info

此文档对您有帮助吗?

隐私政策

帮助我们创建出色的文档!

所有 GitHub 文档都是开源的。看到错误或不清楚的内容了吗?提交拉取请求。

做出贡献

或者, 了解如何参与。