I have mod_fastcgi & mod_php5 installed, I'm pretty sure apache is using mod_php5 by default, even though fastcgi is enabled. I'm not exactly sure how to switch to mod_fastcgi, I'm working on figuring that out. I don't really want to do it until I'm 100% sure I know what I'm doing - don't want risk server downtime.
So my question is - is there anything else I can do, besides switching to fastcgi, to lower my cpu load?
Big THANKS in advance....
This is my startup command:
/usr/sbin/apache2 -D DEFAULT_VHOST -D PHP5 -D SSL -D SSL_DEFAULT_VHOST -D FASTCGI -d /usr/lib/apache2 -f /etc/apache2/httpd.conf -k start
Code: Select all
#uptime
03:10:04 up 13 days, 3:03, 2 users, load average: 26.17, 26.29, 27.58Code: Select all
#top -b -n 1
top - 03:12:03 up 13 days, 3:04, 2 users, load average: 25.65, 26.03, 27.33
Tasks: 194 total, 11 running, 182 sleeping, 0 stopped, 1 zombie
Cpu(s): 24.3% us, 2.5% sy, 0.0% ni, 71.6% id, 1.2% wa, 0.0% hi, 0.3% si
Mem: 2066152k total, 1621612k used, 444540k free, 111564k buffers
Swap: 2007992k total, 26616k used, 1981376k free, 774520k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
15595 apache 16 0 17836 8584 2908 S 46 0.4 4:43.64 apache2
14130 apache 16 0 24712 15m 3360 R 43 0.8 5:05.94 apache2
14013 apache 16 0 17868 9068 3368 S 12 0.4 5:09.22 apache2
14138 apache 17 0 17912 9144 3400 S 12 0.4 4:55.05 apache2
13985 apache 16 0 17940 9112 3352 S 10 0.4 5:08.40 apache2
14092 apache 16 0 17788 8524 2896 S 10 0.4 3:24.31 apache2
20964 apache 21 0 3020 1268 432 R 10 0.1 0:00.05 latex
14095 apache 15 0 17828 8576 2908 S 8 0.4 4:58.52 apache2
15012 apache 15 0 17832 8584 2908 S 8 0.4 5:00.86 apache2
20965 apache 22 0 12084 3992 3008 R 8 0.2 0:00.04 gs
15573 apache 15 0 17872 9060 3364 S 6 0.4 4:51.49 apache2
20958 apache 22 0 11792 2584 1864 R 6 0.1 0:00.03 gs
24283 mysql 15 0 296m 127m 4848 S 4 6.3 537:56.49 mysqld
20959 apache 20 0 2124 856 404 R 4 0.0 0:00.02 dvips
18665 memcache 15 0 132m 129m 372 S 2 6.4 152:20.58 memcached
20956 apache 20 0 6492 1844 1240 R 2 0.1 0:00.03 convert
20970 root 15 0 2224 1068 740 R 2 0.1 0:00.02 top
20972 apache 19 0 2520 1224 404 R 2 0.1 0:00.01 dvips
1 root 16 0 1460 512 448 S 0 0.0 0:03.83 init
2 root RT 0 0 0 0 S 0 0.0 0:01.46 migration/0
3 root 34 19 0 0 0 S 0 0.0 0:03.92 ksoftirqd/0
4 root RT 0 0 0 0 S 0 0.0 0:00.00 watchdog/0
5 root RT 0 0 0 0 S 0 0.0 0:01.88 migration/1
6 root 34 19 0 0 0 S 0 0.0 0:03.56 ksoftirqd/1
7 root RT 0 0 0 0 S 0 0.0 0:00.00 watchdog/1
8 root 10 -5 0 0 0 S 0 0.0 0:00.00 events/0
9 root 10 -5 0 0 0 S 0 0.0 0:00.00 events/1
10 root 10 -5 0 0 0 S 0 0.0 0:01.12 khelper
11 root 10 -5 0 0 0 S 0 0.0 0:00.00 kthread
14 root 10 -5 0 0 0 S 0 0.0 0:00.00 kblockd/0
15 root 10 -5 0 0 0 S 0 0.0 0:00.00 kblockd/1
16 root 10 -5 0 0 0 S 0 0.0 0:00.00 kacpid
134 root 15 0 0 0 0 S 0 0.0 2:16.89 pdflush
135 root 15 0 0 0 0 S 0 0.0 0:52.17 pdflush
136 root 15 0 0 0 0 S 0 0.0 2:20.16 kswapd0
137 root 11 -5 0 0 0 S 0 0.0 0:00.00 aio/0
138 root 11 -5 0 0 0 S 0 0.0 0:00.00 aio/1
139 root 11 -5 0 0 0 S 0 0.0 0:00.00 xfslogd/0
140 root 11 -5 0 0 0 S 0 0.0 0:00.00 xfslogd/1
141 root 10 -5 0 0 0 S 0 0.0 0:00.00 xfsdatad/0
142 root 11 -5 0 0 0 S 0 0.0 0:00.00 xfsdatad/1
225 root 10 -5 0 0 0 S 0 0.0 0:00.00 kseriod
247 root 10 -5 0 0 0 S 0 0.0 0:00.00 kpsmoused
310 root 10 -5 0 0 0 S 0 0.0 0:00.00 ata/0
311 root 10 -5 0 0 0 S 0 0.0 0:00.00 ata/1
313 root 11 -5 0 0 0 S 0 0.0 0:00.00 scsi_eh_0
314 root 10 -5 0 0 0 S 0 0.0 0:00.00 scsi_eh_1
332 root 15 0 0 0 0 S 0 0.0 0:00.12 kirqd
338 root 10 -5 0 0 0 S 0 0.0 16:42.04 md3_raid1
342 root 10 -5 0 0 0 S 0 0.0 0:00.69 md2_raid1
346 root 10 -5 0 0 0 S 0 0.0 0:00.02 md1_raid1
347 root 10 -5 0 0 0 S 0 0.0 0:19.39 reiserfs/0
348 root 10 -5 0 0 0 S 0 0.0 0:04.43 reiserfs/1
548 root 15 -4 1680 448 336 S 0 0.0 0:00.69 udevd
6095 root 10 -5 0 0 0 S 0 0.0 0:00.00 khubd
10509 root 15 0 1792 764 468 S 0 0.0 0:03.64 syslog-ng
11031 root 16 0 3344 808 648 S 0 0.0 0:00.19 sshd
11062 root 16 0 17296 8924 3856 S 0 0.4 0:15.53 apache2
11106 root 16 0 10196 6372 1592 S 0 0.3 22:42.07 denyhosts
11172 root 16 0 1648 608 348 S 0 0.0 0:05.59 mdadm
11364 root 16 0 3572 3572 2592 S 0 0.2 0:03.17 ntpd
11642 root 15 0 5760 1656 1240 S 0 0.1 0:05.08 master
11683 root 16 0 1704 640 536 S 0 0.0 0:00.08 cron
11703 root 17 0 1496 612 528 S 0 0.0 0:00.00 agetty
11704 root 17 0 1492 608 528 S 0 0.0 0:00.00 agetty
11705 root 17 0 1492 612 528 S 0 0.0 0:00.00 agetty
11706 root 16 0 1492 612 528 S 0 0.0 0:00.00 agetty
11707 root 16 0 1492 612 528 S 0 0.0 0:00.00 agetty
11744 postgrey 18 0 9064 4576 1912 S 0 0.2 0:00.01 postgrey
22297 apache 25 0 69660 33m 11m S 0 1.7 1:14.71 apache2
22590 apache 25 0 69104 33m 11m S 0 1.7 1:26.30 apache2
17335 root 16 0 2176 1012 800 S 0 0.0 0:00.00 login
17510 root 16 0 2564 1532 1212 S 0 0.1 0:00.01 bash
8349 apache 25 0 61556 26m 10m S 0 1.3 1:47.59 apache2
23195 root 15 0 6332 2068 1644 S 0 0.1 0:02.00 sshd
23200 root 15 0 2568 1592 1268 S 0 0.1 0:00.49 bash
13892 apache 18 0 16660 6356 1536 S 0 0.3 0:00.00 apache2
13893 apache 16 0 16660 6248 1428 S 0 0.3 0:00.01 apache2
13896 apache 15 0 17888 9260 3560 S 0 0.4 4:29.72 apache2
13897 apache 15 0 17896 8652 2916 S 0 0.4 5:26.23 apache2
13898 apache 15 0 17868 9044 3340 S 0 0.4 4:58.80 apache2
13899 apache 15 0 17816 8588 2928 S 0 0.4 4:16.49 apache2
13901 apache 16 0 17888 9064 3356 S 0 0.4 5:33.78 apache2
13902 apache 16 0 17868 8644 2924 S 0 0.4 5:11.53 apache2
13903 apache 15 0 17872 9220 3520 S 0 0.4 5:25.17 apache2
13905 apache 15 0 17868 9048 3344 S 0 0.4 5:19.28 apache2
13906 apache 15 0 17876 9088 3380 S 0 0.4 5:11.82 apache2
13907 apache 15 0 17884 8632 2916 S 0 0.4 5:19.68 apache2
13911 apache 16 0 17832 9024 3364 S 0 0.4 3:53.11 apache2
13912 apache 15 0 17864 8628 2924 S 0 0.4 5:13.17 apache2
13913 apache 15 0 17856 8600 2908 S 0 0.4 4:51.66 apache2
13914 apache 16 0 17856 9216 3524 S 0 0.4 3:46.43 apache2
13936 apache 15 0 17872 9032 3328 S 0 0.4 5:17.88 apache2
13976 apache 15 0 17868 8908 3200 S 0 0.4 5:16.27 apache2
13992 apache 16 0 17836 8792 3112 S 0 0.4 5:08.09 apache2
13993 apache 15 0 25384 15m 2920 S 0 0.8 4:43.09 apache2
13995 apache 16 0 17852 8588 2888 S 0 0.4 5:00.47 apache2
14003 apache 15 0 17876 9232 3544 S 0 0.4 5:18.38 apache2
14004 apache 15 0 17864 8616 2908 S 0 0.4 5:13.84 apache2
14006 apache 15 0 25312 15m 2920 S 0 0.8 2:52.70 apache2
14007 apache 15 0 17852 8620 2916 S 0 0.4 5:17.94 apache2
14015 apache 15 0 17824 8592 2928 S 0 0.4 5:14.68 apache2
14028 apache 15 0 17892 9048 3336 S 0 0.4 3:47.49 apache2
14041 apache 15 0 17868 9064 3364 S 0 0.4 4:18.88 apache2
14042 apache 16 0 17884 9240 3524 S 0 0.4 5:23.03 apache2
14043 apache 15 0 17868 9060 3364 S 0 0.4 5:10.86 apache2
14057 apache 15 0 17836 8984 3328 S 0 0.4 3:41.98 apache2
14058 apache 16 0 17836 8588 2912 S 0 0.4 5:20.73 apache2
14060 apache 15 0 17848 8616 2924 S 0 0.4 4:46.36 apache2
14078 apache 15 0 17880 9060 3352 S 0 0.4 5:24.25 apache2
14080 apache 15 0 17824 8580 2912 S 0 0.4 3:53.78 apache2
14093 apache 15 0 17804 8568 2928 S 0 0.4 4:11.74 apache2
14100 apache 15 0 17836 8632 2956 S 0 0.4 3:43.50 apache2
14101 apache 16 0 17880 8648 2928 S 0 0.4 5:06.12 apache2
14102 apache 15 0 17908 9088 3360 S 0 0.4 4:36.22 apache2
14104 apache 15 0 25332 15m 2896 S 0 0.8 3:49.32 apache2
14106 apache 15 0 17884 9084 3364 S 0 0.4 5:12.64 apache2
14122 apache 15 0 17912 8772 3012 S 0 0.4 5:15.48 apache2
14124 apache 15 0 17872 8876 3168 S 0 0.4 5:08.41 apache2
14125 apache 15 0 17912 9112 3364 S 0 0.4 4:00.19 apache2
14126 apache 16 0 17876 8636 2920 S 0 0.4 4:57.00 apache2
14127 apache 15 0 17812 8560 2896 S 0 0.4 3:56.58 apache2
14129 apache 15 0 17880 9076 3364 S 0 0.4 5:00.45 apache2
14132 apache 15 0 25320 15m 2896 S 0 0.8 2:55.36 apache2
14133 apache 15 0 17832 8600 2916 S 0 0.4 5:03.14 apache2
14140 apache 15 0 17908 9084 3356 S 0 0.4 5:06.99 apache2
14182 apache 16 0 25108 15m 3348 S 0 0.8 4:22.10 apache2
14187 apache 15 0 17852 9200 3524 S 0 0.4 5:31.93 apache2
14188 apache 15 0 17952 9144 3356 S 0 0.4 5:08.10 apache2
14621 apache 15 0 17804 8548 2900 S 0 0.4 3:32.06 apache2
14622 apache 15 0 17848 9204 3524 S 0 0.4 5:10.34 apache2
14623 apache 15 0 17972 9348 3540 S 0 0.5 4:49.81 apache2
14625 apache 15 0 17892 8656 2912 S 0 0.4 4:47.73 apache2
14627 apache 16 0 17896 9268 3540 S 0 0.4 5:04.98 apache2
14650 apache 16 0 17888 9112 3388 S 0 0.4 4:57.89 apache2
14651 apache 15 0 17880 9072 3364 S 0 0.4 5:29.00 apache2
14652 apache 15 0 17904 9112 3372 S 0 0.4 4:58.04 apache2
14663 apache 15 0 17844 8608 2924 S 0 0.4 3:54.82 apache2
14666 apache 15 0 24864 15m 2928 S 0 0.8 5:05.75 apache2
15013 apache 16 0 17860 8620 2920 S 0 0.4 4:35.89 apache2
15519 apache 16 0 17808 8572 2924 S 0 0.4 4:44.70 apache2
15529 apache 16 0 17928 9156 3396 R 0 0.4 4:27.07 apache2
15530 apache 15 0 17916 9284 3540 S 0 0.4 5:02.97 apache2
15538 apache 16 0 17840 8616 2924 S 0 0.4 4:55.09 apache2
15539 apache 15 0 17856 9192 3508 S 0 0.4 3:19.21 apache2
15540 apache 15 0 17820 8568 2896 S 0 0.4 4:29.65 apache2
15541 apache 16 0 17900 9268 3552 S 0 0.4 4:52.21 apache2
15576 apache 16 0 17828 8572 2908 S 0 0.4 4:54.91 apache2
15577 apache 15 0 17852 9004 3320 S 0 0.4 5:07.31 apache2
15596 apache 15 0 25352 15m 2924 S 0 0.8 3:44.53 apache2
15597 apache 16 0 17832 8604 2920 S 0 0.4 4:51.18 apache2
18008 apache 15 0 17828 8572 2904 S 0 0.4 3:58.01 apache2
18009 apache 15 0 17816 8588 2932 S 0 0.4 3:43.94 apache2
18010 apache 16 0 17820 8568 2916 S 0 0.4 4:16.17 apache2
18011 apache 15 0 17808 8976 3344 S 0 0.4 2:33.23 apache2
18012 apache 16 0 25112 15m 2924 S 0 0.8 3:33.11 apache2
18013 apache 15 0 17828 8580 2916 S 0 0.4 4:16.75 apache2
18029 apache 15 0 17804 8564 2916 S 0 0.4 3:40.32 apache2
20381 apache 15 0 17804 8536 2888 S 0 0.4 3:41.03 apache2
20384 apache 15 0 17832 8612 2928 S 0 0.4 3:29.24 apache2
20406 apache 15 0 17844 8592 2908 S 0 0.4 3:55.52 apache2
20408 apache 15 0 17820 8564 2896 S 0 0.4 3:23.55 apache2
20414 apache 15 0 17868 8624 2908 S 0 0.4 3:52.98 apache2
20415 apache 15 0 17832 8576 2916 S 0 0.4 3:51.12 apache2
20416 apache 15 0 17824 8600 2924 S 0 0.4 3:41.71 apache2
20417 apache 15 0 17808 8576 2920 S 0 0.4 3:49.11 apache2
20421 apache 15 0 17768 8516 2908 S 0 0.4 2:22.90 apache2
20422 apache 15 0 17832 9436 3772 S 0 0.5 3:37.27 apache2
20424 apache 15 0 17844 8604 2916 S 0 0.4 3:36.34 apache2
21090 apache 15 0 17800 8544 2904 S 0 0.4 3:26.71 apache2
21091 apache 15 0 17760 8476 2896 S 0 0.4 2:00.20 apache2
20707 root 18 0 2016 760 604 S 0 0.0 0:00.00 cron
20708 root 21 0 2368 1056 904 S 0 0.1 0:00.00 bash
20719 root 15 0 2368 1120 960 S 0 0.1 0:00.00 run-crons
20775 root 19 0 0 0 0 Z 0 0.0 0:00.00 sendmail <defunct>
20796 root 15 0 2368 1052 904 S 0 0.1 0:00.00 slocate
20797 root 26 10 1920 648 492 R 0 0.0 0:00.00 updatedb
20906 apache 16 0 2264 756 572 S 0 0.0 0:00.00 texvc
20909 apache 16 0 2264 736 560 S 0 0.0 0:00.01 texvc
20910 apache 16 0 2268 740 556 S 0 0.0 0:00.00 texvc
20912 apache 16 0 2268 768 568 S 0 0.0 0:00.00 texvc
20947 apache 18 0 2820 1192 1000 S 0 0.1 0:00.00 sh
20948 apache 20 0 7316 2816 1416 S 0 0.1 0:00.04 convert
20952 apache 18 0 2824 1196 1000 S 0 0.1 0:00.00 sh
20953 apache 19 0 7316 2816 1416 S 0 0.1 0:00.05 convert
20955 apache 16 0 2820 1192 1000 S 0 0.1 0:00.01 sh
20957 apache 18 0 2824 1196 1000 S 0 0.1 0:00.01 sh
20960 apache 17 0 2264 736 560 S 0 0.0 0:00.01 texvc
20961 apache 17 0 2268 720 540 S 0 0.0 0:00.00 texvc
20962 apache 18 0 2824 1196 1000 S 0 0.1 0:00.01 sh
20963 apache 17 0 2820 1184 1000 S 0 0.1 0:00.00 sh
20966 apache 15 0 2264 720 544 S 0 0.0 0:00.01 texvc
20969 apache 20 0 2824 532 336 R 0 0.0 0:00.00 sh
20971 apache 15 0 2820 1192 1000 S 0 0.1 0:00.00 sh Code: Select all
free -m
total used free shared buffers cached
Mem: 2017 1664 353 0 109 760
-/+ buffers/cache: 794 1222
Swap: 1960 25 1934Code: Select all
vim /etc/apache2/httpd.conf
#Relevant variables:
KeepAlive On
MaxKeepAliveRequests 500
KeepAliveTimeout 5
<IfModule prefork.c>
StartServers 20
MinSpareServers 15
MaxSpareServers 75
MaxClients 128
MaxRequestsPerChild 30000
</IfModule>
