Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
Need help with server perforamnce/bandwith
Old 05-11-2009, 03:04 PM Need help with server perforamnce/bandwith
Junior Talker

Posts: 4
Trades: 0
Hi everyone,

We are a small start-up website in health care and need a bit of help understanding how to differentiate between more bandwidth needs vs. better server hardware.

We are running our site off of an IBM xseries 335 (yes about 6 years old) with two 2.4 ghz intel Xeons (400 FSB) and 4 GB of RAM (266 MHZ) on a network with 1.5 MB upload speed.

So, we want to invest some money on infrastructure but not sure which is a better investment: a spankin' new Dell Server (like the R200 or R300 with Dual Xeon, 6MB L2 Cache, 4 GB of 800 mhz RAM, etc...) or spend more money on a better ISP.

This is what the server is doing for the most part:
1) PHP, and lots of MYSQL connections
2) over 3,000,000 pages of (mostly dynamic) content


The site load fine now but we are trying to anticipate for the future and based on calculations it seems that not until we get to about 2 connections per second load level, are we in need of a better ISP... but again want to hear your opinions.

Thanks!
gluvsnap is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-11-2009, 04:43 PM Re: Need help with server perforamnce/bandwith
rezzy's Avatar
Super Talker

Posts: 115
Location: in the interwebz
Trades: 0
I am not an expert in any regard, but have some questions to pose.

What OS is your server using? To measure your servers performance, Linux you can use top and monitor the server load levels.

For ISP, what are you current bandwidth requirements and abilities?
__________________

Please login or register to view this content. Registration is FREE

Resnodesigns
rezzy is offline
Reply With Quote
View Public Profile
 
Old 05-12-2009, 03:41 PM Re: Need help with server perforamnce/bandwith
Junior Talker

Posts: 4
Trades: 0
Thanks for the reply.

So we are on linux (centos 5) and command top looks ok. The processor hasn't really gottent to more than 80% usage.

The problem is that we ran some load testing on the server remotely, and it seems that after 10 concurrent users, the server goes really slow. we are talking 20-30 second delays (according to the load test).

so, is that really not good as far as the server is concerned or is that primarily a bandwith issue? that's the real question.

Thanks!
gluvsnap is offline
Reply With Quote
View Public Profile
 
Old 05-12-2009, 06:07 PM Re: Need help with server perforamnce/bandwith
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Quote:
The processor hasn't really gottent to more than 80% usage.
Either it's 80% idle, or your server is under pretty much load already.
And 10 users should be a breeze to any dedicated server...

Just to help you interpret you, here is a short tutorial about how to read a top output.
Top is separated in 2 areas: the header, that gives you information about the overall health of the server, and the processes that gives you a detailed view of running programs

The header is like this:
Code:
top - 22:49:18 up 10 days, 20:05,  2 users,  load average: 0.17, 0.11, 0.02
Tasks: 425 total,   1 running, 424 sleeping,   0 stopped,   0 zombie
Cpu0  :  2.1%us,  0.5%sy,  0.5%ni, 95.1%id,  1.6%wa,  0.0%hi,  0.1%si,  0.0%st
Cpu1  :  2.1%us,  0.5%sy,  0.6%ni, 96.7%id,  0.2%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   2073728k total,  1849924k used,   223804k free,    87648k buffers
Swap:  1461904k total,   195264k used,  1266640k free,  1125400k cached
From top left to bottom right, you have:
1) The uptime for the server and how many users are logged in
2) The average load with 3 values: instant value, average at 5 minutes, average at 15 minutes
The load is a strange value in itself, in the meaning that a load of 1 for a system with 1 core means that the core is fully used.
There is no "free cycles", but nothing stays in the queue.
That means, that for a dual xeon (4 cores) a load of 4 is nothing to be too dangerous.
But obviously, the lower the better.
3) How many processes are instantiated, running, stopped (or paused) and sleeping (zombies)
4) for each cpu, how many percent of the cpu cycles are used by the user process (us), the system processes like swap (sy), niced processes (their priority have been changed) (ni), idle (id), or are waiting on something else (wa).
This wa % is usually high when your computer waits for datas to be written (or read) to the hard disks.
It means that the cpu must wait that a physical operation completes before going on.
And for the 3 next cpu % fields, I don't know what they mean, I have to admit.

What you should look (first) here, are the idle and wait values.
A low idle and high wait, there is something wrong with the hard disk. Either it's going to die, or it's over a network, or it's ridiculously slow, but it clogs your server.

At contrario, a high system or user % means that some processe(s) are taking much of the available cpu.
Look in the lower part of the window which process(s) take most of the cpu.
hint: you can refresh the process list with the space bar

5 and 6) the RAM usage, and the SWAP usage. Nothing much to look at the RAM part. Don't expect much free memory, Linux and unixes are using free ram as a cache, making the cache smaller when program needs more memory.
This means that your free memory will always stay pretty low.
But, take care of the swap value.

Remember the high WAIT cpu % value, it may be because the server takes much of his time swapping the system to the disk, then swapping it back in ram while putting the db in swap, then putting back the db in ram, but the web server in swap....
This can be the reason your server cannot handle more user: not enough ram...

As a result, it ends up swapping all the time, spending more time moving bits from ram to swap than doing a real job.

Here, for example, I have 19 Mb of swap used in a 2 Gb system. It's pretty reasonable (especially giving all the services that are running on it)
If you see more than 100 Mb being used by the swap, then you need more ram.
Or you need to stop some services from the server, but usually, you need more ram.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 05-13-2009, 05:37 AM Re: Need help with server perforamnce/bandwith
HQHost.net's Avatar
Skilled Talker

Posts: 67
Trades: 0
Quote:
So, we want to invest some money on infrastructure but not sure which is a better investment: a spankin' new Dell Server (like the R200 or R300 with Dual Xeon, 6MB L2 Cache, 4 GB of 800 mhz RAM, etc...) or spend more money on a better ISP.
If you are thinking about upgrade, then plan both hardware and network upgrade, 'cause these are absolutely different stuff, I'd start with hardware upgrade dedinitely and later would move to bandwidth.

Quote:
so, is that really not good as far as the server is concerned or is that primarily a bandwith issue?
You can check it using a download file and downloading it at different locations in the world, just post it here and ask forum members to do it for you or use any traceroute service.

If you are worried bandwidth providers, use the one that operates where the majority of your site visitors located.
__________________

Please login or register to view this content. Registration is FREE
HQHost.net is offline
Reply With Quote
View Public Profile
 
Old 05-13-2009, 02:53 PM Re: Need help with server perforamnce/bandwith
Junior Talker

Posts: 4
Trades: 0
Well thank you to all of you for taking the time to reply to this post.

We have been really studying the server and your suggestions, and after running top on the machine again and running some load testing remotely, it seems that the problem is with both!

The only concern is that these remote load testers can be very difficult to interpret. They tested 10, 20, 30 concurrent connections and the delay went up to about 40 seconds on the 30 connections. So, not sure if it was the server or the bandwith.

Anyway, per your suggestion, here is our web address and we would be grateful if those who have a second to spare can tell us how the pages are loading for them from where they are. Our primarly customer focus is of course the US.

Thanks again
gluvsnap is offline
Reply With Quote
View Public Profile
 
Old 05-13-2009, 03:18 PM Re: Need help with server perforamnce/bandwith
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
The first page took between 480ms and 1.8s to load for me.
I'm located in Switzerland, at the center of Europe.

If you have a linux machine at hand, you can benchmark the reaction time yourself.
use "ab" (apache benchmark, only available on linux, as far as I know) to do so.
It can simulate simultaneous users connecting to your server, and gives you back statistics about the mean answer time.

Here is a tutorial, take what you need from it:
http://www.cyberciti.biz/tips/howto-...eb-server.html
You can see there too:
http://blog.olenepal.org/index.php/archives/300
Quote:
For example:
$ ab -n 10 -c 10 http://www.yourdomain.com/index.html
Will have 10 concurrent users and 10 request of get index.html on your web server.
I ran this on your home page:
Code:
ab -n 40 -c 10 http://www.gluvsnap.com/home/
So, it's 40 users, with 10 simultaneous connections.
Here is the result:
Code:
root@devp4:~/# ab -n 40 -c 10 http://www.gluvsnap.com/home/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.gluvsnap.com (be patient).....done


Server Software:        Apache/2.2.3
Server Hostname:        www.gluvsnap.com
Server Port:            80

Document Path:          /home/
Document Length:        5345 bytes

Concurrency Level:      10
Time taken for tests:   2.559 seconds
Complete requests:      40
Failed requests:        0
Write errors:           0
Total transferred:      228720 bytes
HTML transferred:       213800 bytes
Requests per second:    15.63 [#/sec] (mean)
Time per request:       639.820 [ms] (mean)
Time per request:       63.982 [ms] (mean, across all concurrent requests)
Transfer rate:          87.27 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:      207  223  16.9    221     287
Processing:   249  339  94.0    303     694
Waiting:      231  317  91.9    280     675
Total:        476  561  94.4    524     917

Percentage of the requests served within a certain time (ms)
  50%    524
  66%    540
  75%    570
  80%    606
  90%    722
  95%    784
  98%    917
  99%    917
 100%    917 (longest request)
__________________
Only a biker knows why a dog sticks his head out the window.

Last edited by tripy; 05-13-2009 at 03:27 PM..
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 05-16-2009, 06:00 PM Re: Need help with server perforamnce/bandwith
Junior Talker

Posts: 1
Name: Jae Cho
Trades: 0
increasing server performance and bandwidth is of utmost importance.

Richmond Hill Dentist
jae_cho08 is offline
Reply With Quote
View Public Profile Visit jae_cho08's homepage!
 
Old 05-19-2009, 03:03 PM Re: Need help with server perforamnce/bandwith
L a r r y's Avatar
Super Talker

Posts: 100
Name: Larry K
Location: Arizona
Trades: 0
I have learned something today! Thank you Tripy for the "top" and "ab" commands. I maintain a Linux computer for my desktop, and manage a club web site on shared hosting. These tools will be very handy.
L a r r y is offline
Reply With Quote
View Public Profile Visit L a r r y's homepage!
 
Old 05-19-2009, 11:37 PM Re: Need help with server perforamnce/bandwith
Novice Talker

Posts: 8
Name: Tony
Trades: 0
Quote:
Originally Posted by gluvsnap View Post
Well thank you to all of you for taking the time to reply to this post.

We have been really studying the server and your suggestions, and after running top on the machine again and running some load testing remotely, it seems that the problem is with both!

The only concern is that these remote load testers can be very difficult to interpret. They tested 10, 20, 30 concurrent connections and the delay went up to about 40 seconds on the 30 connections. So, not sure if it was the server or the bandwith.

Anyway, per your suggestion, here is our web address and we would be grateful if those who have a second to spare can tell us how the pages are loading for them from where they are. Our primarly customer focus is of course the US.

Thanks again
Pages load fast. Looks like you are in good shape.
__________________
Tony S.
"
Please login or register to view this content. Registration is FREE
offers a chance for us to easily tap into the views and opinions of our readers,"
tonys333 is offline
Reply With Quote
View Public Profile Visit tonys333's homepage!
 
Old 05-26-2009, 09:45 AM Re: Need help with server perforamnce/bandwith
warfie's Avatar
Novice Talker

Posts: 5
Name: James Wyatt-Carter
Location: Chiang Mai, Thailand
Trades: 0
sounds like the server is quite adequate... best spend the money on a better ISP
__________________
if you never shut-up, you'll only hear what you already know.

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
warfie is offline
Reply With Quote
View Public Profile Visit warfie's homepage!
 
Old 05-27-2009, 07:25 AM Re: Need help with server perforamnce/bandwith
damien_ls's Avatar
Layershift

Posts: 474
Name: Damien
Trades: 0
Well, some good advice here, but I'm also a little (lot) puzzled that despite the concern that bandwidth usage may be becoming saturatured, nobody has mentioned the possibility of measuring this.

First, I'm a bit confused by why you're running this of a 1.5Mbps connection rather than colocating your server in a proper datacentre facility; it will be far cheaper and will give you the additional benefits of security, cooling (with redundancy), fault-tolerant power, high availability + choice of bandwidth carriers etc.

That aside, you should measure bandwidth utilisation, and in fact the best way to do this would be to setup cacti to query your switch port (I'm assuming that you have a your server connected to a snmp capable switch right?).

By default it will poll every 5 minutes, and therefore you'll see graphs based on an average over a 5 minute period - but actually you might like to reconfigure it to poll every minute and generate graphs accordingly. You should check this thread on the cacti forums for details about how to do that (particularly the posts by 'tekbot').

If you graph your actual usage, you can see exactly how your utilisation is working out, and will be able to see visually if/when a bandwidth upgrade becomes necessary. Of course this only shows part of the picture, because it doesn't tell you if your ISP has some upstream contention (and/or bad peering etc.) which might be causing service degradation for your server connectivity!

Since you're considering upgrading your hardware, you should also consider if renting will work out more cost-effective for you. I don't think you mentioned where you're located, but for example here in the UK it can cost almost as much to colocate a single server as it would to rent a similar spec. (plus when renting you don't have the capex or the worry or needing to source/fit replacement parts in case of hardware failure).

Before a hardware upgrade, it's important to consider if it's actually necessary (note: newer hardware will use less power, so if colocating - and perhaps even if not - it may still be more cost-effective to switch to a newer model; also what condition are those hard disks in... are they about to fail if you've had them under heavy strain for so long?). The comments from other members will help you review how your server is coping, but again what seems to have been missed is potential opportunities to optimise your services/application.

From what you've said, the majority of the work performed by your server is probably handled by MySQL, in which case you should review its configuration to ensure that you're getting the best out of it. You need to consider cache sizes, and perhaps more importantly enable the slow query log to review (some of the) queries which may require optimisation.

You can also (often) gain a lot of scalability by deploying memcached and using it to intelligently cache frequent database queries. This is far more effective than using the MySQL query cache because you can use it selectively to only cache (and only check the cache) for certain queries - and of course complete control over when those cache entries are expired. The MySQL query cache will try to cache everything (depending on the mode you put it in) and will always refer to the query cache when you run a new query to try to find the result there or to invalidate any applicable results; that can be a waste of resources if that query is never cached or never going to invalidate anything etc.
__________________

Please login or register to view this content. Registration is FREE
:: DDS & Dedicated, UK & USA-based
Please login or register to view this content. Registration is FREE
, Reseller & Shared Hosting
Experienced Parallels Platinum Partners (Plesk since 2001, Virtuozzo since 2003)
damien_ls is offline
Reply With Quote
View Public Profile
 
Old 07-09-2009, 12:57 PM Re: Need help with server perforamnce/bandwith
Junior Talker

Posts: 4
Trades: 0
Thanks to everyone who helped out with this thread.

Our site's growth has been very aggressive and we are now running the site off several servers from a colocation to handle our traffic - burstable to 100mps...

We did some major upgrades with our servers as well btw: switched to several IBM xseries 336's with dual xeon 3.6's and 8gb of ram each... Truely superb servers - lightning fast and extremely reliable. Highly recommend it. I've been in the IT business for a long time and have never seen more reliable servers than these.

Things are running very smoothly now but I think at this rate of growth we will be moving over to rackspace and letting them handle the load balancing and the other IT needs.
gluvsnap is offline
Reply With Quote
View Public Profile
 
Old 07-09-2009, 01:45 PM Re: Need help with server perforamnce/bandwith
hairygunther's Avatar
Extreme Talker

Posts: 164
Trades: 0
Quote:
over 3,000,000 pages of (mostly dynamic) content
One way to cut down enormously on processing would be to 'press' those dynamic pages out into static content, i.e. as close to html as possible. You can even continue to use the script suffixes, just write new scripts which simply open up the filename derived from the dynamic query.

I call this "reverse engineering" the dynamic content, I don't know if there are any official or better words/phrases for it.
__________________
I acknowledge Parker out of Thunderbirds and Glaxo Industries.
hairygunther is offline
Reply With Quote
View Public Profile
 
Old 07-09-2009, 02:08 PM Re: Need help with server perforamnce/bandwith
damien_ls's Avatar
Layershift

Posts: 474
Name: Damien
Trades: 0
Quote:
Originally Posted by hairygunther View Post
I call this "reverse engineering" the dynamic content, I don't know if there are any official or better words/phrases for it.
Caching? That's more or less what I referred to previously with respect to memcached.
__________________

Please login or register to view this content. Registration is FREE
:: DDS & Dedicated, UK & USA-based
Please login or register to view this content. Registration is FREE
, Reseller & Shared Hosting
Experienced Parallels Platinum Partners (Plesk since 2001, Virtuozzo since 2003)
damien_ls is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Need help with server perforamnce/bandwith
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.54701 seconds with 12 queries