Memory usage problem on centos 5.3 Apache/Mysql/Php

Hi,

Just installed my 540 linode, but I am experiencing some problems, I think caused by apache. I am using centos 5.3 64 bits, installed latest php and mYsql. I am running a blog (wordpress) and a e-commerce site based on magento (latest version). I also installed apc for caching.

Each page request seems to incereease the memory that apche uses.

ps aux results in this output:

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND

root 1 0.0 0.1 10344 672 ? Ss Jun14 0:00 init [3]

root 2 0.0 0.0 0 0 ? S Jun14 0:00 [migration/0]

root 3 0.0 0.0 0 0 ? SN Jun14 0:00 [ksoftirqd/0]

root 4 0.0 0.0 0 0 ? S Jun14 0:00 [migration/1]

root 5 0.0 0.0 0 0 ? SN Jun14 0:00 [ksoftirqd/1]

root 6 0.0 0.0 0 0 ? S Jun14 0:00 [migration/2]

root 7 0.0 0.0 0 0 ? SN Jun14 0:00 [ksoftirqd/2]

root 8 0.0 0.0 0 0 ? S Jun14 0:00 [migration/3]

root 9 0.0 0.0 0 0 ? SN Jun14 0:00 [ksoftirqd/3]

root 10 0.0 0.0 0 0 ? S< Jun14 0:00 [events/0]

root 11 0.0 0.0 0 0 ? S< Jun14 0:00 [events/1]

root 12 0.0 0.0 0 0 ? S< Jun14 0:00 [events/2]

root 13 0.0 0.0 0 0 ? S< Jun14 0:00 [events/3]

root 14 0.0 0.0 0 0 ? S< Jun14 0:00 [khelper]

root 15 0.0 0.0 0 0 ? S< Jun14 0:00 [kthread]

root 17 0.0 0.0 0 0 ? S< Jun14 0:00 [xenwatch]

root 18 0.0 0.0 0 0 ? S< Jun14 0:00 [xenbus]

root 27 0.0 0.0 0 0 ? S< Jun14 0:00 [kblockd/0]

root 28 0.0 0.0 0 0 ? S< Jun14 0:00 [kblockd/1]

root 29 0.0 0.0 0 0 ? S< Jun14 0:00 [kblockd/2]

root 30 0.0 0.0 0 0 ? S< Jun14 0:00 [kblockd/3]

root 32 0.0 0.0 0 0 ? S< Jun14 0:00 [kseriod]

root 113 0.0 0.0 0 0 ? S Jun14 0:00 [pdflush]

root 114 0.0 0.0 0 0 ? S< Jun14 0:00 [kswapd0]

root 115 0.0 0.0 0 0 ? S< Jun14 0:00 [aio/0]

root 116 0.0 0.0 0 0 ? S< Jun14 0:00 [aio/1]

root 117 0.0 0.0 0 0 ? S< Jun14 0:00 [aio/2]

root 118 0.0 0.0 0 0 ? S< Jun14 0:00 [aio/3]

root 120 0.0 0.0 0 0 ? S< Jun14 0:00 [jfsIO]

root 121 0.0 0.0 0 0 ? S< Jun14 0:00 [jfsCommit]

root 122 0.0 0.0 0 0 ? S< Jun14 0:00 [jfsCommit]

root 123 0.0 0.0 0 0 ? S< Jun14 0:00 [jfsCommit]

root 124 0.0 0.0 0 0 ? S< Jun14 0:00 [jfsCommit]

root 125 0.0 0.0 0 0 ? S< Jun14 0:00 [jfsSync]

root 126 0.0 0.0 0 0 ? S< Jun14 0:00 [xfslogd/0]

root 127 0.0 0.0 0 0 ? S< Jun14 0:00 [xfslogd/1]

root 128 0.0 0.0 0 0 ? S< Jun14 0:00 [xfslogd/2]

root 129 0.0 0.0 0 0 ? S< Jun14 0:00 [xfslogd/3]

