load sharing

Peter Whittaker pww at bnr.ca
Thu Feb 7 04:37:36 AEST 1991


In article <25860 at adm.brl.mil> pjw at usna.navy.mil, , jw at math30, (Peter J. Welcher (math FACULTY)) writes:

(after many deletions...)

>
>I have a question, especially for the academic readers of the group. 
>(And it may just be I'm missing the obvious, or re-inventing a wheel.)
>
>Writing a script that does something with rwho is a possiblity, but there's all
>
>I've written a C program that forks (to get around timeout delays) and then

If you are going to force people to login to a single front-end host, then
why not write an program that keeps track of who has been assigned to each
machine, then assigns each new user to the least-busy machine? (i.e. using 
rlogin, or what have you).  When a user logs out of the assigned machine, 
strike them from the "assigned machine" table.

As long as your users are doing roughly the same amount of work (which should
be true if they are all working on the same assignment) your machines will
be more or less equally loaded.

It's not terribly elegant, but it would work.  If you wanted to double check
the load on a machine before assigning a user to it, query it via UDP (if you
are on a LAN, UDP should be fairly reliable).  If it says it is too busy, 
query the next machine in your "machine assignment" table.

There are more elegant solutions, but this one should be quick to write and
should work passably well.






More information about the Comp.unix.wizards mailing list