(866) 366-3640 - support@sagonet.com
Sago Logo
Banner



   
Log in / create account Article Discussion History Go to the site toolbox
Why is my server slow?

Slow Hardware?

Server acting slow? There could be a lot of things going on. Once of the first things to check is hardware. Ask yourself, what is slow about the server? The network functions? Loading webpages? Disk access?

Example 1:

$ mii-tool
eth0: negotiated 10baseT-HD, link ok

This example looks like the server's nic is not negotiating. Put in a support ticket so we can check the cable and switch.


Example 2:

$ hdparm -tT /dev/hda
/dev/hda:
Timing cached reads:   382 MB in  2.01 seconds = 190.21 MB/sec
Timing buffered disk reads:  120 MB in  3.00 seconds =  39.95 MB/sec

These are about normal, if you are less than 40MB/sec on that second read, it could be and indication of a bad disk


Example 3:

$ free -m
            total       used       free     shared    buffers     cached
Mem:           948        816        131          0          6        483
-/+ buffers/cache:        326        621
Swap:         2933         33       2900

This example you can see that there are only 33 megabytes of swap used, which is fine. If this were high I would be worried about runaway processes or maybe think about upgrading my ram.



High Load?

see more at High Server Loads and You

If you can eliminate the possibility that the server's hardware is slow, then take a look at the load the server is currently experiencing. Are there a lot of simultaneous connections?

Example 1:

$ w
19:38:53 up 75 days, 22:13,  4 users,  load average: 0.01, 0.01, 0.00
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT

This server is under very low load (.01). If it is going slow, there may be something else wrong.

Example 2: (Taken from an apache status page)

.KWRRRRRRRRRRRRRRRRRRRRRRR.RRRRRRRRRRRR.RRRRRRRRRRRRRRRRRR_RRRRR
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR.RRR
RRRRRRRRRRRRKRRRRRRRRRRRRRRRRRRRRRRRRRR.RRWRRRRRRRRRRRRRRRRRRRRR
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR.RRRRRRRRRRRRRRRRRRRR.R

This example is shows an apache server "Reading" a lot. Probably a sign of a bad disk, or a misconfigured apache. Symptoms of this would be extremely long load times on webpages.


Example 3: (Again from an apache status page)

WW.W.W_WKKW.KWWK_KKKK..K.KW.K..KWWKKKKKKKKW.WWKKKKKKK_KK..WWRWK
WW.W.WK..K.KW.K..KWWKKKKKKK_KK..KWW_WKKKWK_WKKW.KWWK_KKKW.WKWKW.
_KK..KWW_WKKKWKW.WKWW.W.WK..K.KW.K..KWWKKKKKKK_KKW.KWKW.KWKW.KW
WKKKKKKKKW.WWKKKWKKKKKKKKW.WWKKKWKKKKKKKKW.WWKKKWKKKWKKKWKKKWKK

This apache stats page would make me think that keep-alives should be turn off, or that the number of max clients should be bumped. Almost all the connection slots are full, but turning off keep-alives would make them re-open quicker.