root 130 0.0 0.0 0 0 ? S< Jun14 0:00 [xfsdatad/0]

root 131 0.0 0.0 0 0 ? S< Jun14 0:00 [xfsdatad/1]

root 132 0.0 0.0 0 0 ? S< Jun14 0:00 [xfsdatad/2]

root 133 0.0 0.0 0 0 ? S< Jun14 0:00 [xfsdatad/3]

root 742 0.0 0.0 0 0 ? S< Jun14 0:00 [net_accel/0]

root 743 0.0 0.0 0 0 ? S< Jun14 0:00 [net_accel/1]

root 744 0.0 0.0 0 0 ? S< Jun14 0:00 [net_accel/2]

root 745 0.0 0.0 0 0 ? S< Jun14 0:00 [net_accel/3]

root 753 0.0 0.0 0 0 ? S< Jun14 0:00 [kpsmoused]

root 756 0.0 0.0 0 0 ? S< Jun14 0:00 [kcryptd/0]

root 757 0.0 0.0 0 0 ? S< Jun14 0:00 [kcryptd/1]

root 758 0.0 0.0 0 0 ? S< Jun14 0:00 [kcryptd/2]

root 759 0.0 0.0 0 0 ? S< Jun14 0:00 [kcryptd/3]

root 760 0.0 0.0 0 0 ? S< Jun14 0:00 [kmirrord]

root 770 0.0 0.0 0 0 ? S< Jun14 0:00 [kjournald]

root 838 0.0 0.1 12752 780 ? S root 2108 0.0 0.1 6744 920 ? S root 2524 0.0 0.1 6740 896 ? Ss Jun14 0:00 /sbin/dhclient -1 -q -lf /var/lib/dhclient/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid eth0

root 2600 0.0 0.1 10108 740 ? Ss Jun14 0:00 syslogd -m 0

root 2604 0.0 0.0 3804 428 ? Ss Jun14 0:00 klogd -x

root 2615 0.0 0.0 10732 380 ? Ss Jun14 0:00 irqbalance

dbus 2687 0.0 0.2 21392 1124 ? Ss Jun14 0:00 dbus-daemon –system

root 2740 0.0 0.2 60676 1196 ? Ss Jun14 0:00 /usr/sbin/sshd

root 2759 0.0 0.4 69000 2336 ? Ss Jun14 0:00 sendmail: accepting connections

smmsp 2766 0.0 0.3 59756 1780 ? Ss Jun14 0:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue

root 2776 0.0 0.2 74832 1136 ? Ss Jun14 0:00 crond

avahi 2789 0.0 0.2 23276 1388 ? Ss Jun14 0:00 avahi-daemon: running [li98-32.local]

avahi 2790 0.0 0.0 23144 332 ? Ss Jun14 0:00 avahi-daemon: chroot helper

68 2800 0.0 0.9 32152 5160 ? Ss Jun14 0:00 hald

root 2801 0.0 0.1 21692 1040 ? S Jun14 0:00 hald-runner

root 2819 0.0 0.2 52108 1304 ? Ss Jun14 0:00 login – root

root 3077 0.0 0.2 66084 1564 tty1 Ss+ Jun14 0:00 -bash

root 11360 0.0 2.2 386424 12172 ? Ss Jun14 0:00 /usr/sbin/httpd -k start

apache 11361 0.0 10.9 406484 60384 ? S Jun14 0:01 /usr/sbin/httpd -k start

apache 11362 0.0 11.8 412328 65632 ? S Jun14 0:02 /usr/sbin/httpd -k start

apache 11363 0.0 10.9 406324 60300 ? S Jun14 0:01 /usr/sbin/httpd -k start

apache 11364 0.0 6.8 396948 37800 ? S Jun14 0:00 /usr/sbin/httpd -k start

apache 11365 0.0 7.0 396848 38900 ? S Jun14 0:00 /usr/sbin/httpd -k start

