rsc_memory_bound still in effect?

Message boards : BOINC client : rsc_memory_bound still in effect?
Message board moderation

To post messages, you must log in.

AuthorMessage
Profile Ananas

Send message
Joined: 27 Jun 06
Posts: 305
Germany
Message 27435 - Posted: 16 Sep 2009, 2:43:57 UTC
Last modified: 16 Sep 2009, 2:44:56 UTC

Not only related to the core client ...

Does "<rsc_memory_bound>" still do something?

It is still documented but I cannot find any hint that it is still used somewhere - besides beeing converted into a numeric value now and then and traveling through several program modules (client, server and utils), sometimes cloaked as "max_mem_usage".

The memory limits that still seem to be checked are the ones from the global settings.


Of course it needs to be there for old clients - but if it isn't used for anything, it could as well be ignored/skipped while parsing the result XML data by later clients.
ID: 27435 · Report as offensive
Nicolas

Send message
Joined: 19 Jan 07
Posts: 1179
Argentina
Message 27436 - Posted: 16 Sep 2009, 2:54:55 UTC - in response to Message 27435.  

Did it ever do anything?
ID: 27436 · Report as offensive
Profile Ananas

Send message
Joined: 27 Jun 06
Posts: 305
Germany
Message 27438 - Posted: 16 Sep 2009, 7:59:42 UTC - in response to Message 27436.  
Last modified: 16 Sep 2009, 8:11:08 UTC

Did it ever do anything?


Afaik. there have been client versions that checked it, because in some projects people complained about it.

It might have been the global settings / venue RAM limit as well, so they just assumed that it has been the WU RAM limit.

If it turns out that it never has been used, it should just silently disappear from program codes, database and especially from the documentation. Changing a placebo in order to fix a bug can lead the project guys to wrong conclusions when trying to fix problems.

edit :

4.11 did use it.

int ACTIVE_TASK::init(RESULT* rp) {
    result = rp;
    wup = rp->wup;
    app_version = wup->avp;
    max_cpu_time = rp->wup->rsc_fpops_bound/gstate.host_info.p_fpops;
    max_disk_usage = rp->wup->rsc_disk_bound;
    max_mem_usage = rp->wup->rsc_memory_bound;

    strcpy(process_control_queue.name, rp->name);
    strcpy(graphics_request_queue.name, rp->name);

    return 0;
}

...

#if 0
// if an app has exceeded its maximum allowed memory, abort it
//
bool ACTIVE_TASK::check_max_mem_exceeded() {
    // TODO: calculate working set size elsewhere
    if (working_set_size > max_mem_usage || working_set_size/1048576 > gstate.global_prefs.max_memory_mbytes) {
        msg_printf(
            result->project, MSG_INFO,
            "Aborting result %s: exceeded memory limit %f\n",
            result->name,
            min(max_mem_usage, gstate.global_prefs.max_memory_mbytes*1048576)
        );
        abort_task("Maximum memory usage exceeded");
        return true;
    }
    return false;
}
#endif

bool ACTIVE_TASK::check_max_mem_exceeded() {
    if (max_mem_usage != 0 && rss_bytes > max_mem_usage) {
        msg_printf(
            result->project, MSG_INFO,
            "result %s: memory usage %f exceeds limit %f\n",
            result->name,
            rss_bytes,
            max_mem_usage
        );
        abort_task("Maximum memory usage exceeded");
        return true;
    }
    return false;
}


The "abort_task" part has been commented out in almost every version - but the code dated Sep. 24 2004 (must be 4.11) has it active.
ID: 27438 · Report as offensive
Ingleside

Send message
Joined: 11 May 07
Posts: 8
Message 27439 - Posted: 16 Sep 2009, 8:07:54 UTC - in response to Message 27435.  
Last modified: 16 Sep 2009, 8:09:34 UTC

Not only related to the core client ...

Does "<rsc_memory_bound>" still do something?

It's used by the scheduling-server when deciding if host can handle the task or not. If wu.rsc_memory_bound > usable_ram, it won't be sent to computer, there usable_ram is the max of users active and idle memory-limits, or computers installed memory in case of really old client.
ID: 27439 · Report as offensive
Profile Ananas

Send message
Joined: 27 Jun 06
Posts: 305
Germany
Message 27440 - Posted: 16 Sep 2009, 8:14:39 UTC - in response to Message 27439.  

Not only related to the core client ...

Does "<rsc_memory_bound>" still do something?

It's used by the scheduling-server when deciding if host can handle the task or not. If wu.rsc_memory_bound > usable_ram, it won't be sent to computer, there usable_ram is the max of users active and idle memory-limits, or computers installed memory in case of really old client.


Thanks :-)
ID: 27440 · Report as offensive

Message boards : BOINC client : rsc_memory_bound still in effect?

Copyright © 2021 University of California. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.