feego 发表于 2014-5-9 10:26:29

请问军哥内存占用问题

下面是服务器信息:

http://v1.freep.cn/3tb_140509101931bm77512293.png

ps后发现很多php-cgi进程:PID   RSZ COMMAND
    1   372 init
    2   0 kthreadd
    3   0 ksoftirqd/0
    5   0 kworker/0:0H
    7   0 rcu_sched
    8   0 rcu_bh
    9   0 migration/0
   10   0 migration/1
   11   0 ksoftirqd/1
   13   0 kworker/1:0H
   14   0 khelper
   15   0 kdevtmpfs
   16   0 netns
   20   0 xenwatch
   21   0 xenbus
207   0 writeback
209   0 bioset
211   0 kblockd
227   0 md
312   0 rpciod
388   0 kswapd0
428 46980 php-cgi
454 47992 php-cgi
455   0 fsnotify_mark
458 47300 php-cgi
483   0 ecryptfs-kthrea
485   0 nfsiod
493   0 cifsiod
506   0 jfsIO
507   0 jfsCommit
508   0 jfsCommit
509   0 jfsSync
518   0 xfsalloc
519   0 xfs_mru_cache
520   0 xfslogd
521   0 glock_workqueue
522   0 delete_workqueu
528   0 gfs_recovery
533   0 crypto
1105   0 khvcd
1197   0 bioset
1198   0 drbd-reissue
1213   0 kpsmoused
1215   0 raid5wq
1218   0 dm_bufio_cache
1242   0 ipv6_addrconf
1267   0 bioset
1288   0 deferwq
1291   0 kworker/0:1H
1292   0 kjournald
1317   0 kauditd
1364    68 udevd
1717    72 udevd
1727   0 kworker/1:0
1964   364 dhclient
2007   136 auditd
2022   880 rsyslogd
2049   0 dbus-daemon
2111   184 sshd
2161   0 kworker/0:1
2213    80 abrtd
2244   104 abrt-dump-oops
2278   164 pure-ftpd
2292   356 crond
2307 60696 memcached
2340   0 atd
2359    60 mingetty
2366    60 mingetty
2368    60 mingetty
2370    36 udevd
2371    60 mingetty
2375    60 mingetty
2377    60 mingetty
2380    60 mingetty
3783 50048 php-cgi
3810 46444 php-cgi
4245 55496 php-cgi
4810   0 kworker/1:1H
5638 49564 php-cgi
5655 61468 php-cgi
7691 48704 php-cgi
7698 43336 php-cgi
7709 45532 php-cgi
7730 53100 php-cgi
9525 45328 php-cgi
10936 46856 php-cgi
11178 43144 php-cgi
11187 43124 php-cgi
11196 47584 php-cgi
11232 45752 php-cgi
117861692 php-cgi
12498 47428 php-cgi
12503 44008 php-cgi
12542 50032 php-cgi
13578 46228 php-cgi
13664 45628 php-cgi
13671 44284 php-cgi
13680 47852 php-cgi
145851780 sshd
146161184 bash
14792 46712 php-cgi
14801 46188 php-cgi
14810 41524 php-cgi
14824 45104 php-cgi
14833 48376 php-cgi
16168 44732 php-cgi
16177 45392 php-cgi
16181 44544 php-cgi
16192 45464 php-cgi
17814   972 mysqld_safe
17938 50980 mysqld
18429 48960 php-cgi
18440 50428 php-cgi
19086 45112 php-cgi
194691528 pure-ftpd
19470   340 pure-ftpd
20046 59316 php-cgi
20072 48284 php-cgi
20079 41208 php-cgi
20088 42244 php-cgi
20093 44876 php-cgi
201683676 sshd
202051696 bash
20361   880 nginx
20362 26800 nginx
20443 40988 php-cgi
20671 42892 php-cgi
20959   0 kworker/u4:0
21095 51892 php-cgi
21218   0 kworker/u4:2
21735 40868 php-cgi
21742 40540 php-cgi
21749 39392 php-cgi
21756 40480 php-cgi
22230 51804 php-cgi
24006 41212 php-cgi
24026 43872 php-cgi
24035 42000 php-cgi
24050 41564 php-cgi
24067 42672 php-cgi
24086 38240 php-cgi
24151   0 kworker/1:1
25201   856 ps
27439 51556 php-cgi
29068 44672 php-cgi
29113 53316 php-cgi
29522   0 kworker/0:0
31052 51772 php-cgi

下面是php-fpm的信息,改来改去都不理想,请问军哥最好应该怎么设置,不胜感激

      <value name="max_children">60</value>
      Settings group for 'apache-like' pm style   
      <value name="apache_like">
          Sets the number of server processes created on startup.   
          Used only when 'apache-like' pm_style is selected   
          <value name="StartServers">20</value>
          Sets the desired minimum number of idle server processes.   
          Used only when 'apache-like' pm_style is selected   
          <value name="MinSpareServers">20</value>
          Sets the desired maximum number of idle server processes.   
          Used only when 'apache-like' pm_style is selected   
          <value name="MaxSpareServers">100</value>
      </value>
      </value>

licess 发表于 2014-5-9 20:29:28

最大值可以按内存/2/20 的整数来算,最小值可以按内存/2/40 的整数来算

feego 发表于 2014-5-13 11:08:45

谢谢军哥,设为50后降下来一些
页: [1]
查看完整版本: 请问军哥内存占用问题