apache 11366 0.0 7.0 396920 39052 ? S Jun14 0:00 /usr/sbin/httpd -k start

apache 11367 0.0 7.3 401136 40540 ? S Jun14 0:01 /usr/sbin/httpd -k start

apache 11368 0.0 7.3 398256 40908 ? S Jun14 0:00 /usr/sbin/httpd -k start

root 11371 0.0 0.2 63860 1204 tty1 S Jun14 0:00 /bin/sh /usr/bin/mysqld_safe

mysql 11493 0.0 6.8 208452 37656 tty1 Sl Jun14 0:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock

apache 11522 0.0 6.5 396636 36104 ? S Jun14 0:00 /usr/sbin/httpd -k start

apache 11523 0.0 7.7 401136 43032 ? S Jun14 0:01 /usr/sbin/httpd -k start

apache 11524 0.0 10.3 409756 57012 ? S Jun14 0:01 /usr/sbin/httpd -k start

root 11798 0.0 0.6 88220 3372 ? Ss 03:26 0:00 sshd: root@notty

root 11808 0.0 0.3 54008 2048 ? Ss 03:27 0:00 /usr/libexec/openssh/sftp-server

root 11827 0.0 0.6 88220 3352 ? Ss 03:28 0:00 sshd: root@notty

root 11837 0.0 0.3 54008 2028 ? Ss 03:29 0:00 /usr/libexec/openssh/sftp-server

root 19664 0.0 0.0 0 0 ? S 04:07 0:00 [pdflush]

root 19903 0.0 0.6 88072 3344 ? Ss 04:41 0:00 sshd: root@pts/0

root 19913 0.0 0.2 66088 1512 pts/0 Ss 04:41 0:00 -bash

root 19958 0.0 0.1 65612 972 pts/0 R+ 04:44 0:00 ps aux

free -m results in :

total used free shared buffers cached

Mem: 540 533 6 0 9 211

-/+ buffers/cache: 312 227

Swap: 255 0 255

When i stop the mysql and apachge server ps aux look like this:

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND

root 1 0.0 0.1 10344 672 ? Ss Jun14 0:00 init [3]

root 2 0.0 0.0 0 0 ? S Jun14 0:00 [migration/0]

root 3 0.0 0.0 0 0 ? SN Jun14 0:00 [ksoftirqd/0]

root 4 0.0 0.0 0 0 ? S Jun14 0:00 [migration/1]

root 5 0.0 0.0 0 0 ? SN Jun14 0:00 [ksoftirqd/1]

root 6 0.0 0.0 0 0 ? S Jun14 0:00 [migration/2]

root 7 0.0 0.0 0 0 ? SN Jun14 0:00 [ksoftirqd/2]

root 8 0.0 0.0 0 0 ? S Jun14 0:00 [migration/3]

root 9 0.0 0.0 0 0 ? SN Jun14 0:00 [ksoftirqd/3]

root 10 0.0 0.0 0 0 ? S< Jun14 0:00 [events/0]

root 11 0.0 0.0 0 0 ? S< Jun14 0:00 [events/1]

root 12 0.0 0.0 0 0 ? S< Jun14 0:00 [events/2]

root 13 0.0 0.0 0 0 ? S< Jun14 0:00 [events/3]

root 14 0.0 0.0 0 0 ? S< Jun14 0:00 [khelper]

root 15 0.0 0.0 0 0 ? S< Jun14 0:00 [kthread]

root 17 0.0 0.0 0 0 ? S< Jun14 0:00 [xenwatch]

root 18 0.0 0.0 0 0 ? S< Jun14 0:00 [xenbus]

root 27 0.0 0.0 0 0 ? S< Jun14 0:00 [kblockd/0]

root 28 0.0 0.0 0 0 ? S< Jun14 0:00 [kblockd/1]

root 29 0.0 0.0 0 0 ? S< Jun14 0:00 [kblockd/2]

root 30 0.0 0.0 0 0 ? S< Jun14 0:00 [kblockd/3]

