[X2Go-Dev] findbusyservers algorithm

Mike Gabriel mike.gabriel at das-netzwerkteam.de
Tue Mar 5 13:19:25 CET 2013


Hi Anders,

On Di 05 Mär 2013 11:51:06 CET Anders Bruun Olsen wrote:

> 2013/3/2 Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
>
>> We have tried running /usr/lib/x2go/x2gobroker-agent abo findbusyservers
>>> and got this output:
>>> OK
>>> 16:testterm2
>>> 83:testterm1
>>> Which tells me that it might be the x2gobroker-daemon which isn't using
>>> the
>>> information correctly.
>>
>> My plain guess is that this is related a DNS hostname / FQDN mismatching.
>> The broker code has to become more tolerant about this.
>>
>
> Yes, after some more testing, that is indeed a problem. I have tried added
> some strategic debug-logging to the code and this is the content of
> busy_server_list in broker.base_broker.select_session(), after it gets info
> back from servers:
>
> busy_server_list: [(0, 'testterm1.dsl.lan'), (0, 'testterm2.dsl.lan'),
> (100, 'testterm2')]
>
> Meaning that it doesn't see those as the same. That is of course what bug
> #133 is about.
>
> A more interesting problem as I see it, is why testterm2 is being reported
> with 100 in the above. In fact, when I look at the value of server_list in
> agent.find_busy_servers() this is the content:
>
> busy_servers: {'testterm2': 100}
>
> That is when I have a couple of users logged in to testterm1 and a load of
> 2.0 while testterm2 has no users and a load of 0.29. I still think
> something is wrong with the script that determines if a server is busy or
> not :)

the find_busy_servers output is a percentage value and only lists  
servers that have users logged on via X2Go.

So a ,,100'' for one server means:

   o that one server is somehow busy (with one user or many)
   o the other server is idle and does not have X2Go users logged on

Examples:

   term1: 2 users, term2: 2 users -> 50:50
   term1: 1 user, term2 0 users -> 100
   term1: 10 users, term2 5 users -> 66:33
   and so on...

I agree that we can later add more intelligent load detection, but for  
now I will leave it as this.

Mike


-- 

DAS-NETZWERKTEAM
mike gabriel, rothenstein 5, 24214 neudorf-bornstein
fon: +49 (1520) 1976 148

GnuPG Key ID 0x25771B31
mail: mike.gabriel at das-netzwerkteam.de, http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digitale PGP-Unterschrift
URL: <http://lists.x2go.org/pipermail/x2go-dev/attachments/20130305/5813567f/attachment.pgp>


More information about the x2go-dev mailing list