[lvs-users] Weighting by request address?

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: [lvs-users] Weighting by request address?
From: "David Dyer-Bennet" <dd-b@xxxxxxxx>
Date: Fri, 25 Jul 2008 09:37:17 -0500 (CDT)
I'm looking at an application for LVS that requires scheduling that I'm
not sure is available.

The services to be load-balanced are model-computing servers.  They take a
modest amount of data (more than average web requests, but not massive),
compute for a few hundredths up to a few entire seconds, and return a
modest amount of data.  We're starting with 4 servers (including the LBs,
using the Local Node feature I currently think).

The consumers of these services are interactive users, and a few batch
users.  We want to make the whole server pool available to the batch users
but at a lower priority than the interactive users (the batch uses are run
a relatively few times a day).  We don't care whether the batch run takes
5 minutes or 20 minutes, but we don't want to severely impact interactive
performance (worse than 2x, say) while the batch run is going on.

The batch runs can be distinguished based on the IPs it's requested from,
or we could set things up so it passes its requests to a different request

The number of interactive users will remain relatively small, maybe a
dozen today, maybe growing 5x over the life of this project.  The batch
uses are a few times a day, not fixed scheduling.  The number of services
will be around a dozen or two as well.

An added complexity is that some of the services will use multiple cores
for a request, and others will not; raw counts of actual connections are
not an adequate way to estimate the load currently being handled by a

I don't envision server memory use being the limit on server performance
with these models; core availability is going to be the limit.  (That's a
weird-looking sentence; when I started in this business the word "core"
referred to the primary memory technology!)

Do you guys see a good way to approach this short of writing my own
scheduler module?  That's not completely out of the question, but I'm sure
my employer would rather spend that time somewhere else.

Looking at ipvsadm, the syntax

ipvsadm -a service-address -r server-address -w weight -x upper-threshold

suggests that I can set set the weight at a finer level of detail than
just the server, but I'm not sure.  If I say

ipvsadm -a service-1 -r server-1 -w 1
ipvsadmm -a service-2 -r server-1 -w 2

what does it mean?  Am I setting the limits for that virtual server for
that service only, or am I setting the cost of that service for that
virtual server?  But then where do server weights get set?

And I'm short of ideas on how to handle the prioritization I need.  I've
thought of keeping the queues short enough that interactive requests got
in just by limiting how many requests the batch users put out at once, but
I think they can be independent enough that that limit needs to be
second-by-second dynamic (these "batch" uses are actually triggered by
interactive users also, but they're requesting complex reports that
they'll need to wait for anyway, so delaying them doesn't matter whereas
decreasing interactive response on simple requests does matter).  (All
users would have to retry refused connections.)

Sorry if parts of this are based on stupid assumptions and
misunderstandings; this is my first try working with LVS.  I see that
those in the community regard it as quite complex to manage, so it's
likely I'm not understanding the options or how things work, and am asking
the wrong questions.
David Dyer-Bennet, dd-b@xxxxxxxx;

<Prev in Thread] Current Thread [Next in Thread>