root 32 0.0 0.0 0 0 ? S< Jun14 0:00 [kseriod]

root 113 0.0 0.0 0 0 ? S Jun14 0:00 [pdflush]

root 114 0.0 0.0 0 0 ? S< Jun14 0:00 [kswapd0]

root 115 0.0 0.0 0 0 ? S< Jun14 0:00 [aio/0]

root 116 0.0 0.0 0 0 ? S< Jun14 0:00 [aio/1]

root 117 0.0 0.0 0 0 ? S< Jun14 0:00 [aio/2]

root 118 0.0 0.0 0 0 ? S< Jun14 0:00 [aio/3]

root 120 0.0 0.0 0 0 ? S< Jun14 0:00 [jfsIO]

root 121 0.0 0.0 0 0 ? S< Jun14 0:00 [jfsCommit]

root 122 0.0 0.0 0 0 ? S< Jun14 0:00 [jfsCommit]

root 123 0.0 0.0 0 0 ? S< Jun14 0:00 [jfsCommit]

root 124 0.0 0.0 0 0 ? S< Jun14 0:00 [jfsCommit]

root 125 0.0 0.0 0 0 ? S< Jun14 0:00 [jfsSync]

root 126 0.0 0.0 0 0 ? S< Jun14 0:00 [xfslogd/0]

root 127 0.0 0.0 0 0 ? S< Jun14 0:00 [xfslogd/1]

root 128 0.0 0.0 0 0 ? S< Jun14 0:00 [xfslogd/2]

root 129 0.0 0.0 0 0 ? S< Jun14 0:00 [xfslogd/3]

root 130 0.0 0.0 0 0 ? S< Jun14 0:00 [xfsdatad/0]

root 131 0.0 0.0 0 0 ? S< Jun14 0:00 [xfsdatad/1]

root 132 0.0 0.0 0 0 ? S< Jun14 0:00 [xfsdatad/2]

root 133 0.0 0.0 0 0 ? S< Jun14 0:00 [xfsdatad/3]

root 742 0.0 0.0 0 0 ? S< Jun14 0:00 [net_accel/0]

root 743 0.0 0.0 0 0 ? S< Jun14 0:00 [net_accel/1]

root 744 0.0 0.0 0 0 ? S< Jun14 0:00 [net_accel/2]

root 745 0.0 0.0 0 0 ? S< Jun14 0:00 [net_accel/3]

root 753 0.0 0.0 0 0 ? S< Jun14 0:00 [kpsmoused]

root 756 0.0 0.0 0 0 ? S< Jun14 0:00 [kcryptd/0]

root 757 0.0 0.0 0 0 ? S< Jun14 0:00 [kcryptd/1]

root 758 0.0 0.0 0 0 ? S< Jun14 0:00 [kcryptd/2]

root 759 0.0 0.0 0 0 ? S< Jun14 0:00 [kcryptd/3]

root 760 0.0 0.0 0 0 ? S< Jun14 0:00 [kmirrord]

root 770 0.0 0.0 0 0 ? S< Jun14 0:00 [kjournald]

root 838 0.0 0.1 12752 780 ? S root 2108 0.0 0.1 6744 920 ? S root 2524 0.0 0.1 6740 896 ? Ss Jun14 0:00 /sbin/dhclient -1 -q -lf /var/lib/dhclient/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid eth0

root 2600 0.0 0.1 10108 740 ? Ss Jun14 0:00 syslogd -m 0

root 2604 0.0 0.0 3804 428 ? Ss Jun14 0:00 klogd -x

root 2615 0.0 0.0 10732 380 ? Ss Jun14 0:00 irqbalance

dbus 2687 0.0 0.2 21392 1124 ? Ss Jun14 0:00 dbus-daemon –system

root 2740 0.0 0.2 60676 1196 ? Ss Jun14 0:00 /usr/sbin/sshd

root 2759 0.0 0.4 69000 2336 ? Ss Jun14 0:00 sendmail: accepting connections

