louking / rrwebapp

Race Results Web Application
0 stars 1 forks source link

is there any way to limit apache memory usage #278

Open louking opened 7 years ago

louking commented 7 years ago

Several hours after running results analysis for FSRC, apache still was holding a lot of memory. Short of restarting apache (and celery, btw) is there any way to control this?

Maybe some ideas at

top - 16:48:39 up 21:32,  2 users,  load average: 0.13, 0.10, 0.06
Tasks: 132 total,   3 running, 129 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.8 us,  0.3 sy,  0.0 ni, 97.7 id,  0.0 wa,  0.0 hi,  0.0 si,  1.2 st
KiB Mem :  2048988 total,   174588 free,  1753104 used,   121296 buff/cache
KiB Swap:  1048572 total,   287004 free,   761568 used.   167376 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
15791 scoreti+  20   0 1666980 864156    996 S   0.0 42.2  36:35.82 httpd
15940 scoreti+  20   0  772756 438160      4 S   0.0 21.4  18:12.58 celery
 1629 mysql     20   0 1648180 133408   1540 S   0.0  6.5   7:22.92 mysqld
15792 scoreti+  20   0  946232  91784   1800 S   0.0  4.5   1:49.59 httpd
 3116 rabbitmq  20   0 2857324  74344   1716 S   2.7  3.6  32:03.92 beam.smp
15893 scoreti+  20   0  292224  21764   1316 S   0.0  1.1   1:07.28 celery
louking commented 7 years ago

see 3f97e6c00519dda6fd8a2c6c20a03bd88a6fc7b1, which helps

top - 06:54:46 up 16:19,  2 users,  load average: 0.03, 0.09, 0.08
Tasks: 130 total,   1 running, 129 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.5 us,  0.3 sy,  0.0 ni, 99.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.2 st
KiB Mem :  2048988 total,   949656 free,   760748 used,   338584 buff/cache
KiB Swap:  1048572 total,   614480 free,   434092 used.  1120868 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
16867 scoreti+  20   0 1269792 448044   5424 S   0.0 21.9   0:24.81 httpd
 1570 mysql     20   0 1645844 121460   3288 S   0.0  5.9   1:39.37 mysqld