Small memory VPS runs sharp optimization solution

888u

Last update at :2024-05-15,Edit by888u

Due to Linux's own OOM mechanism, small memory VPS (such as virmach, rectified's 128 RAM) will cause the process to be killed or directly crash when running software such as Ruisu.

To ensure the normal operation of the service, first we can disable the OOM mechanism:

# sysctl -w vm.panic_on_oom=1 (default is 0, indicating on) #sysctl-p

Reference: http://blog.csdn.net/lidan3959/article/details/17350711

Of course, if the hosting provider has strict restrictions, just doing this may cause the entire VPS to crash due to excessive load. The key lies in insufficient memory. Use the Linux cache clearing command:

# echo 3 > /proc/sys/vm/drop_caches (clean up pagecache, dentries and inodes)

At the same time, you can add this command to the Linux Crontab scheduled task:

#crontab -e (enter scheduled task settings)

Write a scheduled task in the editor, the command is as follows:

* * * * * echo 3 > /proc/sys/vm/drop_caches

The recommended setting here is to execute once every minute. If you need to adjust the execution time, please refer to: http://www.jb51.net/LINUXjishu/19905.html

Such optimization can generally ensure that VPS with small memory of 128M and above can run Ruisu stably. Of course, it also depends on the specific overbooking degree of the host provider. VPS with less than 128M memory should not be able to do it. After all, Ruisu does occupy memory.

Recommended site searches: domain name registration network, rental server, foreign server vps, registration password retrieval, US server website, Hong Kong server defense, asp host, domain name registration number query, server high defense Hong Kong, US free host,

p>

Small memory VPS runs sharp optimization solution

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