smmsp 2766 0.0 0.3 59756 1780 ? Ss Jun14 0:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue

root 2776 0.0 0.2 74832 1136 ? Ss Jun14 0:00 crond

avahi 2789 0.0 0.2 23276 1388 ? Ss Jun14 0:00 avahi-daemon: running [li98-32.local]

avahi 2790 0.0 0.0 23144 332 ? Ss Jun14 0:00 avahi-daemon: chroot helper

68 2800 0.0 0.9 32152 5160 ? Ss Jun14 0:00 hald

root 2801 0.0 0.1 21692 1040 ? S Jun14 0:00 hald-runner

root 2819 0.0 0.2 52108 1304 ? Ss Jun14 0:00 login – root

root 3077 0.0 0.2 66084 1564 tty1 Ss+ Jun14 0:00 -bash

root 11798 0.0 0.6 88220 3372 ? Ss 03:26 0:00 sshd: root@notty

root 11808 0.0 0.3 54008 2048 ? Ss 03:27 0:00 /usr/libexec/openssh/sftp-server

root 11827 0.0 0.6 88220 3352 ? Ss 03:28 0:00 sshd: root@notty

root 11837 0.0 0.3 54008 2028 ? Ss 03:29 0:00 /usr/libexec/openssh/sftp-server

root 19664 0.0 0.0 0 0 ? S 04:07 0:00 [pdflush]

root 19903 0.0 0.6 88072 3344 ? Ss 04:41 0:00 sshd: root@pts/0

root 19913 0.0 0.2 66088 1536 pts/0 Ss 04:41 0:00 -bash

root 20017 0.0 0.1 65616 976 pts/0 R+ 04:57 0:00 ps aux

and after starting the servers again:

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND

root 1 0.0 0.1 10344 672 ? Ss Jun14 0:00 init [3]

root 2 0.0 0.0 0 0 ? S Jun14 0:00 [migration/0]

root 3 0.0 0.0 0 0 ? SN Jun14 0:00 [ksoftirqd/0]

root 4 0.0 0.0 0 0 ? S Jun14 0:00 [migration/1]

root 5 0.0 0.0 0 0 ? SN Jun14 0:00 [ksoftirqd/1]

root 6 0.0 0.0 0 0 ? S Jun14 0:00 [migration/2]

root 7 0.0 0.0 0 0 ? SN Jun14 0:00 [ksoftirqd/2]

root 8 0.0 0.0 0 0 ? S Jun14 0:00 [migration/3]

root 9 0.0 0.0 0 0 ? SN Jun14 0:00 [ksoftirqd/3]

root 10 0.0 0.0 0 0 ? S< Jun14 0:00 [events/0]

root 11 0.0 0.0 0 0 ? S< Jun14 0:00 [events/1]

root 12 0.0 0.0 0 0 ? S< Jun14 0:00 [events/2]

root 13 0.0 0.0 0 0 ? S< Jun14 0:00 [events/3]

root 14 0.0 0.0 0 0 ? S< Jun14 0:00 [khelper]

root 15 0.0 0.0 0 0 ? S< Jun14 0:00 [kthread]

root 17 0.0 0.0 0 0 ? S< Jun14 0:00 [xenwatch]

root 18 0.0 0.0 0 0 ? S< Jun14 0:00 [xenbus]

root 27 0.0 0.0 0 0 ? S< Jun14 0:00 [kblockd/0]

root 28 0.0 0.0 0 0 ? S< Jun14 0:00 [kblockd/1]

root 29 0.0 0.0 0 0 ? S< Jun14 0:00 [kblockd/2]

root 30 0.0 0.0 0 0 ? S< Jun14 0:00 [kblockd/3]

root 32 0.0 0.0 0 0 ? S< Jun14 0:00 [kseriod]

root 113 0.0 0.0 0 0 ? S Jun14 0:00 [pdflush]

root 114 0.0 0.0 0 0 ? S< Jun14 0:00 [kswapd0]

