BOINC / boinc

Open-source software for volunteer computing and grid computing.
https://boinc.berkeley.edu
GNU Lesser General Public License v3.0
1.99k stars 443 forks source link

BOINC client sends incorrect max cpu count in scheduler request. #2337

Open sirzooro opened 6 years ago

sirzooro commented 6 years ago

I have configured PrimeGrid's PPS Mega app to use 4 threads by adding following to its app_config.xml:

    <app_version>
        <app_name>llrMEGA</app_name>
        <cmdline>-t 4</cmdline>
        <avg_ncpus>4</avg_ncpus>
        <max_ncpus>4</max_ncpus>
    </app_version>

I also configured PrimeGrid as a backup project (resource usage set to 0). My goal was to eliminate tasks waiting for crunching on my machine, and download new one(s) as necessary after previous ones will end. However it turned out that client always downloads 4 new tasks instead of 1, so this is even worse than running with buffer set to 0. I have checked sched_request_www.primegrid.com.xml file and found this. Looks that client sends 1 for max cpu. I know that max_cpu tag in app_config.xml is ignored, but I thought that BOINC client will set its internal value to the same as avg_cpu one. Looks that this is not the case. I suspect that because of this server assumes that client would need 4 new tasks instead of 1.

<app_version>
    <app_name>llrMEGA</app_name>
    <version_num>800</version_num>
    <platform>x86_64-pc-linux-gnu</platform>
    <avg_ncpus>4.000000</avg_ncpus>
    <max_ncpus>1.000000</max_ncpus>
    <flops>4323964981.302576</flops>
    <api_version>7.7.0</api_version>
    <cmdline>-t 4</cmdline>
</app_version>
davidpanderson commented 6 years ago

To the best of my knowledge, app_version.max_ncpus isn't used anywhere; we always use app_version.avg_ncpus. I believe we can get rid of max_ncpus.

sirzooro commented 6 years ago

I agree, any dead stuff should be removed.

Edit: so if this field is not used, it looks that server to not use avg cpu count too and sends as many tasks as number of idle cpus. This also should be fixed.