Question : What can we get rid of on our ubuntu server?

We have major performance problems with our server. In another thread here, we have been looking at memory/swap usage, and generally everyone has told us we need to increase the RAM. But--that is expensive.

I'm wondering if we can remove some stuff to make this work better. We already got rid of gnome and noix that we had used at one point for management. Instead we do most management via webmin, we access files via nautilus over ssh, and we use an ssh terminal as needed. So we are pretty lean on the management end.

At the end of this post I have pasted in the output of 'ps auxww' that I previously put in the other thread. I'm hoping some experts can give me a little insight into what this means.

Specific questions to be answered:
  • why are there so many apache processes here? Do we get one per user accessing the site? Or is it one per virtual server? Or somethng else entirely?

  • can we eliminate courier, postfix, and other mail-related processes, and their overhead, by using google apps for mail for these domains? Would our sites still be able to use sendmail?

  • We have bind running so that http callbacks to our websites will not have to go outside our server environment. Does that make sense? Would it be better, or is it even possible, to move all that DNS stuff off the server?

  • How might we increase the efficiency of mysql? would it make sense to get a free database account somewhere, and reconfigure our sites to use that?

  • What about caching?

===========below is output of ps auxww============
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.2  23628   636 ?        Ss   Jul19   0:00 /sbin/init
root         2  0.0  0.0      0     0 ?        S    Jul19   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    Jul19   0:00 [migration/0]
root         4  0.0  0.0      0     0 ?        S    Jul19   0:00 [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S    Jul19   0:00 [events/0]
root         6  0.0  0.0      0     0 ?        S    Jul19   0:00 [khelper]
root         9  0.0  0.0      0     0 ?        S    Jul19   0:00 [netns]
root        10  0.0  0.0      0     0 ?        S    Jul19   0:00 [async/mgr]
root        20  0.0  0.0      0     0 ?        S    Jul19   0:00 [xenwatch]
root        21  0.0  0.0      0     0 ?        S    Jul19   0:00 [xenbus]
root        30  0.0  0.0      0     0 ?        S    Jul19   0:00 [migration/1]
root        31  0.0  0.0      0     0 ?        S    Jul19   0:00 [ksoftirqd/1]
root        32  0.0  0.0      0     0 ?        S    Jul19   0:00 [events/1]
root        33  0.0  0.0      0     0 ?        S    Jul19   0:00 [migration/2]
root        34  0.0  0.0      0     0 ?        S    Jul19   0:00 [ksoftirqd/2]
root        35  0.0  0.0      0     0 ?        S    Jul19   0:00 [events/2]
root        36  0.0  0.0      0     0 ?        S    Jul19   0:00 [migration/3]
root        37  0.0  0.0      0     0 ?        S    Jul19   0:00 [ksoftirqd/3]
root        38  0.0  0.0      0     0 ?        S    Jul19   0:00 [events/3]
root        71  0.0  0.0      0     0 ?        S    Jul19   0:00 [sync_supers]
root        73  0.0  0.0      0     0 ?        S    Jul19   0:00 [bdi-default]
root        75  0.0  0.0      0     0 ?        S    Jul19   0:00 [kblockd/0]
root        76  0.0  0.0      0     0 ?        S    Jul19   0:00 [kblockd/1]
root        77  0.0  0.0      0     0 ?        S    Jul19   0:00 [kblockd/2]
root        78  0.0  0.0      0     0 ?        S    Jul19   0:00 [kblockd/3]
root        83  0.0  0.0      0     0 ?        S    Jul19   0:00 [kseriod]
root       126  0.0  0.0      0     0 ?        S    Jul19   0:12 [kswapd0]
root       127  0.0  0.0      0     0 ?        S    Jul19   0:00 [aio/0]
root       128  0.0  0.0      0     0 ?        S    Jul19   0:00 [aio/1]
root       129  0.0  0.0      0     0 ?        S    Jul19   0:00 [aio/2]
root       130  0.0  0.0      0     0 ?        S    Jul19   0:00 [aio/3]
root       131  0.0  0.0      0     0 ?        S    Jul19   0:00 [crypto/0]
root       132  0.0  0.0      0     0 ?        S    Jul19   0:00 [crypto/1]
root       133  0.0  0.0      0     0 ?        S    Jul19   0:00 [crypto/2]
root       134  0.0  0.0      0     0 ?        S    Jul19   0:00 [crypto/3]
root       212  0.0  0.0      0     0 ?        S    Jul19   0:00 [net_accel/0]
root       213  0.0  0.0      0     0 ?        S    Jul19   0:00 [net_accel/1]
root       214  0.0  0.0      0     0 ?        S    Jul19   0:00 [net_accel/2]
root       215  0.0  0.0      0     0 ?        S    Jul19   0:00 [net_accel/3]
root       590  0.0  0.0      0     0 ?        S    Jul19   0:00 [kstriped]
root       597  0.0  0.0      0     0 ?        S    Jul19   0:00 [ksnapd]
root      1150  0.0  0.0      0     0 ?        S    Jul19   0:00 [kjournald]
root      1234  0.0  0.0      0     0 ?        S    Jul19   0:00 [flush-8:1]
root      2969  0.0  0.0  16836    48 ?        S    Jul19   0:00 upstart-udev-bridge --daemon
root      2977  0.0  0.0  16944    40 ?        S<s  Jul19   0:00 udevd --daemon
root      3185  0.0  0.0  16940    36 ?        S<   Jul19   0:00 udevd --daemon
root      3187  0.0  0.0  16940    36 ?        S<   Jul19   0:00 udevd --daemon
syslog    3318  0.0  0.2 126040   712 ?        Sl   Jul19   0:00 rsyslogd -c4
108       3334  0.0  0.0  23348   228 ?        Ss   Jul19   0:00 dbus-daemon --system --fork
root      3413  0.0  0.0  49188   104 ?        Ss   Jul19   0:00 /usr/sbin/sshd
mysql     3415  0.0  2.5 314960  6892 ?        Ssl  Jul19   0:01 /usr/sbin/mysqld
root      3469  0.0  0.0   4020    40 ?        Ss   Jul19   0:00 /bin/sh /etc/init.d/rc 2
root      3478  0.0  0.1  21020   388 ?        Ss   Jul19   0:00 cron
bind      3510  0.0  0.0 160756   272 ?        Ssl  Jul19   0:00 /usr/sbin/named -u bind
root      3538  0.0  0.0   6208    44 ?        S    Jul19   0:00 /usr/sbin/courierlogger -pid=/var/run/courier/authdaemon/pid -start /usr/lib/courier/courier-authlib/authdaemond
root      3539  0.0  0.0  18720    80 ?        S    Jul19   0:00 /usr/lib/courier/courier-authlib/authdaemond
root      3556  0.0  0.0   6204    32 ?        S    Jul19   0:00 /usr/sbin/courierlogger -pid=/var/run/courier/imapd.pid -start -name=imapd /usr/sbin/couriertcpd -address=0 -maxprocs=40 -maxperip=20 -nodnslookup -noidentlookup 143 /usr/lib/courier/courier/imaplogin /usr/bin/imapd Maildir
root      3557  0.0  0.0  10416    48 ?        S    Jul19   0:00 /usr/sbin/couriertcpd -address=0 -maxprocs=40 -maxperip=20 -nodnslookup -noidentlookup 143 /usr/lib/courier/courier/imaplogin /usr/bin/imapd Maildir
root      3579  0.0  0.0  18720    40 ?        S    Jul19   0:00 /usr/lib/courier/courier-authlib/authdaemond
root      3580  0.0  0.0  18720    40 ?        S    Jul19   0:00 /usr/lib/courier/courier-authlib/authdaemond
root      3581  0.0  0.0  18720    40 ?        S    Jul19   0:00 /usr/lib/courier/courier-authlib/authdaemond
root      3582  0.0  0.0  18720    40 ?        S    Jul19   0:00 /usr/lib/courier/courier-authlib/authdaemond
root      3583  0.0  0.0  18720    40 ?        S    Jul19   0:00 /usr/lib/courier/courier-authlib/authdaemond
root      3586  0.0  0.0   6212    32 ?        S    Jul19   0:00 /usr/sbin/courierlogger -pid=/var/run/courier/imapd-ssl.pid -start -name=imapd-ssl /usr/sbin/couriertcpd -address=0 -maxprocs=40 -maxperip=20 -nodnslookup -noidentlookup 993 /usr/bin/couriertls -server -tcpd /usr/lib/courier/courier/imaplogin /usr/bin/imapd Maildir
root      3587  0.0  0.0  10420    48 ?        S    Jul19   0:00 /usr/sbin/couriertcpd -address=0 -maxprocs=40 -maxperip=20 -nodnslookup -noidentlookup 993 /usr/bin/couriertls -server -tcpd /usr/lib/courier/courier/imaplogin /usr/bin/imapd Maildir
root      3602  0.0  0.0   6208    32 ?        S    Jul19   0:00 /usr/sbin/courierlogger -pid=/var/run/courier/pop3d.pid -start -name=pop3d /usr/sbin/couriertcpd -maxprocs=40 -maxperip=4 -nodnslookup -noidentlookup -address=0 110 /usr/lib/courier/courier/courierpop3login /usr/lib/courier/courier/courierpop3d Maildir
root      3603  0.0  0.0  10416    48 ?        S    Jul19   0:00 /usr/sbin/couriertcpd -maxprocs=40 -maxperip=4 -nodnslookup -noidentlookup -address=0 110 /usr/lib/courier/courier/courierpop3login /usr/lib/courier/courier/courierpop3d Maildir
root      3623  0.0  0.0   6208    32 ?        S    Jul19   0:00 /usr/sbin/courierlogger -pid=/var/run/courier/pop3d-ssl.pid -start -name=pop3d-ssl /usr/sbin/couriertcpd -address=0 -maxprocs=40 -maxperip=4 -nodnslookup -noidentlookup 995 /usr/bin/couriertls -server -tcpd /usr/lib/courier/courier/courierpop3login /usr/lib/courier/courier/courierpop3d Maildir
root      3624  0.0  0.0  10420    48 ?        S    Jul19   0:00 /usr/sbin/couriertcpd -address=0 -maxprocs=40 -maxperip=4 -nodnslookup -noidentlookup 995 /usr/bin/couriertls -server -tcpd /usr/lib/courier/courier/courierpop3login /usr/lib/courier/courier/courierpop3d Maildir
root      3723  0.0  0.1  37132   292 ?        Ss   Jul19   0:00 /usr/lib/postfix/master
postfix   3730  0.0  0.2  39352   552 ?        S    Jul19   0:00 qmgr -l -t fifo -u
root      3756  0.0  0.0  75120    68 ?        Ss   Jul19   0:00 /usr/sbin/cupsd -C /etc/cups/cupsd.conf
root      3790  0.0  0.2 212584   812 ?        Ss   Jul19   0:00 /usr/sbin/apache2 -k start
root      3805  0.0  0.0   4020    40 ?        S    Jul19   0:00 /bin/sh /etc/rc2.d/S99tracks start
root      3806  0.0  9.2 151760 25408 ?        Sl   Jul19   0:05 ruby /home/tracks/tracks/script/server -e production
root      6756  0.0  0.2 253788   660 ?        Sl   Jul19   0:00 /usr/sbin/console-kit-daemon --no-daemon
www-data  8011  0.0 14.8 250032 40808 ?        S    Jul19   0:04 /usr/sbin/apache2 -k start
www-data  8013  0.0  1.5 249044  4228 ?        S    Jul19   0:05 /usr/sbin/apache2 -k start
www-data  8372  0.0  0.4 246652  1304 ?        S    Jul19   0:06 /usr/sbin/apache2 -k start
postfix  11483  0.0  0.2  41712   676 ?        S    Jul19   0:00 tlsmgr -l -t unix -u -c
www-data 14549  0.0 13.0 243312 35932 ?        S    Jul19   0:03 /usr/sbin/apache2 -k start
www-data 19314  0.0  1.1 251092  3176 ?        S    03:03   0:03 /usr/sbin/apache2 -k start
www-data 19315  0.0  9.6 250976 26368 ?        S    03:03   0:04 /usr/sbin/apache2 -k start
www-data 22219  0.0  0.4 251028  1372 ?        S    05:26   0:02 /usr/sbin/apache2 -k start
www-data 22220  0.0  1.0 239360  2764 ?        S    05:26   0:03 /usr/sbin/apache2 -k start
root     25574  0.0  1.3  14040  3804 ?        S<L  08:24   0:00 /usr/bin/atop -a -w /var/log/atop.log 600
root     26077  0.0  0.2  79072   800 ?        Ss   08:49   0:00 sshd: cwg [priv]
cwg      26122  0.0  0.2  79072   696 ?        S    08:49   0:00 sshd: [email protected]/0  
cwg      26123  0.0  0.6  19484  1684 pts/0    Ss   08:49   0:00 /bin/bash -
www-data 28741  0.0 14.3 246628 39296 ?        S    10:02   0:01 /usr/sbin/apache2 -k start
www-data 30463  0.0  0.8 226516  2240 ?        S    11:35   0:00 /usr/sbin/apache2 -k start
postfix  30648  0.0  0.3  39192   840 ?        S    11:45   0:00 pickup -l -t fifo -u -c
cwg      31451  0.0  0.4  15188  1176 pts/0    R+   12:31   0:00 ps auxww

Answer : What can we get rid of on our ubuntu server?

#can we eliminate courier, postfix, and other mail-related processes, and their overhead, by using google apps for mail for these domains? Would our sites still be able to use sendmail?

If the server is not receiving email, you can remove courier, postfix, etc. and still be able to use sendmail for outgoing email.


#We have bind running so that http callbacks to our websites will not have to go outside our server environment. Does that make sense? Would it be better, or is it even possible, to move all that DNS stuff off the server?

You may want to just add your addresses to the /etc/hosts file, as it will check the file first before going to DNS anyway.  
Random Solutions  
 
programming4us programming4us