root 115 0.0 0.0 0 0 ? S< Jun14 0:00 [aio/0]

root 116 0.0 0.0 0 0 ? S< Jun14 0:00 [aio/1]

root 117 0.0 0.0 0 0 ? S< Jun14 0:00 [aio/2]

root 118 0.0 0.0 0 0 ? S< Jun14 0:00 [aio/3]

root 120 0.0 0.0 0 0 ? S< Jun14 0:00 [jfsIO]

root 121 0.0 0.0 0 0 ? S< Jun14 0:00 [jfsCommit]

root 122 0.0 0.0 0 0 ? S< Jun14 0:00 [jfsCommit]

root 123 0.0 0.0 0 0 ? S< Jun14 0:00 [jfsCommit]

root 124 0.0 0.0 0 0 ? S< Jun14 0:00 [jfsCommit]

root 125 0.0 0.0 0 0 ? S< Jun14 0:00 [jfsSync]

root 126 0.0 0.0 0 0 ? S< Jun14 0:00 [xfslogd/0]

root 127 0.0 0.0 0 0 ? S< Jun14 0:00 [xfslogd/1]

root 128 0.0 0.0 0 0 ? S< Jun14 0:00 [xfslogd/2]

root 129 0.0 0.0 0 0 ? S< Jun14 0:00 [xfslogd/3]

root 130 0.0 0.0 0 0 ? S< Jun14 0:00 [xfsdatad/0]

root 131 0.0 0.0 0 0 ? S< Jun14 0:00 [xfsdatad/1]

root 132 0.0 0.0 0 0 ? S< Jun14 0:00 [xfsdatad/2]

root 133 0.0 0.0 0 0 ? S< Jun14 0:00 [xfsdatad/3]

root 742 0.0 0.0 0 0 ? S< Jun14 0:00 [net_accel/0]

root 743 0.0 0.0 0 0 ? S< Jun14 0:00 [net_accel/1]

root 744 0.0 0.0 0 0 ? S< Jun14 0:00 [net_accel/2]

root 745 0.0 0.0 0 0 ? S< Jun14 0:00 [net_accel/3]

root 753 0.0 0.0 0 0 ? S< Jun14 0:00 [kpsmoused]

root 756 0.0 0.0 0 0 ? S< Jun14 0:00 [kcryptd/0]

root 757 0.0 0.0 0 0 ? S< Jun14 0:00 [kcryptd/1]

root 758 0.0 0.0 0 0 ? S< Jun14 0:00 [kcryptd/2]

root 759 0.0 0.0 0 0 ? S< Jun14 0:00 [kcryptd/3]

root 760 0.0 0.0 0 0 ? S< Jun14 0:00 [kmirrord]

root 770 0.0 0.0 0 0 ? S< Jun14 0:00 [kjournald]

root 838 0.0 0.1 12752 780 ? S root 2108 0.0 0.1 6744 920 ? S root 2524 0.0 0.1 6740 896 ? Ss Jun14 0:00 /sbin/dhclient -1 -q -lf /var/lib/dhclient/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid eth0

root 2600 0.0 0.1 10108 740 ? Ss Jun14 0:00 syslogd -m 0

root 2604 0.0 0.0 3804 428 ? Ss Jun14 0:00 klogd -x

root 2615 0.0 0.0 10732 380 ? Ss Jun14 0:00 irqbalance

dbus 2687 0.0 0.2 21392 1124 ? Ss Jun14 0:00 dbus-daemon –system

root 2740 0.0 0.2 60676 1196 ? Ss Jun14 0:00 /usr/sbin/sshd

root 2759 0.0 0.4 69000 2336 ? Ss Jun14 0:00 sendmail: accepting connections

smmsp 2766 0.0 0.3 59756 1780 ? Ss Jun14 0:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue

root 2776 0.0 0.2 74832 1136 ? Ss Jun14 0:00 crond

avahi 2789 0.0 0.2 23276 1388 ? Ss Jun14 0:00 avahi-daemon: running [li98-32.local]

avahi 2790 0.0 0.0 23144 332 ? Ss Jun14 0:00 avahi-daemon: chroot helper

68 2800 0.0 0.9 32152 5160 ? Ss Jun14 0:00 hald

root 2801 0.0 0.1 21692 1040 ? S Jun14 0:00 hald-runner

root 2819 0.0 0.2 52108 1304 ? Ss Jun14 0:00 login – root

root 3077 0.0 0.2 66084 1564 tty1 Ss+ Jun14 0:00 -bash

root 11798 0.0 0.6 88220 3372 ? Ss 03:26 0:00 sshd: root@notty

root 11808 0.0 0.3 54008 2048 ? Ss 03:27 0:00 /usr/libexec/openssh/sftp-server

root 11827 0.0 0.6 88220 3352 ? Ss 03:28 0:00 sshd: root@notty

root 11837 0.0 0.3 54008 2028 ? Ss 03:29 0:00 /usr/libexec/openssh/sftp-server

root 19664 0.0 0.0 0 0 ? S 04:07 0:00 [pdflush]

root 19903 0.0 0.6 88072 3344 ? Ss 04:41 0:00 sshd: root@pts/0

root 19913 0.0 0.2 66088 1548 pts/0 Ss 04:41 0:00 -bash

root 20026 0.0 0.2 63856 1204 pts/0 S 04:58 0:00 /bin/sh /usr/bin/mysqld_safe

mysql 20148 0.0 4.5 199084 24932 pts/0 Sl 04:58 0:00 /usr/libexec/mysqld –basedir=/usr --datadir=/var/lib/mysql --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock

root 20166 0.1 2.2 386424 12176 ? Ss 04:58 0:00 /usr/sbin/httpd -k start

apache 20167 0.0 1.2 386424 6784 ? S 04:58 0:00 /usr/sbin/httpd -k start

apache 20168 0.0 1.2 386424 6784 ? S 04:58 0:00 /usr/sbin/httpd -k start

apache 20169 0.0 1.2 386424 6784 ? S 04:58 0:00 /usr/sbin/httpd -k start

apache 20170 0.0 1.2 386424 6784 ? S 04:58 0:00 /usr/sbin/httpd -k start

apache 20171 0.0 1.2 386424 6784 ? S 04:58 0:00 /usr/sbin/httpd -k start

apache 20172 0.0 1.2 386424 6784 ? S 04:58 0:00 /usr/sbin/httpd -k start

apache 20173 0.0 1.2 386424 6784 ? S 04:58 0:00 /usr/sbin/httpd -k start

apache 20174 0.0 1.2 386424 6784 ? S 04:58 0:00 /usr/sbin/httpd -k start

root 20180 0.0 0.1 65612 972 pts/0 R+ 04:58 0:00 ps aux

free -m after stopping the servers:

total used free shared buffers cached

Mem: 540 273 266 0 10 178

-/+ buffers/cache: 85 455

Swap: 255 0 255

after restarting the servers:

total used free shared buffers cached

Mem: 540 311 228 0 10 183

-/+ buffers/cache: 117 422

Swap: 255 0 255

Are there any services that I can stop to free more memory? How can I tweak apache to reduce the posibility to get an OOM error?

Anyone any ideas?~~~~

2 Replies

> total used free shared buffers cached

Mem: 540 533 6 0 9 211

-/+ buffers/cache: 312 227

Swap: 255 0 255
i read this…

free RAM: 227MB

swap used: 0

i think it's not OOM error, u still have plenty RAM and no swap being used

@Niekos:

-/+ buffers/cache: 117 422
This is the line you need to care about. Looks pretty good to me.

@Niekos:

How can I tweak apache to reduce the posibility to get an OOM error?
If you're using the prefork MPM, try reducing MaxClients:

http://www.linode.com/forums/viewtopic.php?t=4096

http://www.linode.com/forums/viewtopic.php?t=4261

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct