Forum Moderators: bakedjake

Message Too Old, No Replies

Cause of server slowdown

Need help finding the cause of server slowing down

         

d3vrandom

5:10 pm on Jul 23, 2007 (gmt 0)

10+ Year Member



hi

I bought a linux (cent os 4) vps with 128MB RAM on a 5Mbps connection. I am hosting just one proxy site using lighttpd and it uses about a Gigabyte of bandwidth per day. It gets between 500-900 uniques per day. The problem I am having is that the site is very slow even though it is not using much ram or cpu resources:

top:
----
top - 21:04:04 up 4:18, 0 users, load average: 0.02, 0.01, 0.00
Tasks: 18 total, 2 running, 16 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.2% us, 0.0% sy, 0.0% ni, 99.8% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 262144k total, 39200k used, 222944k free, 0k buffers
Swap: 0k total, 0k used, 0k free, 0k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
13565 admin 15 0 17540 7984 5372 S 0.3 3.0 8:32.33 php-cgi
1 root 15 0 1696 604 520 S 0.0 0.2 0:00.42 init
7277 root 15 0 6916 2260 1820 R 0.0 0.9 0:00.01 sshd
7303 root 15 0 2224 1304 1064 S 0.0 0.5 0:00.00 bash
7340 root 15 0 1952 968 788 R 0.0 0.4 0:00.00 top
11414 root 18 0 1596 548 456 S 0.0 0.2 0:00.12 syslogd
11638 root 15 0 4068 1144 840 S 0.0 0.4 0:00.04 sshd
11861 root 19 0 2148 816 684 S 0.0 0.3 0:00.01 xinetd
12244 tinydns 15 0 2540 356 284 S 0.0 0.1 0:00.07 tinydns
12245 dnscache 18 0 3724 1552 500 S 0.0 0.6 0:00.03 dnscache
13546 apache 15 0 11376 8776 1284 S 0.0 3.3 0:13.50 lighttpd
13558 admin 18 0 16556 5680 4036 S 0.0 2.2 0:00.00 php-cgi
13653 root 16 0 2224 1116 964 S 0.0 0.4 0:00.00 sh
13704 root 18 0 3468 1368 1108 S 0.0 0.5 0:00.05 lxadmin.exe
13796 lxlabs 15 0 3828 864 516 S 0.0 0.3 0:00.87 lxadmin.httpd
13903 root 21 0 2220 1140 972 S 0.0 0.4 0:00.00 mysqld_safe
14090 mysql 18 0 11640 4328 3416 S 0.0 1.7 0:00.06 mysqld

------------

openvz-free.sh
-----------

privvmpages usage: 38 MB (14%)
privvmpages usage: 39088 KB (14%)

What could be the cause of the slowdown? Is it the 5mbps connection? How can I be sure?

Thanks

jshen

8:17 pm on Jul 27, 2007 (gmt 0)

10+ Year Member



I'm going to guess that it's the network and not the machine. Are the pages html or dynamic? If dynamic, are plain html pages (of the same size) also slow?

d3vrandom

7:06 pm on Jul 28, 2007 (gmt 0)

10+ Year Member



The pages are all dynamic. IT hosts two proxies running phproxy. Recently I added a second one after traffic declined on the first.

wheel

3:26 pm on Jul 30, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The next step is to run a traceroute to your machine. This should give the delay in milliseconds for every step of the way from the machine you're running the trace from through to your server.

There's online resources that will run a trace to your machine, and I think there's a windows command that does it as well so you can run it from your desktop.

I would say that 20ms to 60ms is in the reasonable range of what you should see. If you run a traceroute and see in the last few steps that the times go to 100+ms, then you know you've got a delay locally, and it's time to call your datacenter.

The lite version of traceroute is ping, which will give you total time to your server. Bring up a command prompt and type:
ping www.yourdomain.com
Again, you should see two digit times, three digit times means you've got delays getting too the machine.