Mailing List Archive

Performance tuning (single/dual cpu)
Forwarding to the list... Does anybody else have any recommendations for
performance tuning.

(I should have known... open my mouth to say how great of experience I've
had tuning certain configs, and everybody wants to know how :-)

---------- Forwarded message ----------
Date: Fri, 29 Dec 2000 15:41:06 -0600 (CST)
From: Michael E Brown <michael_e_brown@dell.com>
To: Pat O'Rourke <orourke@mclinux.com>
Cc: Michael E Brown <michael_e_brown@exchange.dell.com>
Subject: Re: dual CPU balancer

How much memory do you have? How fast of network links? There are some
kernel parameters you can tune in 2.2 that help out, and there are even
more in 2.4. From the top of my head,

1) /proc/sys/net/core/*mem* <-- tune to your memory spec. The defaults are
not optimized for network throughput on large memory machines.

2.) 2.4 only /proc/sys/net/ipv4/*mem*

3.) For fast links, with multiple adapters (Two gig links, dual CPU) 2.4
has NIC-->CPU IRQ binding. That can really help also on heavily loaded
links.

4.) For 2.2 I think I would go into your BIOS or RCU (if you have one) and
hardcode all NIC adapters (Assuming identical/multiple NICS) to the same
IRQ. You get some gain due to cache affinity, and one interrupt may
service IRQs from multiple adapters in one go, on heavily loaded links.

5.) Think "Interrupt coalescing". Figure out how your adapter driver turns
this on and do it. If you are using Intel Gig links, I can send you some
info on how to tune it. Acenic Gig adapters are pretty well documented.

For a really good tuning guide, go to spec.org, and look up the latest TUX
benchmark results posted by Dell. Each benchmark posting has a full list
of kernel parameters that were tuned. This will give you a good starting
point from which to examine your configuration.

The other obvious tuning recommendation: Pick a stable 2.4 kernel and use
that. Any (untuned) 2.4 kernel will blow away 2.2 in a multiprocessor
configuration. If I remember correctly 2.4.0test 10-11 are pretty stable.

--
Michael Brown
Linux DWS Development
Dell Computer Corp

On Fri, 29 Dec 2000, Pat O'Rourke wrote:

>
> > Make that _reality_. In some tests I've done with FTP, I have seen
> > *significant* improvements using dual and quad processors using 2.4. Under
> > 2.2, there are improvements, but not astonishing ones.
>
> Oddly enough, we've seen a performance degradation on 2.2 when using a dual
> CPU machine for the director. It seems the _same_ machine performs much
> better when booted as a uniprocessor?!?
>
> We are runnig 2.2.17 with the 1.0.2 LVS patch applied. Are there any
> obvious settings we should adjust when running LVS on an SMP machine?
>
> Thanks,
>
> Pat
>
>
Re: Performance tuning (single/dual cpu) [ In reply to ]
--- Michael E Brown <michael_e_brown@dell.com> wrote:
>
> The other obvious tuning recommendation: Pick a stable 2.4 kernel and use
> that. Any (untuned) 2.4 kernel will blow away 2.2 in a multiprocessor
> configuration. If I remember correctly 2.4.0test 10-11 are pretty stable.

Yes, but LVS for 2.4 is really stable for production?


=====
Florin Andrei

__________________________________________________
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/
Re: Performance tuning (single/dual cpu) [ In reply to ]
On Fri, 29 Dec 2000, Florin Andrei wrote:

> --- Michael E Brown <michael_e_brown@dell.com> wrote:
> >
> > The other obvious tuning recommendation: Pick a stable 2.4 kernel and use
> > that. Any (untuned) 2.4 kernel will blow away 2.2 in a multiprocessor
> > configuration. If I remember correctly 2.4.0test 10-11 are pretty stable.
>
> Yes, but LVS for 2.4 is really stable for production?
>

I haven't experienced panic in my testings since version 0.0.5. Anyway,
use it at your own risk. :)

Cheers,

Wensong

>
> =====
> Florin Andrei
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Photos - Share your holiday photos online!
> http://photos.yahoo.com/
>
> _______________________________________________
> LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
> Send requests to lvs-users-request@LinuxVirtualServer.org
> or go to http://www.in-addr.de/mailman/listinfo/lvs-users
>
Re: Performance tuning (single/dual cpu) [ In reply to ]
Hello,

On Fri, 29 Dec 2000, Florin Andrei wrote:

> --- Michael E Brown <michael_e_brown@dell.com> wrote:
> >
> > The other obvious tuning recommendation: Pick a stable 2.4 kernel and use
> > that. Any (untuned) 2.4 kernel will blow away 2.2 in a multiprocessor
> > configuration. If I remember correctly 2.4.0test 10-11 are pretty stable.
>
> Yes, but LVS for 2.4 is really stable for production?

It looks good. The only problem: you can't use the LVS box as
gateway for non-LVS connections in NAT mode. I.e. a working setup can be:

LVS box:

external addresses:

DIP=10.0.0.1
VIP=10.0.0.100

internal addresses:

192.168.0.1

ipvsadm -a -t 10.0.0.100:80 -r 192.168.0.2:80 -m

real server:

192.168.1.2 - network for non-LVS traffic
192.168.0.2 - network for LVS traffic

ip rule add prio 100 from 192.168.0.0/24 table 100
ip route add table 100 via 192.168.0.1 dev eth0 src 192.168.0.2

route add default gw 192.168.1.3


LVS box default gateway (192.168.1.3, masq box)
192.168.0.1 \ /
RS1 192.168.1.2
192.168.0.2

You have to use source routing and to split the traffic to
a LVS and non-LVS related. One day if/when LVS can coexist with
ip_conntrack/iptable_nat such tricks will not be needed.

> =====
> Florin Andrei


Regards

--
Julian Anastasov <ja@ssi.bg>
Re: Performance tuning (single/dual cpu) [ In reply to ]
Sorry to keep this thread going, but my original question to Michael
was about SMP performance on 2.2. In our experiments we've been seeing
an SMP director perform significantly worse than a uni-processor one
(using the same hardware - only difference was booting an SMP kernel
or uni-processor).

We've been using a 2.2.17 kernel with the 1.0.2 LVS patch and bumped
the send / recv socket buffer memory to 1mb for both the uni-processor
and SMP scenarios. The director is an Intel based system with 550
mhz Pentium 3's.

So I was just curious if anyone else has had a similar experience and
if they were able to resolve it.

Thanks,

Pat

--
Patrick O'Rourke
orourke@missioncriticallinux.com
Re: Performance tuning (single/dual cpu) [ In reply to ]
On Wed, 3 Jan 2001, Pat O'Rourke wrote:

> Sorry to keep this thread going, but my original question to Michael
> was about SMP performance on 2.2. In our experiments we've been seeing
> an SMP director perform significantly worse than a uni-processor one
> (using the same hardware - only difference was booting an SMP kernel
> or uni-processor).

My understanding is that SMP absolutely will not directly help with the IP
stack under 2.2 _at all_. From what I understand, the stack is has
basically no code that will run in parallel, so only one processor can be
working with it at any given time. This is supposedly why the Mindcraft
tests worked so much in favor of NT -- it's stack does take advantage of
extra processors.

I would hypothesize that you generally lose performance on an SMP system,
because of the extra semantics (semaphores, etc) that the SMP kernel must
go through that the non-SMP kernel does not. So I would fully expect the
loss of performance.

Mind you, I can see instances where you might gain perfomance -- for
example, you expect the director to be heavily laden with userspace
programs that can run in parellel on the second processor with the IP
stack on the first.

2.4 supposedly addresses this problem. Mind you, this is from analysis
I've read; I haven't actually read the source code in any detail, so I
could be parroting nonsense :) YMMV.

Kyle Sparger