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

Add Nice config option to lower chia processes priority #62

Open
carlosvsilva opened this issue May 26, 2021 · 4 comments
Open

Add Nice config option to lower chia processes priority #62

carlosvsilva opened this issue May 26, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@carlosvsilva
Copy link

Hi. I'm using chia under plotng on a desktop machine, and would welcome an option in config file to give a "nice" priority to chia processes, so that they won't be as heavy penalizers and impact interactive GUI sessions as much. Can you please add this option for a "nice" value (i think they go from 19 to -20), 19 the lowest, and -20 the highest. I'd like to set all chia plotting processes to something like 10 so that the normal 0 priority processes don't get bogged by Chia.

Thanks

@giordanidev
Copy link

I second this. Some other scripts already do it and feels smooth to use the computer while plotting.

@maded2
Copy link
Owner

maded2 commented May 27, 2021

Sorry, but this is a Windows Task Manager option, not available to the programming API I am using.

@carlosvsilva
Copy link
Author

And in Linux, doesn't it work? I guess there must be some kind of way to specifiy it. Last resort, just invoking "nice chia " will do the job. Thanks.

@maded2 maded2 added the enhancement New feature or request label May 27, 2021
@torrayne
Copy link

I'm not super familiar with process priorities but I found this thread which is for linux. And the documentation of the same thing for Windows.

cmd := exec.Command("chia", args...)

# linux
err = syscall.Setpriority(cmd.Process.id, who int, prio int)

# windows
err = windows.SetPriorityClass(process handle, priorityClass uint32)

Not sure if syscall.Setpriority works for Mac OS or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants