This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Webmaster forum > January 2005 > Benefits of dual CPU for a web server





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Benefits of dual CPU for a web server
Ignoramus18155

2005-01-24, 7:21 pm

I am going to buy a new rackmount server for my websites. They will
run under Linux. My question is, is there a tangible benefit from
using a DUAL CPU, in the context of a webserver, mail server, etc.

Seems like yes, but I want to hear from people with some experience.

i
SpaceGirl

2005-01-24, 7:21 pm

Ignoramus18155 wrote:
> I am going to buy a new rackmount server for my websites. They will
> run under Linux. My question is, is there a tangible benefit from
> using a DUAL CPU, in the context of a webserver, mail server, etc.
>
> Seems like yes, but I want to hear from people with some experience.
>
> i


Wellll. Really depends what is going to be done on it. Dual is useful if
you are running particuarly intense database queries as it helps stop
the server grinding to a halt because the single CPU is very busy. It's
less likely that a rogue process will bring the machine down as well as
it'll only hang up one CPU, so you get some psuedo redundency from that.
I'm not sure how smart each Web Server is at splitting tasks across two
CPUs; I'm pretty sure IIS is stuck to one CPU, but SQLServer can be told
WHICH CPU to use (pick the 2nd one) and/or to split its load across two
CPUs, so massively increasing "stuff that can be done at once". I guess
Linux also does this sort of thing, but I dunno how it load balances.

--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
Dances With Crows

2005-01-24, 7:21 pm

["Followup-To:" header set to comp.os.linux.hardware.]
On Mon, 24 Jan 2005 16:34:07 +0000, SpaceGirl staggered into the Black
Sun and said:
> Ignoramus18155 wrote:
> Wellll. Really depends what is going to be done on it. Dual is useful if
> you are running particuarly intense database queries


Yep. You won't see much (if any) benefit from serving static content,
since that's not very CPU-intensive and seems to be bandwidth-limited in
most cases.

> I'm not sure how smart each Web Server is at splitting tasks across
> two CPUs; I'm pretty sure IIS is stuck to one CPU


Ignoramus18155 is using Linux to run his webservers; therefore IIS and
MS SQL Swerver are irrelevant.

> Linux also does this sort of thing, but I dunno how it load balances.


Each CPU can run one process. When Apache starts, it spawns one
"master" process and a configurable number of "slave" processes (default
5.) The slave processes do all the work of serving HTTP requests. If
you have 2 CPUs, 2 Apache slave processes can run at the same time.
This can increase performance. It's more likely that Ignoramus18155 is
using MySQL/Postgres/Sybase/Orrible as a database backend, though.
Having 2 CPUs in that case would allow the database to run at the same
time as an Apache slave process, instead of having the database
time-share the CPU with the Apache slave process. That would almost
certainly improve performance, particularly if the queries are complex
and/or require a lot of I/O.

Ignoramus18155, if you gave us some more specifics on exactly what it is
you're doing, you might receive some useful performance-tuning tips.
HTH,

--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin / mail: TRAP + SPAN don't belong
http://www.brainbench.com / Hire me!
-----------------------------/ http://crow202.dyndns.org/~mhgraham/resume
John-Paul Stewart

2005-01-24, 7:21 pm

Ignoramus18155 wrote:
> I am going to buy a new rackmount server for my websites. They will
> run under Linux. My question is, is there a tangible benefit from
> using a DUAL CPU, in the context of a webserver, mail server, etc.
>
> Seems like yes, but I want to hear from people with some experience.


It all depends on how much traffic you're serving, whether that content
is dynamic or static (dynamic content takes more CPU power, obviously),
how fast your connection to the Internet is (a single modern CPU can
easily max out a slow connection) and many other factors.

If you're serving just web content, you can serve up a fair bit with
just one CPU. OTOH, if the one machine is your webserver, your mail
server, and your database server, then obviously dual CPUs will be of
more benefit than if you were serving the same amount of web content
from a dedicated box with other dedicated boxes for the other tasks.
Ignoramus18155

2005-01-24, 7:21 pm

On Mon, 24 Jan 2005 11:37:57 -0500, John-Paul Stewart <jpstewart@binaryfoundry.ca> wrote:
> Ignoramus18155 wrote:
>
> It all depends on how much traffic you're serving, whether that
> content


About 10-20GB per month

> is dynamic or static (dynamic content takes more CPU power, obviously),


Almost all dynamic, perl, mod_perl, Embperl, plus pictures.

This machine is also a heavily loaded mailserver, tens of thousands of
messages per day.

> how fast your connection to the Internet is (a single modern CPU can
> easily max out a slow connection) and many other factors.


I will colocate it, so, it will be fast enough connection.

> If you're serving just web content, you can serve up a fair bit with
> just one CPU. OTOH, if the one machine is your webserver, your mail
> server, and your database server, then obviously dual CPUs will be
> of more benefit than if you were serving the same amount of web
> content from a dedicated box with other dedicated boxes for the
> other tasks.


How stable is dual CPU under linux. I do not want unpleasant
surprises.

Thanks!

i

--
John-Paul Stewart

2005-01-24, 7:21 pm

Ignoramus18155 wrote:
> This machine is also a heavily loaded mailserver, tens of thousands of
> messages per day.


That alone indicates that two CPUs would be a good investment.
Personally, I'd go one step further and run seperate web and mail
servers, but you may have other considerations forcing the use of a
single machine.

> How stable is dual CPU under linux. I do not want unpleasant
> surprises.


I've run a handful of dual CPU systems (in a variety of roles) and never
had a problem with SMP. I've got a trio of systems that have been up
and running for 254 days at 100% CPU load (they all run the
distributed.net client when they're not doing any real work), for example.

I've also seen Linux run on much larger system (many more than two CPUs)
without any problem related to the number of CPUs.

Matt Probert

2005-01-24, 7:21 pm

Once upon a time, far far away, the king summoned Ignoramus18155
<ignoramus18155@NOSPAM.18155.invalid> who replied:

>I am going to buy a new rackmount server for my websites. They will
>run under Linux. My question is, is there a tangible benefit from
>using a DUAL CPU, in the context of a webserver, mail server, etc.
>
>Seems like yes, but I want to hear from people with some experience.
>
>i


You'd be better off thinking in terms of the http server. If you are
running a really intensive site, then don't think Apache, get a decent
http server.

But what are you running? My gut feeling is you'd be fine with a
low-cost RAQ 4 server and Apache.

Matt

--
Free, high quality content for web sites. See
http://www.probertencyclopaedia.com/xcont.htm
Matt Probert

2005-01-24, 7:21 pm

Once upon a time, far far away, the king summoned Ignoramus18155
<ignoramus18155@NOSPAM.18155.invalid> who replied:

>
>About 10-20GB per month


That's nothing.

>
>
>Almost all dynamic, perl, mod_perl, Embperl, plus pictures.


No problem.

>
>This machine is also a heavily loaded mailserver, tens of thousands of
>messages per day.


Again, that's nothing.

We handle 4gB a day, and over 50,000 pages (which are not small) every
day and over 400,000 http requests (pages, pictures, CSS files &c)
every day all on a cheap RAQ 4 server with Apache.

Matt

--
Free, high quality content for web sites. See
http://www.probertencyclopaedia.com/xcont.htm
Jean-David Beyer

2005-01-24, 7:21 pm

Ignoramus18155 wrote (in part):

> How stable is dual CPU under linux. I do not want unpleasant surprises.
>
>

I think you will find it OK.

I got an SMP machine (from VA Linux Systems) early in 2000. It came with
Red Hat Linux 6.0 and I ran that until RHL 6.2 came out. I ran that until
RHL 7.3 came out. I ran that until I stuck Fedora Core 2 on it. I did not
like FC2, but it had nothing to do with crashing. I now have RHL 9 running
on it. RHL9 had never crashed on that machine, but that was only installed
late October 2004, so I am not sure what to say about that.

IIRC, I had trouble with the X Window System locking up in RHL6.0.
Checking my logbooks for that machine, I got a crash June 26, 2000, and
another one November 22, 2000, and yet another December 26, 2000.

January 7, 2001 I found the front 120mm air intake fan was blowing out
instead of in, making for hot spots inside the machine. I reversed the fan
and that seems to have improved matters (but not completely). I was up to
kernel 2.2.18pre-11-va2.smp.i686.rpm by then.

Somewhere around June 15, 2002 I installed RHL 7.3. It did not crash until
September 12, 2002. In October, kernel 2.4.18-17.7x came in. Crashed next
March 3, 2003.
June 3, 2003: new kernel 2.4.20-18.7.i686.rp,
Crashed June 17, 2003.
Never crashed after that.
It was 2004 October 4 that I tried to put Fedora Core 2 in there.


This machine I built and started it up last March (2004). It is dual
hyperthreaded 3.06GHz Xeon processors running Red Hat Enterprise Linux 3 ES.

I had problems with demand dialing on my ppp0 dial-up modem for a while.
As far as I can tell from my logbook, it has never crashed. This agrees
with my memory. It almost did when the main air intake fan seized up, but
I noticed it in the output of the sensors package, and the screaming of
the fans on the Xeon processors (temperature controlled speed).

Both machines run 24/7 except when I stick in a new kernel, power down to
fix hardware (had to replace large cooling fan), and if I fiddle with
fdisk. When I stick in a new partition, the easiest way to get /etc/mtab
fixed is to reboot. Only 4 days, below, because that is when Red Hat
distributed a new kernel: kernel-smp-2.4.21-27.0.2.EL.

The longest I had an SMP machine up was my VA Linux Systems one; running
RHL7.3 it was up around 180 days. This I am sure is not a record, but it
was for me. I took it down to install RHL9 (and, grudgingly, W-XP-Home).


--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ PGP-Key: 9A2FC99A Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 13:50:00 up 4 days, 22:03, 4 users, load average: 3.22, 3.20, 3.48

Dave Patton

2005-01-24, 7:21 pm

comments@probertencyclopaedia.com (Matt Probert) wrote in
news:41f54691.7738807@news.ntlworld.com:

> If you are
> running a really intensive site, then don't think Apache, get a decent
> http server.


Matt - can you explain your comment in more detail please?

--
Dave Patton
Canadian Coordinator, Degree Confluence Project
http://www.confluence.org/
My website: http://members.shaw.ca/davepatton/
Christopher Browne

2005-01-24, 7:21 pm

Oops! Ignoramus18155 <ignoramus18155@NOSPAM.18155.invalid> was seen spray-painting on a wall:
> I am going to buy a new rackmount server for my websites. They will
> run under Linux. My question is, is there a tangible benefit from
> using a DUAL CPU, in the context of a webserver, mail server, etc.
>
> Seems like yes, but I want to hear from people with some experience.


It may help, or it may not. It all depends on whether or not your
processes are occasionally CPU bound.

If they are, you will get improved throughput.

If your processes are I/O bound, then you will see little or no
improvement in performance.

Note that I am speaking in general about I/O; that could be:
a) Disk I/O
b) Network I/O
c) Possibly even memory bandwidth

It is entirely possible that your bottlenecks are all about I/O, and
in that case, adding a CPU will not alleviate the bottleneck.

Throwing the ball back in your court, do you find that your web server
or mail server has a very high load average due to CPU usage being
maxxed out?

If not, then it is unlikely that adding a CPU will help.

If so, then have you verified that adding memory wouldn't "do the
trick?"
--
If this was helpful, <http://svcs.affero.net/rm.php?r=cbbrowne> rate me
http://cbbrowne.com/info/emacs.html
Rules of the Evil Overlord #210. "All guest-quarters will be bugged
and monitored so that I can keep track of what the visitors I have for
some reason allowed to roam about my fortress are actually plotting."
<http://www.eviloverlord.com/>
Toby Inkster

2005-01-24, 7:21 pm

Ignoramus18155 wrote:

> How stable is dual CPU under linux. I do not want unpleasant
> surprises.


[tai@ophelia ~]$ cat /proc/cpuinfo ; uptime
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 8
model name : Pentium III (Coppermine)
stepping : 6
cpu MHz : 996.852
cache size : 256 KB
physical id : 0
siblings : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse
runqueue : 0

bogomips : 1985.74

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 8
model name : Pentium III (Coppermine)
stepping : 6
cpu MHz : 996.852
cache size : 256 KB
physical id : 0
siblings : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse
runqueue : 1

bogomips : 1992.29

21:09:48 up 53 days, 13:24, 5 users, load average: 94.02, 94.06, 93.22


(Excuse the high load levels. I seem to have a couple of runaway processes
that need bringing under control!)

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Chris Hope

2005-01-24, 7:21 pm

Toby Inkster wrote:

> Ignoramus18155 wrote:
>
>
> [tai@ophelia ~]$ cat /proc/cpuinfo ; uptime


[snip]

> 21:09:48 up 53 days, 13:24, 5 users, load average: 94.02, 94.06,
> 93.22
>
> (Excuse the high load levels. I seem to have a couple of runaway
> processes that need bringing under control!)


Yikes, those are high!

--
Chris Hope - The Electric Toolbox - http://www.electrictoolbox.com/
TCS

2005-01-24, 7:21 pm

On Tue, 25 Jan 2005 11:09:16 +1300, Chris Hope <blackhole@electrictoolbox.com> wrote:
>Toby Inkster wrote:


[color=darkred]
>[snip]


[color=darkred]
>Yikes, those are high!


On a web server, they might not be. They are indicating that there are
94 processes ready to run. On a system doing a thousand concurrent
transactions, having 94 ready to run might not be so bad.
Chris Hope

2005-01-24, 7:21 pm

TCS wrote:

> On Tue, 25 Jan 2005 11:09:16 +1300, Chris Hope
> <blackhole@electrictoolbox.com> wrote:
>
>
>
>
>
> On a web server, they might not be. They are indicating that there
> are
> 94 processes ready to run. On a system doing a thousand concurrent
> transactions, having 94 ready to run might not be so bad.


True, although I've never seen load levels higher then about 25 on any
of the web servers I manage (they're single CPU so I guess that would
be the equivilent of 50 on a dual CPU).

--
Chris Hope - The Electric Toolbox - http://www.electrictoolbox.com/
Ignoramus18155

2005-01-24, 7:21 pm

On Mon, 24 Jan 2005 13:13:13 -0500, John-Paul Stewart <jpstewart@binaryfoundry.ca> wrote:
> Ignoramus18155 wrote:
>
> That alone indicates that two CPUs would be a good investment.
> Personally, I'd go one step further and run seperate web and mail
> servers, but you may have other considerations forcing the use of a
> single machine.


Yes, $$ and ease of maintenance.

>
> I've run a handful of dual CPU systems (in a variety of roles) and never
> had a problem with SMP. I've got a trio of systems that have been up
> and running for 254 days at 100% CPU load (they all run the
> distributed.net client when they're not doing any real work), for example.
>
> I've also seen Linux run on much larger system (many more than two CPUs)
> without any problem related to the number of CPUs.
>


Thanks for sharing your experience.

i

--
Ignoramus18155

2005-01-24, 7:21 pm

On 24 Jan 2005 21:24:27 GMT, Christopher Browne <cbbrowne@acm.org> wrote:
> Oops! Ignoramus18155 <ignoramus18155@NOSPAM.18155.invalid> was seen spray-painting on a wall:
>
> It may help, or it may not. It all depends on whether or not your
> processes are occasionally CPU bound.
>
> If they are, you will get improved throughput.
>
> If your processes are I/O bound, then you will see little or no
> improvement in performance.
>
> Note that I am speaking in general about I/O; that could be:
> a) Disk I/O
> b) Network I/O
> c) Possibly even memory bandwidth
>
> It is entirely possible that your bottlenecks are all about I/O, and
> in that case, adding a CPU will not alleviate the bottleneck.
>
> Throwing the ball back in your court, do you find that your web server
> or mail server has a very high load average due to CPU usage being
> maxxed out?


Yes, that is sometimes the case.

> If not, then it is unlikely that adding a CPU will help.
>
> If so, then have you verified that adding memory wouldn't "do the
> trick?"


The old server is old anyway, it needs replacing due to age. And I
would like the server to be closer to home.

i

Matt Probert

2005-01-25, 4:22 am

Once upon a time, far far away, the king summoned Dave Patton
<spam@trap.invalid> who replied:

>comments@probertencyclopaedia.com (Matt Probert) wrote in
>news:41f54691.7738807@news.ntlworld.com:
>
>
>Matt - can you explain your comment in more detail please?
>


Apache is great, please don't feel I'm criticising Apache. We use it,
and it works for us, but is not the fastest http server available, and
not the one that can handle the most traffic.

Matt

--
Free, high quality content for web sites. See
http://www.probertencyclopaedia.com/xcont.htm
David N. Welton

2005-01-25, 7:23 am

comments@probertencyclopaedia.com (Matt Probert) writes:

[color=darkred]
[color=darkred]
> Apache is great, please don't feel I'm criticising Apache. We use
> it, and it works for us, but is not the fastest http server
> available, and not the one that can handle the most traffic.


There are other design considerations in play with Apache. Namely,
that it's:

* robust - the multiple-children design means that if one goes down,
all is not lost.

* extensible - it has a nice API that lets you do all kinds of fancy
things with it.

* flexible - it ships with a variety of useful modules.

One way of setting things up is to put images and static content that
is easily isolated on one virtual host, say images.foo.com and use a
fast, light server there, and deal with 'heavy lifting' operations on
the main server with Apache.

--
David N. Welton
- http://www.dedasys.com/davidw/

Apache, Linux, Tcl Consulting
- http://www.dedasys.com/
Christopher Browne

2005-01-25, 12:39 pm

After takin a swig o' Arrakan spice grog, Dave Patton <spam@trap.invalid> belched out:
> comments@probertencyclopaedia.com (Matt Probert) wrote in
> news:41f54691.7738807@news.ntlworld.com:
>
>
> Matt - can you explain your comment in more detail please?


Apache definitely _isn't_ the fastest web server out there. It's one
of the most featureful, but being the fastest, particularly for static
content, isn't one of its design goals.

- Boa <http://boa.org/> is a non-forking web server that is way faster
for static content than Apache.

I find it preferable for running CGIs at home as, while it is likely
slower at that than Apache, the config file doesn't make my eyes
bleed.

- thttpd <http://www.acme.com/software/thttpd/> is fairly similar to
Boa

- khttpd <http://www.fenrus.demon.nl/> runs from inside the Linux
kernel, and can _only_ deal with static content.
--
let name="cbbrowne" and tld="XXXXXXXXXX" in name ^ "@" ^ tld;;
http://www.ntlug.org/~cbbrowne/unix.html
If we were meant to fly, we wouldn't keep losing our luggage.
Matt Probert

2005-01-25, 12:39 pm

Once upon a time, far far away, the king summoned davidw@dedasys.com
(David N. Welton) who replied:

>comments@probertencyclopaedia.com (Matt Probert) writes:
>
>
>
>
>There are other design considerations in play with Apache. Namely,
>that it's:


As I said, I'm not criticising Apache, just stating a fact in
appropriate context - that of the original poster's question regarding
performance.

Matt

--
Free, high quality content for web sites. See
http://www.probertencyclopaedia.com/xcont.htm
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews