Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux Virtual Server: Users

[lvs-users] How can I improve LVS performance?

 

 

Linux Virtual Server users RSS feed   Index | Next | Previous | View Threaded


paulo.s.rodrigues at gmail

Aug 4, 2009, 4:58 PM

Post #1 of 7 (1188 views)
Permalink
[lvs-users] How can I improve LVS performance?

Hello,
I'm sure it must be something very obvious, but somehow I'm failing this: I
have a very simple LVS setup, one virtualserver, and two squid realservers.
I've been using ab to check how many webpages this setup can serve over one
minute, by:

ab -k -c20 -t60 http://195.22.4.25/

and the maximum it does is around 6000 pages; from the LVS itself, running
the same command but against the realservers

ab -k -c20 -t60 http://192.168.200.60/
ab -k -c20 -t60 http://192.168.200.61/

gives around 40000 webpages from each! All hosts are connected over gigabit
ethernet.

The config file (ldirectord.cf) is:

checktimeout = 60
checkinterval = 10
quiescent = yes
virtual = 195.22.4.25:80
protocol = tcp
scheduler = lc
real = 192.168.200.60:80 masq 5
real = 192.168.200.61:80 masq 5
service = http

I've also tried forwading instead of natting, but with pretty much the same
results.
Anyone have an idea what I could be doing wrong here?

Thanks for your attention,
Paulo Rodrigues
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


siim at p6drad-teel

Aug 5, 2009, 1:00 AM

Post #2 of 7 (1134 views)
Permalink
Re: [lvs-users] How can I improve LVS performance? [In reply to]

Hi

Paulo Rodrigues wrote:
> I've been using ab to check how many webpages this setup can serve over one
> minute, by:
>
> ab -k -c20 -t60 http://195.22.4.25/
>
> and the maximum it does is around 6000 pages; from the LVS itself, running
> the same command but against the realservers
>
> ab -k -c20 -t60 http://192.168.200.60/
> ab -k -c20 -t60 http://192.168.200.61/
>
> gives around 40000 webpages from each! All hosts are connected over gigabit
> ethernet.

Just so that we could eliminate some factors: you are running the second
set of benchmarks from the director, where are you running the first ab
from? Is it from the director, another machine in the same (external)
subnet or over the internet?

Siim

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


paulo.s.rodrigues at gmail

Aug 5, 2009, 2:10 AM

Post #3 of 7 (1126 views)
Permalink
Re: [lvs-users] How can I improve LVS performance? [In reply to]

Hello Siim,
On Wed, Aug 5, 2009 at 9:00 AM, Siim Põder <siim [at] p6drad-teel> wrote:

> Hi
>
> Paulo Rodrigues wrote:
> > I've been using ab to check how many webpages this setup can serve over
> one
> > minute, by:
> >
> > ab -k -c20 -t60 http://195.22.4.25/
> >
> > and the maximum it does is around 6000 pages; from the LVS itself,
> running
> > the same command but against the realservers
> >
> > ab -k -c20 -t60 http://192.168.200.60/
> > ab -k -c20 -t60 http://192.168.200.61/
> >
> > gives around 40000 webpages from each! All hosts are connected over
> gigabit
> > ethernet.
>
> Just so that we could eliminate some factors: you are running the second
> set of benchmarks from the director, where are you running the first ab
> from? Is it from the director, another machine in the same (external)
> subnet or over the internet?
>
> Siim
>
> _______________________________________________
> Please read the documentation before posting - it's available at:
> http://www.linuxvirtualserver.org/
>
> LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
> Send requests to lvs-users-request [at] LinuxVirtualServer
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>

I've tried a few hosts, all giving pretty much the same results, in the same
subnet (195.22.4.22), in another subnet (195.22.17.11) and in a different
subnet but on the same switch (195.22.14.170), both on gigabit and 100Mb.

Thank you for your help!
Paulo Rodrigues
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


graeme at graemef

Aug 5, 2009, 11:07 AM

Post #4 of 7 (1127 views)
Permalink
Re: [lvs-users] How can I improve LVS performance? [In reply to]

On Wed, 2009-08-05 at 10:10 +0100, Paulo Rodrigues wrote:
> I've tried a few hosts, all giving pretty much the same results, in the same
> subnet (195.22.4.22), in another subnet (195.22.17.11) and in a different
> subnet but on the same switch (195.22.14.170), both on gigabit and 100Mb.

For consistency, can you please do your tests again from a single test
client host, preferably on a different network to the director and the
realservers, but one which can reach both the director and realservers?

Also, when you connect to the realservers directly are you absolutely
certain that you're getting the same content delivered as when you go
through the LVS?

Regards

Graeme


_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


paulo.s.rodrigues at gmail

Aug 5, 2009, 3:49 PM

Post #5 of 7 (1116 views)
Permalink
Re: [lvs-users] How can I improve LVS performance? [In reply to]

Hello Graeme,

On Wed, Aug 5, 2009 at 7:07 PM, Graeme Fowler <graeme [at] graemef> wrote:

> On Wed, 2009-08-05 at 10:10 +0100, Paulo Rodrigues wrote:
> > I've tried a few hosts, all giving pretty much the same results, in the
> same
> > subnet (195.22.4.22), in another subnet (195.22.17.11) and in a different
> > subnet but on the same switch (195.22.14.170), both on gigabit and 100Mb.
>
> For consistency, can you please do your tests again from a single test
> client host, preferably on a different network to the director and the
> realservers, but one which can reach both the director and realservers?
>
> Also, when you connect to the realservers directly are you absolutely
> certain that you're getting the same content delivered as when you go
> through the LVS?
>
> Regards
>
> Graeme
>
>
> _______________________________________________
> Please read the documentation before posting - it's available at:
> http://www.linuxvirtualserver.org/
>
> LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
> Send requests to lvs-users-request [at] LinuxVirtualServer
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>


I'll have to change the network around to be able to do this, perhaps over
the weekend.

In the meanwhile, your words made me think of something else, I was certain
the delivered content was the same in every case, but the page is somewhat
large, around 110KB, so I repeated the tests with a tiny html page (80
bytes) and a tiny php (same 80 bytes but also connecting to a MySQL DB)
page; the same setup that serves 6000 large pages per *minute*, now serves
20000 tiny html pages per *second*, or 4500 tiny php pages per *second*.

The limiting factor seems to be, after all, the actual bandwidth. Part of
the network plumbing that I took for all-gigabit must be 100mbps.

LVS rocks, and I failed :)

Thanks for your help!
Paulo Rodrigues
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


graeme at graemef

Aug 5, 2009, 4:11 PM

Post #6 of 7 (1126 views)
Permalink
Re: [lvs-users] How can I improve LVS performance? [In reply to]

On Wed, 2009-08-05 at 23:49 +0100, Paulo Rodrigues wrote:
> I'll have to change the network around to be able to do this, perhaps over
> the weekend.

Given your following comments, you may not have to - but it will give
you a decent baseline for "idealised" operation.

Unfortunately, once you have remote clients accessing a system then you
have all the variations they can throw at you - PMTU problems,
non-deterministic latency changes, TCP window scaling... etc etc. The
list can grow very long, and tiresome!

If you figure out that you can handle (say) 1000 page views/second in
tests, you might find that in a "real" operating environment you manage
to achieve 25% of that. At least, if you do, you'll know you are doing
well!

Remember also that static tests of the type you did don't exactly stress
the system as it can deliver a lot of data from the kernel's filesystem
cache (in memory) rather than reading from disk. If you can do so,
modify your PHP to do some sort of calculation or fetch some data in a
random fashion from your database (as MySQL will also cache repeated
requests if configured appropriately).

Not that any of that is LVS related, of course; it's just good practice
when establishing a baseline for your system :)

Glad we've helped so far!

Graeme


_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


jmack at wm7d

Aug 5, 2009, 5:26 PM

Post #7 of 7 (1121 views)
Permalink
Re: [lvs-users] How can I improve LVS performance? [In reply to]

On Wed, 5 Aug 2009, Paulo Rodrigues wrote:

> In the meanwhile, your words made me think of something
> else, I was certain the delivered content was the same in
> every case, but the page is somewhat large, around 110KB,
> so I repeated the tests with a tiny html page (80 bytes)
> and a tiny php (same 80 bytes but also connecting to a
> MySQL DB) page; the same setup that serves 6000 large
> pages per *minute*, now serves 20000 tiny html pages per
> *second*, or 4500 tiny php pages per *second*.

the writeup on ab in the HOWTO describes how the hits/sec
varies enormously with the size of the hits.

Joe

--
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

Linux Virtual Server users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.