LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[lvs-users] lvs-dr real_server balancing issues - weight

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: [lvs-users] lvs-dr real_server balancing issues - weight
From: "Perry B. Whelan" <perry.whelan@xxxxxxxxx>
Date: Tue, 22 Dec 2009 15:09:14 -0600
Hello, across 11 real_servers, I am using keepalived:lvs-dr to balance
tcp:80 & tcp:443 for a few hundred virtual_ipaddresses via wrr. I've
employed lvs/keepalived for years now, and have had, until now, no
issues.

1) A brief little history and overview:
We'd had 8 servers, divided into 2 performance groups, given weights
of 15 or 20:
 servers w/ 8G RAM = weight 20 ~ big 3x
 servers w/ 4G RAM = weight 15 ~ little 5x
...these weights were somewhat arbitrarily arrived upon, but worked
very well (8 servers: 3 big, 5 little). With this model, everything
ran well, and load was always evenly distributed. Alas, we're growing,
and our IPs are getting heavier volume.

2) More CPU:
We acquired 3 new servers, 2 of which have a lot more RAM. So, now
I've got 3 performance groups, and choose initially the following
weights:
 servers w/ 16G RAM = weight 20 ~ big 2x
 servers w/ 8G RAM = weight 18 ~ medium 4x
 servers w/ 4G RAM = weight 15 ~ little 5x
...11 servers: 2 big, 4 medium, 5 little. Here, the director obsesses
on certain servers. Since then I've tried all kinds of different
weight ratios, each with a different effect, and never balancing
nicely. The two "big" servers are hit too hard, only 2 of the "medium"
are meaningfully hit at all, and 1 of the "little" is hit way too hard
(always the last one sequentially in the conf. I've even tried
flipping them around w/in the conf...always the last "little" is one
that's hit too hard..). The remaining 6 servers get some traffic, but
not enough. e.g. I'll have some servers [those being hit hard] w/
constant load averages of ~ 5.00, whereas the remaining ones will have
constant load averages of ~ 0.05! the balance is all off...

I'm looking for advise/input on a formula to calculate my server
weights to bring everything into harmony again, after adding 3
servers. Or any other meaningful insights.

My keepalived.conf is ~ 10 pages long, so it's not here. Everything's
worked fine for years - and, when I revert back to 8 servers
everything becomes predictable again. So, here's this (where
real_server" IP & "weight" are the variables I've changed):

virtual_server group VSG_1 {
    delay_loop 6
    lb_algo wrr
    lb_kind DR
    protocol TCP
    persistence_timeout 10
  real_server xxx.xxx.xxx.xxx 80 {
    weight ???
    HTTP_GET {
       url {
            path /some/where
            digest h4sh
            }
       connect_timeout 3
       nb_get_retry 3
       delay_before_retry 3
    }
  }
  !...+ more servers{}...
}

Regards.

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

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

<Prev in Thread] Current Thread [Next in Thread>
  • [lvs-users] lvs-dr real_server balancing issues - weight, Perry B. Whelan <=