[Simgrid-user] host load function

Arnaud Legrand Arnaud.Legrand at imag.fr
Sat Nov 26 21:24:41 CET 2005


> how would "amount of host throughput" be?

Do you really think this defines better what the load is ?

Is it an instantaneous value that you want or an average one ? Is it
supposed to take into account the tasks you are currently running on this
resource or do you only want to know the value you would get if you were
alone ? What if communications have an influence on computations ? Should it
be taken into account ? We've been talking about these load functions so
many times... and each time the conclusion is "do it yourself, that is the
best way to get the information you really want". Moreover, if you had to
run your code for real, that is what you would have to do... Here is a
possible get_host_load function that you can use if you want (provided it
gives you the value you are looking for :).

double get_host_load()
    m_task_t task = MSG_task_create("test", 0.001, 0, NULL);
    double date = MSG_get_clock();

    date = MSG_get_clock() - date;
    return (0.001/date);

Best regards,


More information about the Simgrid-user mailing list