阿里云虚拟主机内存占用大问题解决 您所在的位置:网站首页 32132大写 阿里云虚拟主机内存占用大问题解决

阿里云虚拟主机内存占用大问题解决

2023-09-07 17:27| 来源: 网络整理| 查看: 265

今年买了一台2核4G的主机,把4核8G的降配下来。

结果:机器没有启动任务程序,就占用2.5G内存。  

total used free shared buff/cache available Mem: 3.7G 2.5G 1.0G 64M 159M 972M Swap: 0B 0B 0B

阿里工程师回复:

1、top,然后按大写的M对占用内存的进程进行排序

2、free -m

top:

Tasks: 97 total, 1 running, 96 sleeping, 0 stopped, 0 zombie %Cpu(s): 1.0 us, 0.5 sy, 0.0 ni, 98.5 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st KiB Mem : 3881688 total, 929616 free, 2645168 used, 306904 buff/cache KiB Swap: 0 total, 0 free, 0 used. 922736 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 889 root 20 0 474660 32132 72 S 0.0 0.8 0:11.79 dockerd 453 root 20 0 341060 27364 716 S 0.0 0.7 0:00.91 firewalld 1288 root 10 -10 144920 20652 3620 S 3.3 0.5 20:44.46 AliYunDun 944 root 20 0 343864 15812 176 S 0.0 0.4 0:05.04 containerd 885 root 20 0 562884 12900 80 S 0.0 0.3 0:04.87 tuned 812 root 20 0 113568 12492 0 S 0.0 0.3 0:00.00 dhclient 894 root 20 0 806092 9336 3784 S 0.0 0.2 0:37.64 aliyun-service 395 polkitd 20 0 535040 8392 1264 S 0.0 0.2 0:00.24 polkitd 405 root 20 0 295512 5968 4012 S 0.0 0.2 0:10.61 rsyslogd 27180 root 20 0 148688 5740 4428 S 0.0 0.1 0:00.10 sshd 336 root 20 0 37284 5400 4924 S 0.0 0.1 0:17.93 systemd-journal 1252 root 20 0 214292 3972 16 S 0.0 0.1 0:01.35 php-fpm 1266 www 20 0 214292 3968 8 S 0.0 0.1 0:00.00 php-fpm 1267 www 20 0 214292 3968 8 S 0.0 0.1 0:00.00 php-fpm 1261 www 20 0 214292 3964 8 S 0.0 0.1 0:00.00 php-fpm 1262 www 20 0 214292 3964 8 S 0.0 0.1 0:00.00 php-fpm 1263 www 20 0 214292 3964 8 S 0.0 0.1 0:00.00 php-fpm

free -m

[root@izwz9947gr37kg75oe64tkz ~]# free -m total used free shared buff/cache available Mem: 3790 2584 906 72 299 899 Swap: 0 0 0

卸载宝塔后: [root@izwz9947gr37kg75oe64tkz ~]# top top - 13:28:49 up 13:38, 4 users, load average: 0.07, 0.09, 0.07 Tasks: 89 total, 2 running, 87 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.3 us, 0.3 sy, 0.0 ni, 99.0 id, 0.0 wa, 0.0 hi, 0.3 si, 0.0 st KiB Mem : 3881688 total, 801700 free, 2637216 used, 442772 buff/cache KiB Swap: 0 total, 0 free, 0 used. 928240 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 889 root 20 0 474660 32132 72 S 0.0 0.8 0:11.86 dockerd 453 root 20 0 341060 27364 716 S 0.0 0.7 0:00.91 firewalld 1288 root 10 -10 144920 21148 4116 S 1.9 0.5 20:55.11 AliYunDun 944 root 20 0 343864 15812 176 S 0.0 0.4 0:05.07 containerd 885 root 20 0 562884 12900 80 S 0.0 0.3 0:04.90 tuned 812 root 20 0 113568 12492 0 S 0.0 0.3 0:00.00 dhclient 894 root 20 0 806092 9364 3808 S 0.0 0.2 0:37.87 aliyun-service 395 polkitd 20 0 535040 8580 1452 S 0.0 0.2 0:00.25 polkitd 405 root 20 0 295512 6484 4520 S 0.0 0.2 0:10.73 rsyslogd 336 root 20 0 37284 5992 5516 S 0.0 0.2 0:18.13 systemd-journal 27180 root 20 0 148688 5740 4428 S 0.0 0.1 0:00.12 sshd 27667 root 20 0 148688 5740 4428 S 0.0 0.1 0:00.06 sshd 27710 root 20 0 145788 4928 3696 S 0.0 0.1 0:00.00 sshd 27712 root 20 0 145788 4788 3556 S 0.0 0.1 0:00.00 sshd 1 root 20 0 191064 3104 1584 S 0.0 0.1 0:03.12 systemd 27711 sshd 20 0 106200 2444 1428 S 0.0 0.1 0:00.00 sshd

差不了多少:

total used free shared buff/cache available Mem: 3790 2576 780 72 433 905 Swap: 0 0 0

查占用内存详情,前10:

[root@izwz9947gr37kg75oe64tkz ~]# ps aux|head -1; ps aux | sort -k4nr | head -10 USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 889 0.0 0.8 474660 32132 ? Ssl Nov06 0:11 /usr/bin/dockerd -H fd:// root 453 0.0 0.7 341060 27364 ? Ssl Nov06 0:00 /usr/bin/python2 -Es /usr/sbin/firewalld --nofork --nopid root 1288 2.5 0.5 144920 21148 ? S


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有