Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAX_JOBS_PREF and MAX_CPUS_PREF not behaving as expect. #3386

Open
lfield opened this issue Nov 27, 2019 · 2 comments
Open

MAX_JOBS_PREF and MAX_CPUS_PREF not behaving as expect. #3386

lfield opened this issue Nov 27, 2019 · 2 comments

Comments

@lfield
Copy link
Contributor

lfield commented Nov 27, 2019

This is related to the MAX_JOBS_PREF and MAX_CPUS_PREF project preferences as added in this commit.

The current the behavior for a multi-threaded application is as follows (threads are cpus for the VM apps):

Max 1 CPU, Max 1 Job  = >  1 single threaded job
Max 2 CPU, Max 1 Job => 2 threaded job 
Max 1 CPU, Max 2 Job  => 1 single threaded job
Max 2 CPU, Max 2 Job => 2 x 2 threaded jobs

In practice Max CPUs is used to set the number of threads and hence CPUs to be used by a VM, hence Max 1 CPU, Max 2 Job => 1 single threaded job does not function as wished. In this case it should run two single CPU jobs.

@lfield
Copy link
Contributor Author

lfield commented Nov 27, 2019

Removing this if statement partially resolves the issue, however the Max # CPU preference cannot be used to limit the number CPUs used by the VM. This means the VM will have the maximum number of CPUs given by g_wreq->effective_ncpus.

@lfield
Copy link
Contributor Author

lfield commented Nov 27, 2019

The number of CPUs used by a VM can be controlled if the if statement from sched_send is added to plan_class.cpp after the max_threads check. The remaining issue is that in one request if 3 ncpus are available and max_cpu = 2, two 2 CPU jobs are returned where as it should be one 2 CPU and one 1 CPU. If the requests are made separately the correct response is given.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants