What should I do if my bricklayer Swap becomes popular? How can I increase the amount of Swap when it is full?

888u

Last update at :2024-03-20,Edit by888u

The KiwiVM control panel will display the usage of the Swap partition in real time. Since the Swap virtual host allocated by KiwiVM by default is very small, many friends who use KiwiVM to build websites will encounter the situation that Swap is full. In the control panel, Swap is displayed in red. Today, we will share a solution on how to add a Swap partition to the Bricklayer VPS.

1. Problem description

The Swap partition allocated by Bricklayer by default is very small. If we use Bricklayer VPS to run many programs, such as building a website, we need to run Nginx, MySQL, PHP, etc. at the same time. When the number of visits is relatively large, we may encounter The situation when Swap is full, as shown in the figure below:

2. Add Swap virtual host

So how to clear the Bricklayer Swap? In fact, this situation of Swap becoming red is mainly caused by the insufficient memory of Bricklayer VPS and unscientific Swap partition setting (the Swap of Bricklayer is too small). The solution is also very simple, which is to modify and add Swap.

In "Linux Swap swap partition setting tutorial: closing the partition, creating partition files, setting up startup, etc." we summarized the relationship between memory and Swap partition size:

  • Memory <= 4g: Swap at least 4G
  • Memory 4~16G: Swap at least 8G
  • Memory 16G~64G: Swap at least 16G
  • Memory 64G~256G: Swap at least 32G
  • So for a Bricklayer VPS with 1GB of memory, it is recommended to allocate 4GB of Swap. The default for Bricklayer is only 256MB, so it will naturally happen that the Swap is full.

    The way to modify Swap is also very simple, that is, first close the default Swap partition, and then create a new 4GB swap partition. For specific tutorials, you can also refer to the tutorial "Linux Swap Swap Partition Settings Tutorial: Close Partition, Create partition files, set boot settings, etc."

    As shown in the figure below, after Bricklayer increased the Swap virtual host to 4GB, the Swap value in the KiwiVM control panel is no longer red:

    The above is the analysis of the reasons why Swap became popular and the sharing of ways to increase Swap virtual host. For more Brickworker VPS tutorials, please refer to "Brickworker Mover VPS Special Topic: Brickworker Mover Discount Codes and Bricklayer Mover Novice Tutorials", you can also join the Bricklayer Mover replenishment notification group to follow the Bricklayer Mover discount information: 659236660, and the Bricklayer Mover exchange group: 171060270 .

    Recommended site searches: icp registration query network, Chongqing virtual space, anti-complaint vps host, cloud server hosting, IP address search, Wanwang space, telecom server rental, purchase of registered domain names, Korean cn2 servers, registered domain names,

    What should I do if my bricklayer Swap becomes popular? How can I increase the amount of Swap when it is full?

    All copyrights belong to 888u unless special state
    取消
    微信二维码
    微信二维码
    支付宝二维码