My DA servers seem randomly slow.

Manie

Verified User
Joined
Jul 18, 2006
Messages
121
Location
Utrecht / Netherlands
Dear All,
I got 2 servers with DA installed.
On both servers I got people complaining their sites sometimes load extreme slow. So I was looking into it.

Server 1: Virtual hosting server.
Server 2: Colocated Server. (For virtual hosting, but not ours :)

Totally different hardware systems.

Server 1: Debian Sarge + Default DirectAdmin Install + PHP 5.
Server 2: Debian Etch + Default DirectAdmin Install.

First I tought it being something with MySQL on server 1.
But after some tweaking and still randomly (sometimes it takes 10 minutes clicking before a slow loading page is detected.)

Since server 2 kicked in with the same complaint I ran trough every DA documentation I could find. Now I added 127.0.0.1 to the resolv.conf on both servers, was hoping that would do the trick. It hoped that would do the trick, but seems not.

Also enoing became the SSH window trough putty did become slow on Server 1 now and then. Typing "uptime" takes 1 sec for "up" and additional 10 secs for "time" to be typed.

Server 2 doesn't seem to have this problem. And I can't really test if that server has troubles since resolv.conf was editted.

Uptime and Top both show no load or what so ever.
Also investigated the network, but no routing problems or loss. (would have noticed this on other servers also.)

Anyone got a clue where I should look into now?
Already rootkitted it. No hacks.

Last thing I got in my mind is the replace cables :P But that seems really odd to me.

Regards,
Armand
 
have you tried uploading a test file to your servers then downloading it to see what kind ow bandwidth you get out of them?
 
Dear Jissh,

I have tried uploading a 600MB file.
On the trouble server it sometimes dropt from 42kb/s to 2kb/s or even 0kb/s.

Which tool should I use to monitor my utp port?
This probably is a cable issue?

Regards,
Armand
 
Ntop is a great idea.

On virtual servers there's often not a lot of memory assigned to each virtual container.

Once the (virtual) server runs out memory it uses swap memory. Swapping to hard disk is extremely slow and can cause the server to slow to a crawl.

So the first step is probably to use top to see how much swap memory is being used.

Jeff
 
Thanks Jlasman,

First I installed ntop, nice looking tool.
Can anyone point out suspeciouse lines and/or figures I should take notice of?

( Doesn't see anything odd myself.)

about top:

top - 20:50:14 up 143 days, 11:00, 1 user, load average: 0.05, 0.01, 0.00

Tasks: 91 total, 1 running, 90 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0% user, 0.3% system, 0.0% nice, 99.7% idle

Mem:
905384k total,
792296k used,
113088k free,
110420k buffers

Swap:
1951736k total,
22300k used,
1929436k free,
471712k cached

Regards,
Armand
 
I don't see anything wrong. Can you restart some services to see if the swap memory used goes down?

Good candidates are httpd, mysqld, and exim.

Jeff
 
Isn't in the swap memory I suppose :-(

top - 21:02:24 up 143 days, 11:12, 1 user, load average: 0.00, 0.00, 0.00
Tasks: 95 total, 1 running, 94 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0% user, 0.3% system, 0.0% nice, 99.7% idle
Mem: 905384k total, 812468k used, 92916k free, 110848k buffers
Swap: 1951736k total, 22300k used, 1929436k free, 473312k cached

apachectl restart

top - 21:02:42 up 143 days, 11:12, 1 user, load average: 0.00, 0.00, 0.00
Tasks: 87 total, 1 running, 86 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.7% user, 0.0% system, 0.0% nice, 99.2% idle
Mem: 905384k total, 749928k used, 155456k free, 110868k buffers
Swap: 1951736k total, 22300k used, 1929436k free, 473156k cached

/etc/init.d/mysqld restart


top - 21:03:46 up 143 days, 11:13, 1 user, load average: 0.00, 0.00, 0.00
Tasks: 92 total, 1 running, 91 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.7% user, 0.0% system, 0.0% nice, 99.2% idle
Mem: 905384k total, 756572k used, 148812k free, 110924k buffers
Swap: 1951736k total, 22300k used, 1929436k free, 475360k cached

exim restart

top - 21:06:08 up 143 days, 11:16, 1 user, load average: 0.00, 0.00, 0.00
Tasks: 102 total, 1 running, 101 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.7% user, 0.0% system, 0.0% nice, 99.2% idle
Mem: 905384k total, 771772k used, 133612k free, 111028k buffers
Swap: 1951736k total, 22300k used, 1929436k free, 475540k cached
 
Also check to make sure that the ethernet port on your server and the one on your router are both set for the same settings. Auto negotiate is not a good idea on a server.

Jeff
 
Has datacenter changed switch to Gigabit ?
Gb need 4 pairs cables (250Mbps on each UTP5 pair on 25m), Fast-Ethernet only 2 pair.

Just ask because it's a common trouble if your bandwith decrease and timeout, and run again, for such a case.

Sometimes datacenters are not tip top with technology.
this case interest me.
 
Just out of curiosity... did the new cable and the fixed network card setting to 100Mbit solve the problem? I seem to have similar random slowdowns of late. Lasts from half an hour to a whole hour and then suddenly it's full speed again.

Logs from exim, httpd, secure, apf/bfd, messages show nothing out of the ordinary, no swap is being used at all. This is a dedicated server, not virtual hosting.

Quite odd and a bit worrying, since I can't find the cause and hence can't fix it...

I can't judge about the gigabit switch, so if that is the way to look (from your experience) then I will have to drop by the datacenter to look into that.

Thanks,

Harro
 
In general the issues to look at are swap memory (none to only a bit is good), your switch port and cable (see if you can either/or/both changed), and making sure both switch and server are set the same (no autonegotiate).

On December 13 Manie posted that everything seemed okay after he changed the cable and the port settings.

It never stops amazing me how we spend $40 for a cable set for our stereo, and under $5 for our data center ;) .

Jeff
 
As I typed, when changed those 2 parts (100mbit instead of auto neg. and new cable) it seems to have gone.

Personally I think it was the cable, but heck, what do I care as long as it's working now ^_^
if you can, try both!
 
Thanks guys, I will change the cable and look into how to switch off the auto-negotiate (used to be a dos-util on a boot-disk, but I hope this can now be done on the fly ;) ).

As you said Jeff... it's interesting that we often economise on things that are the most important.
 
Yes, last week I spent $500 on fixing up my car but didn't ask the mechanic to check the hoses. Yesterday I was at a barbecue hosted at one of my godsons' home, and the radiator hose cracked.

Fortunately another godson was able to do the repair, using a new hose we bought locally.

Otherwise I would have needed a ride home (60 miles), then a ride back on Tuesday (after the holiday Monday), a tow to a mechanic I didn't know, and a $100 repair.

From now on I have my mechanic check everything each time I visit :) .

Jeff
 
Back
Top