从过去的2天开始,我的VPS一直处于高负荷状态,我不知道问题出在哪里。这里有更多关于vps的信息。VPS的作用是HTTP(Apache)、Mysql、服务器,流量不多,每天大约有300-500次访问。
Linux cforum 2.6.32-431.29.2.el6.x86_64 #1 SMP Tue Sep 9 21:36:05 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux 07:07:15 up 5 days, 4:05, 1 user, load average: 31.88, 44.97, 58.48top - 07:08:00 up 5 days, 4:06, 1 user, load average: 34.33, 43.79, 57.44
Tasks: 324 total, 1 running, 323 sleeping, 0 stopped, 0 zombie
Cpu(s): 2.4%us, 3.1%sy, 0.0%ni, 58.5%id, 35.8%wa, 0.0%hi, 0.0%si, 0.1%st
Mem: 1016280k total, 1006536k used, 9744k free, 536k buffers
Swap: 2097148k total, 1539640k used, 557508k free, 409436k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
5591 root 20 0 15156 1372 884 R 0.8 0.1 0:00.01 top
1 root 20 0 19232 160 20 S 0.0 0.0 0:00.44 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
4 root 20 0 0 0 0 S 0.0 0.0 0:02.53 ksoftirqd/0
5 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
6 root RT 0 0 0 0 S 0.0 0.0 0:57.89 watchdog/0
7 root 20 0 0 0 0 S 0.0 0.0 0:33.08 events/0
8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cgroup
9 root 20 0 0 0 0 S 0.0 0.0 0:00.00 khelper
10 root 20 0 0 0 0 S 0.0 0.0 0:00.00 netns
11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 async/mgr
12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pm
13 root 20 0 0 0 0 S 0.0 0.0 0:00.00 xenwatch
14 root 20 0 0 0 0 S 0.0 0.0 0:00.00 xenbus
15 root 20 0 0 0 0 S 0.0 0.0 0:02.15 sync_supers
16 root 20 0 0 0 0 S 0.0 0.0 0:02.32 bdi-default
17 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/0Linux 2.6.32-431.29.2.el6.x86_64 (cforum) 10/02/2014 _x86_64_ (1 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
2.44 0.00 3.10 35.90 0.08 58.48
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
xvda 104.86 1182.53 4376.56 526606250 1948973680
xvdd 0.00 0.00 0.00 456 0无
total used free shared buffers cached
Mem: 992 984 8 0 1 173
-/+ buffers/cache: 809 183
Swap: 2047 1431 616Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 30G 7.1G 21G 26% /
tmpfs 497M 0 497M 0% /dev/shmprocs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 99 1467144 8076 2096 157136 32 32 594 2187 85 14 2 3 58 36 0发布于 2014-10-02 04:43:41
立即跳出来的是,您的系统正在进行相当大的交换--这可以很容易地解释高负载的原因--尤其是廉价的VPS(在我看来,这可能是基于内存规格的VPS)--常常受到IO的阻碍。
我要做的第一件事是只有你提供的信息 --在这个问题上抛出更多的内存。如果这不是一个选项,你可能可以使用VM.SWAPPINESS使问题“不那么严重”-但随着你的交换更大,那么你的可用内存,我怀疑你会从中得到很多。
也许您可以调优MySQL以使用很多更少的内存--我为您搜索了这。
发布于 2014-10-02 08:10:43
这在VPS上是很典型的。
您可以联系您的VPS提供程序并请求迁移到另一台服务器。如果他们有点体面,他们会这样做,没有任何问题。我曾经在这方面取得过成功:)
https://serverfault.com/questions/632951
复制相似问题