Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've noticed my VPS behaving weird today. I have set it up as a web server (along with MySQL, PHP, FTP etc) and at the moment there is only one website running on there. I noticed earlier today that the website would loose connection to the database intermittently, and would also fail to load at all.

I opened Webmin and when it eventually loaded (it took a while) it reported back that the CPU usuage for I/O was 100%, and that 125.39MB of the 125.47MB Virtual RAM was used up. I reset the VPS and after it came back online, the CPU read that it was running at 100% Idle and that 0KB of RAM was being used.

After 1 hour 44 minutes, the server now says that I'm using 7.36MB of RAM. It also says that I have 66 processes running, and on looking at that I have 9 instances of httpd service running.

I'm thinking that the httpd services are eating up the RAM and CPU (each instance is reporting that it's using roughly 330000KB of RAM). As I only have one website running on the server (and one instance of Webmin) shouldn't I expect to see only one instance of httpd running? Or is this normal?

If the multiple instances of httpd aren't the problem, what else could be causing these issues?

EDIT:
The processes listed by CPU usage are:

ID      Owner       CPU     Command   
2401    root    1.3 %   /usr/libexec/webmin/proc/index_cpu.cgi<br />
1   root    0.0 %   /sbin/init<br />
2   root    0.0 %   [kthreadd]<br />
3   root    0.0 %   [migration/0]<br />
4   root    0.0 %   [ksoftirqd/0]<br />
5   root    0.0 %   [watchdog/0]<br />
6   root    0.0 %   [events/0]<br />
7   root    0.0 %   [cpuset]<br />
8   root    0.0 %   [khelper]<br />
9   root    0.0 %   [netns]<br />
10  root    0.0 %   [async/mgr]<br />

The processes by RAM are:
1034    mysql   444648 kB   /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --log-e ...<br />
1156    apache  334512 kB   /usr/sbin/httpd<br />
1157    apache  333728 kB   /usr/sbin/httpd<br />
1161    apache  333728 kB   /usr/sbin/httpd<br />
1136    root    319352 kB   /usr/sbin/httpd<br />
1158    apache  319352 kB   /usr/sbin/httpd<br />
1159    apache  319352 kB   /usr/sbin/httpd<br />
1160    apache  319352 kB   /usr/sbin/httpd<br />
1162    apache  319352 kB   /usr/sbin/httpd<br />
1163    apache  319352 kB   /usr/sbin/httpd<br />
882 root    248576 kB   /sbin/rsyslogd -c 4<br />
1144    root    117072 kB   crond<br />
1960    root    108212 kB   -bash<br />
945 root    108076 kB   /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/my ...<br />
1957    root    97456 kB    sshd: root@pts/0<br />
2486    root    67068 kB    /usr/libexec/webmin/proc/index_size.cgi<br />
1164    root    64152 kB    /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf<br />
2489    root    64152 kB    /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf<br />
909 root    63756 kB    /usr/sbin/sshd<br />
1135    postfix 62220 kB    qmgr -l -t fifo -u<br />
2062    postfix 62048 kB    pickup -l -t fifo -u<br />
1126    root    61968 kB    /usr/libexec/postfix/master<br />
1   root    19112 kB    /sbin/init<br />
2498    root    11208 kB    sh -c ps --cols 2048 -eo user:80,ruser:80,group:80,rgroup:80,pid,ppid,pgid,pcpu, ...<br />
2499    root    11092 kB    ps --cols 2048 -eo user:80,ruser:80,group:80,rgroup:80,pid,ppid,pgid,pcpu,vsz,ni ...<br />
358 root    10860 kB    /sbin/udevd -d<br />
615 root    10856 kB    /sbin/udevd -d<br />
894 root    3988 kB /usr/sbin/acpid<br />
1172    root    3984 kB /sbin/agetty /dev/ttyS0 9600 vt100-nav<br />
share|improve this question
2  
Can you run top, sort by CPU% and see what the busiest processes are? –  cjc Mar 13 '12 at 17:12
    
The busiest process is /usr/libexec/webmin/proc/index_cpu.cgi at 4.0%. But thats it, none of the other processes have any CPU usage? –  mickburkejnr Mar 13 '12 at 17:15
    
Hmm, what does the "Cpu(s)" line say from top? On my non-busy system, I see: "Cpu(s): 0.7%us, 0.7%sy, 0.0%ni, 98.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st". Also, what's the output from free -m? –  cjc Mar 13 '12 at 17:19
    
Added the output in the question. –  mickburkejnr Mar 13 '12 at 17:31
    
Can you actually get a shell and run commands? Or are you limited to your control panel? –  cjc Mar 13 '12 at 17:40

1 Answer 1

up vote 0 down vote accepted

I tracked down the problem to Webmin running. I've left the Webmin service off all night and the RAM usage is under control now. I have now since deleted Webmin and using ISP Config 3 instead. Again, the RAM usage is incredibly good now.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.