php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10745 swap problems
Submitted: 2001-05-09 05:13 UTC Modified: 2001-06-04 04:51 UTC
From: danilo dot dasta at ltsnet dot it Assigned:
Status: Closed Package: Performance problem
PHP Version: 4.0.4pl1 OS: HP-UX B.11.00
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: danilo dot dasta at ltsnet dot it
New email:
PHP Version: OS:

 

 [2001-05-09 05:13 UTC] danilo dot dasta at ltsnet dot it
we are using php Version 4.0.4pl1 with a zeus Web server version 3.3.6. php is running as cgi.
I have tested my server  with a web stress software for simulate a large number of simultaneous connections.
The server use all swap space and it falls down.
how can i limit the number of process php?


top before stress


Load averages: 0.11, 0.22, 0.25
212 processes: 201 sleeping, 11 running
Cpu states:
CPU   LOAD   USER   NICE    SYS   IDLE  BLOCK  SWAIT   INTR   SSYS
 0    0.12   3.4%   0.0%   4.8%  91.8%   0.0%   0.0%   0.0%   0.0%
 1    0.11   2.2%   0.0%   7.6%  90.2%   0.0%   0.0%   0.0%   0.0%
---   ----  -----  -----  -----  -----  -----  -----  -----  -----
avg   0.11   2.8%   0.0%   6.2%  91.0%   0.0%   0.0%   0.0%   0.0%

Memory: 418184K (37232K) real, 406076K (45128K) virtual, 692408K free  Page# 1/6

CPU TTY     PID USERNAME PRI NI   SIZE    RES STATE    TIME %WCPU  %CPU COMMAND
 0   ?       32 root     152 20     0K     0K run    175:28  2.26  2.26 vxfsd
 1   ?     1044 root     -16 20  5228K  4644K run    160:34  0.43  0.43 midaemon
 1   ?     1097 root     152 20   984K  1004K run    107:47  0.31  0.31 opcmona
 0 pts/td 27620 root     178 20  1396K   560K run      0:00  0.34  0.30 top
 0   ?      328 root     154 20    32K    96K sleep   74:45  0.24  0.24 syncer
 0   ?     4145 root     168 20  4396K  3860K sleep   66:41  0.18  0.18 GestioneSer
 0   ?     1093 root     152 20  1616K  3132K run      0:42  0.18  0.18 opcctla
 1   ?    14775 root     154 18  8396K  7900K sleep    0:08  0.13  0.13 NewCustomer
 0   ?        3 root     128 20     0K     0K sleep   31:56  0.12  0.12 statdaemon
 1   ?     1094 root     152 20  1944K  2148K run      3:00  0.12  0.12 opcmsga
 0   ?     2091 root     158 10    80K   208K sleep    5:38  0.06  0.06 cclogd
 0   ?    17124 root     152 20   776K   636K run      0:00  0.06  0.06 slurpd
 1   ?    17120 root     154 20  4292K  3752K sleep    7:08  0.05  0.05 slapd
 0   ?     1553 root     154 20  4884K  2008K sleep   20:35  0.05  0.05 alarmgen
 0   ?      419 root     127 20   120K   408K sleep    4:18  0.05  0.05 netfmt
 1   ?     1504 root     154 20  5700K  2788K sleep   18:52  0.05  0.05 rep_server
 0   ?     2094 root     154 10   752K   844K sleep   11:41  0.05  0.05 psmctd
 1   ?     1095 root     152 20   468K   844K run      2:09  0.04  0.04 opcacta
 1   ?     1096 root     152 20   468K   900K run     12:42  0.04  0.04 opcle
 1   ?     8264 root     152 20 36056K 33840K run     31:57  0.04  0.04 mysqld
 1   ?     1551 root     154 20  4896K  2320K sleep   14:17  0.03  0.03 agdbserver
 1 pts/td 27057 root     158 20   552K   200K sleep    0:00  0.03  0.03 sh
 1   ?        1 root     168 20   400K   188K sleep   15:07  0.02  0.02 init
 0   ?       22 root     147 20     0K     0K sleep    0:55  0.02  0.02 lvmkd
 1   ?        0 root     128 20     0K     0K sleep    0:20  0.02  0.02 swapper
 1   ?        2 root     128 20     0K     0K sleep   10:42  0.02  0.02 vhand
 1   ?        4 root     128 20     0K     0K sleep    0:57  0.02  0.02 unhashdaemo
 1   ?       18 root     147 20     0K     0K sleep    0:56  0.02  0.02 lvmkd
 0   ?       19 root     147 20     0K     0K sleep    0:55  0.02  0.02 lvmkd
 0   ?       20 root     147 20     0K     0K sleep    0:55  0.02  0.02 lvmkd
 0   ?       21 root     147 20     0K     0K sleep    0:55  0.02  0.02 lvmkd
 0   ?       23 root     147 20     0K     0K sleep    0:54  0.02  0.02 lvmkd
 0   ?       24 root     100 20     0K     0K sleep    0:00  0.02  0.02 smpsched
 1   ?       25 root     100 20     0K     0K sleep    0:00  0.02  0.02 smpsched
 0   ?      128 root     154 21  2800K  1460K sleep    0:00  0.02  0.02 php
 0   ?      369 root     154 21  2784K  1444K sleep    0:00  0.02  0.02 php
 0   ?      392 root     154 20    84K   184K sleep    1:50  0.02  0.02 syslogd
 0 




swapinfo -t before stress


             Kb      Kb      Kb   PCT  START/      Kb
TYPE      AVAIL    USED    FREE  USED   LIMIT RESERVE  PRI  NAME
dev     1048576       0 1048576    0%       0       -    1  /dev/vg00/lvol2
reserve       -  620356 -620356
total   1048576  620356  428220   59%       -       0    -




top after stress

Load averages: 6.15, 1.51, 0.69
268 processes: 230 sleeping, 38 running
Cpu states:
CPU   LOAD   USER   NICE    SYS   IDLE  BLOCK  SWAIT   INTR   SSYS
 0    5.86   7.4%  61.8%  30.8%   0.0%   0.0%   0.0%   0.0%   0.0%
 1    6.45   9.5%  61.8%  28.6%   0.0%   0.0%   0.0%   0.0%   0.0%
---   ----  -----  -----  -----  -----  -----  -----  -----  -----
avg   6.15   8.5%  61.8%  29.6%   0.0%   0.0%   0.0%   0.0%   0.0%

Memory: 548684K (193820K) real, 525816K (191152K) virtual, 564052K free  Page# 1/8

CPU TTY  PID USERNAME PRI NI   SIZE    RES STATE    TIME %WCPU  %CPU COMMAND
 0   ? 17148 root     181 18  3660K  2456K run      0:09  4.57  4.56 zeus.web
 1   ? 17149 root     181 18  2988K  2008K run      0:06  4.18  4.18 zeus.web
 0   ?    32 root     152 20     0K     0K run    175:31  1.80  1.79 vxfsd
 1   ?  1044 root     -16 20  5228K  4644K run    160:35  1.26  1.26 midaemon
 1   ? 29991 root     183 21  2960K     0K run      0:00  6.08  0.58 php
 0   ? 29992 root     183 21  3024K     0K run      0:00  5.60  0.53 php
 0   ? 29994 root     183 21  3104K     0K run      0:00  5.60  0.53 php
 1   ? 29993 root     183 21  3024K     0K run      0:00  5.09  0.48 php
 0   ? 29978 root     183 21  3024K     0K run      0:00  5.03  0.48 php
 1   ? 22197 root     127 20  3496K  3564K sleep    4:06  0.46  0.46 scopeux
 0   ? 29996 root     182 21  3088K     0K run      0:00  9.01  0.44 php
 1   ? 29997 root     182 21  2976K     0K run      0:00  9.01  0.44 php
 0   ? 29995 root     182 21  3088K     0K run      0:00  4.60  0.44 php
 1   ? 29979 root     154 21  2800K     0K sleep    0:00  4.52  0.43 php
 0   ? 29983 root     154 21  2800K     0K sleep    0:00  4.52  0.43 php
 1   ? 29975 root     154 21  2800K     0K sleep    0:00  4.49  0.43 php
 1   ? 29977 root     154 21  2800K     0K sleep    0:00  4.49  0.43 php
 0   ? 29980 root     154 21  2800K     0K sleep    0:00  4.49  0.43 php
 1   ? 29973 root     154 21  2800K     0K sleep    0:00  3.04  0.42 php
 1   ? 29970 root     154 21  2800K     0K sleep    0:00  3.01  0.42 php
 1   ? 29971 root     154 21  2800K     0K sleep    0:00  3.01  0.42 php
 0   ? 29976 root     154 21  2800K     0K sleep    0:00  4.39  0.42 php
 1   ? 29968 root     154 21  2800K     0K sleep    0:00  2.99  0.42 php
 1   ? 29966 root     154 21  2800K     0K sleep    0:00  2.94  0.41 php
 0   ? 29967 root     154 21  2800K     0K sleep    0:00  2.94  0.41 php
 1   ? 29961 root     154 21  2800K     0K sleep    0:00  2.92  0.41 php
 0   ? 29962 root     154 21  2800K     0K sleep    0:00  2.92  0.41 php
 1   ? 29913 root     154 21  2800K  1152K sleep    0:00  1.36  0.40 php
 0   ? 29956 root     154 21  2800K     0K sleep    0:00  2.87  0.40 php
 1   ? 29957 root     154 21  2800K     0K sleep    0:00  2.87  0.40 php
 1   ? 29959 root     154 21  2800K     0K sleep    0:00  2.87  0.40 php
 0   ? 29944 root     154 21  2800K     0K sleep    0:00  2.18  0.39 php
 1   ? 29943 root     154 21  2800K  2008K sleep    0:00  1.77  0.39 php
 1   ? 29912 root     154 21  2800K  1184K sleep    0:00  1.18  0.39 php
 1   ? 29942 root     154 21  2800K   456K sleep    0:00  1.75  0.39 php
 1   ? 29941 root     154 21  2800K   556K sleep    0:00  1.74  0.38 php
 0   ? 29939 root     154 21  2800K   700K sleep    0:00  1.72  0.38 php




swapinfo -t after stress

             Kb      Kb      Kb   PCT  START/      Kb
TYPE      AVAIL    USED    FREE  USED   LIMIT RESERVE  PRI  NAME
dev     1048576       0 1048576    0%       0       -    1  64,0x000002
reserve       - 1048548 -1048548
total   1048576 1048548      28  100%       -       0    -





Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-04 04:51 UTC] sniper@php.net
This is not PHP's problem. Check your web server's configuration.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 28 09:01:28 2024 UTC