postgresql.service
内容是
# systemd service for managing all PostgreSQL clusters on the system. This
# service is actually a systemd target, but we are using a service since
# targets cannot be reloaded.
[Unit]
Description=PostgreSQL RDBMS
[Service]
Type=oneshot
ExecStart=/bin/true
ExecReload=/bin/true
RemainAfterExit=on
[Install]
WantedBy=multi-user.target
Run Code Online (Sandbox Code Playgroud)
我尝试通过以下方式启动 PostrgeSQLservice postgresql start
并且对postgresql.service
内容感到惊讶 ,因为它开始/bin/true
uname -a
输出:
Linux debian 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2+deb8u3 (2016-07-02) x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)
所以我的问题是:为什么会发生,以及如何解决?
我提供了 VPS 并且使用 virgin Debian 它经常挂起:简单的 ssh 命令响应时间太长。这是坏的 :(
我为它做了基准测试:每 2 分钟它就会启动 ffmpeg 来转换 30 秒的低质量视频。通常需要 3 秒,但挂起时间约为 20 秒。
此外,我每 2 分钟 ping VPS。图是一样的。
良好表现间隔的持续时间约为 15 分钟,不良表现间隔持续时间约为 25 分钟
您可以使用数据https://docs.google.com/spreadsheets/d/1XYQV-5mompcFidOHL7XzbvvrVnjn_ZHnvBaND6RrrVY/edit?usp=sharing
同样的情况,但不要批评
似乎,托管在同一台专用服务器上的 neigbour VPS 会定期启动高 CPU 负载任务。也许是系统备份或相同的任务。据我所知,内存是有保证的,但不是 CPU。
我也有另一个来自该主机的 VPS,看起来还可以(它也有相同的峰值,但要少得多)
专用服务器对这个项目来说太贵了。
这是主机独立的情况,改变提供是个坏主意