Hey Gang,
I am having some issues on my Linode 160 regarding slow page loads. I am trying to pinpoint why this is occurring. Specifically, I am having issues with SquirrelMail, gallery and Joomla/Mambo sites. I am seeing about 10 seconds for a squirrelmail login on average and 5-15 second login on Joomla sites.
Anyway. I have 3 squirrelmail 2 joomla sites and 5 gallery sites. Very low load (less than 250 visits per day).
I am planning on rolling out a Joomla site for my apartment building (100 families) so that may add more load later on. I am trying to plan for the future and I have considered moving to a dedicated server if this is load related.
What is the best way for me to isolate why I am seeing login delays and general HTTP performance lags?
Below are some details of what I am running today:
Code:
Linode 160
Host51
Debain Stable
Kernel 2.6.12.3
Apache 2.0.54
MySQL 4.0.24
Courier IMAP
Postfix 2.1.5
VMSTAT
Code:
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
0 0 58544 8312 4088 18196 32 16 65 34 148 30 1 0 95 3
FREE
Code:
total used free shared buffers cached
Mem: 155548 145568 9980 0 4516 20832
-/+ buffers/cache: 120220 35328
Swap: 103416 58608 44808
TOP
Code:
metrowebworks:~# top
top - 10:54:46 up 2 days, 3:18, 1 user, load average: 0.58, 0.50, 0.30
Tasks: 71 total, 1 running, 70 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.4% us, 0.0% sy, 0.0% ni, 99.6% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 155548k total, 147716k used, 7832k free, 4140k buffers
Swap: 103416k total, 58532k used, 44884k free, 18248k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
20966 root 16 0 2124 1072 852 R 0.3 0.7 0:00.02 top
1 root 16 0 1576 436 412 S 0.0 0.3 0:00.31 init
2 root 34 19 0 0 0 S 0.0 0.0 0:00.13 ksoftirqd/0
3 root 10 -5 0 0 0 S 0.0 0.0 0:00.09 events/0
4 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 khelper
5 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kthread
6 root 10 -5 0 0 0 S 0.0 0.0 0:01.31 kblockd/0
62 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 aio/0
61 root 15 0 0 0 0 S 0.0 0.0 0:18.54 kswapd0
63 root 25 0 0 0 0 S 0.0 0.0 0:00.00 jfsIO
64 root 25 0 0 0 0 S 0.0 0.0 0:00.00 jfsCommit
65 root 25 0 0 0 0 S 0.0 0.0 0:00.00 jfsSync
66 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 xfslogd/0
67 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 xfsdatad/0
68 root 15 0 0 0 0 S 0.0 0.0 0:00.70 xfsbufd
613 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 kcryptd/0
707 root 15 0 0 0 0 S 0.0 0.0 0:02.42 kjournald
805 root 15 0 0 0 0 S 0.0 0.0 0:00.26 kjournald
2247 root 16 0 3800 496 496 S 0.0 0.3 0:00.35 sshd
2267 root 15 0 1612 532 460 S 0.0 0.3 0:01.30 syslogd
2270 root 16 0 1572 408 380 S 0.0 0.3 0:00.04 klogd
2275 root 16 0 1748 376 376 S 0.0 0.2 0:00.00 courierlogger
2276 root 16 0 1860 408 388 S 0.0 0.3 0:00.00 authdaemond.pla
2278 root 16 0 2048 548 492 S 0.0 0.4 0:00.32 authdaemond.pla
2279 root 16 0 2048 552 496 S 0.0 0.4 0:00.30 authdaemond.pla
2280 root 16 0 2048 544 496 S 0.0 0.3 0:00.39 authdaemond.pla
2281 root 16 0 2048 540 488 S 0.0 0.3 0:00.32 authdaemond.pla
2282 root 16 0 2048 548 492 S 0.0 0.4 0:00.34 authdaemond.pla
2287 root 15 0 1844 440 412 S 0.0 0.3 0:00.23 couriertcpd
2290 root 15 0 1748 452 396 S 0.0 0.3 0:00.21 courierlogger
2295 root 16 0 1844 436 408 S 0.0 0.3 0:00.01 couriertcpd
2300 root 15 0 1744 448 396 S 0.0 0.3 0:00.04 courierlogger
2304 root 16 0 1604 408 408 S 0.0 0.3 0:00.01 inetd
MY.CNF
Code:
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "/var/lib/mysql/my.cnf" to set server-specific options or
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer = 128K
max_allowed_packet = 1M
thread_stack = 64K
table_cache = 4
sort_buffer = 64K
net_buffer_length = 2K
skip-locking
#
# * Query Cache Configuration
#
query_cache_limit = 1048576
query_cache_size = 16777216
query_cache_type = 1
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
#log = /var/log/mysql.log
#log = /var/log/mysql/mysql.log
#
# Error logging goes to syslog. This is a Debian improvement :)
#
# Here you can see queries with especially long duration
#log-slow-queries = /var/log/mysql/mysql-slow.log
#
# The following can be used as easy to replay backup logs or for replication.
#server-id = 1
# log-bin = /var/log/mysql/mysql-bin.log
# See /etc/mysql/debian-log-rotate.conf for the number of files kept.
max_binlog_size = 104857600
#binlog-do-db = include_database_name
#binlog-ignore-db = include_database_name
#
# * BerkeleyDB
#
# The use of BerkeleyDB is now discouraged and support for it will probably
# cease in the next versions.
skip-bdb
#
# * InnoDB
skip-innodb
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Feature
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# If you want to enable SSL support (recommended) read the manual or my
# HOWTO in /usr/share/doc/mysql-server/SSL-MINI-HOWTO.txt.gz
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
[mysqldump]
quick
quote-names
max_allowed_packet = 8M
# sort_buffer = 8M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 8M
sort_buffer = 8M
APACHE.CONF
Code:
##
## Server-Pool Size Regulation (MPM specific)
##
# prefork MPM
# StartServers ......... number of server processes to start
# MinSpareServers ...... minimum number of server processes which are kept spare
# MaxSpareServers ...... maximum number of server processes which are kept spare
# MaxClients ........... maximum number of server processes allowed to start
# MaxRequestsPerChild .. maximum number of requests a server process serves
<IfModule prefork.c>
StartServers 5
MinSpareServers 2
MaxSpareServers 10
MaxClients 10
MaxRequestsPerChild 0
</IfModule>
# pthread MPM
# StartServers ......... initial number of server processes to start
# MaxClients ........... maximum number of server processes allowed to start
# MinSpareThreads ...... minimum number of worker threads which are kept spare
# MaxSpareThreads ...... maximum number of worker threads which are kept spare
# ThreadsPerChild ...... constant number of worker threads in each server process
# MaxRequestsPerChild .. maximum number of requests a server process serves
<IfModule worker.c>
StartServers 2
MaxClients 20
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
# perchild MPM
# NumServers ........... constant number of server processes
# StartThreads ......... initial number of worker threads in each server process
# MinSpareThreads ...... minimum number of worker threads which are kept spare
# MaxSpareThreads ...... maximum number of worker threads which are kept spare
# MaxThreadsPerChild ... maximum number of worker threads in each server process
# MaxRequestsPerChild .. maximum number of connections per server process (then it dies)
<IfModule perchild.c>
NumServers 5
StartThreads 5
MinSpareThreads 5
MaxSpareThreads 10
MaxThreadsPerChild 20
MaxRequestsPerChild 0
AcceptMutex fcntl
</IfModule>