Make sure you collect performance data on production servers. Turn your collected performance data into useful reports. If things aren't as they should be (the baseline and system requirements determine this):
Remember: If it ain't broke, don't fix!
You can change some parameters with echo
and
/proc/sys/*
(or for Solaris you can also use
rctladm
).
Modern systems are almost completely self-tuning. Change tunable parameters only very reluctantly! Changing any parameters usually does more harm than good. Usually the default kernel parameters are fine, and changing them makes performace much worse (or breaks something). If you wish to tweak the tunable parameters do a Google search first. A (somewhat dated) starting point is Server Oriented System Tuning Info. A modern Linux performance tuning guide can be found at access.redhat.com/.../Red_Hat_Enterprise_Linux-7-Performance_Tuning_Guide-en-US.pdf.
Performance is determined by the following:
vmstat interval [count]
colums: r
= # of waiting processes that could be running,
ca
= # of context switches,
us
= % usertime,
sy
= % system time,
id
= % idle time. sar
(system accounting). uptime
(5, 10, 15 minute load averages). procinfo [-a]
(all of the above and more. vmstat interval [count]
colums: free
= amount of avail RAM,
so
= # of pages swapped. free
(check amount free, calculate %free, say with a script). swapon -s
(shows amount of swap space used).
(An excellent discussion of the Linux kernel's memory parameters you can examine and/or change can be found at www.westnet.com/~gsmith/content/linux-pdflush.htm.)
i2cdump
, iostat
, hdparm
,
and smartctl
. df
, quota
, and du
. ip -s link show
or ifconfig
(monitor your network interfaces). netstat
, ping
, nc
(netcat
),
traceroute
, lsof
, and nmap
(monitor overall network activity) named
), FTP, SSH, DB, mail, etc.
Useful tools:
ps
, top
, w
, /proc
,
signals (kill -l
, man 7 signal),
kill
, killall
, nice
, renice
,
lsof
, fuser
.
Schedule non-time sensitive jobs via cron.
Process resource limits can be controlled with:
ulimit [-a] [-H]
Where -a
= show all limits and
-H
means show hard limits.
This limits are typically set in the login scripts (or from PAM).