avatar
job scheduling question# Linux - Linux 操作系统
l*r
1
Hi all,
One question about job scheduling... say I have a 8 core machine and would
like to run hundreds of big tasks in the background, each takes a couple of
hours to finish. How can I make them to use only 6 cores and leave 2 for me
for other light weight tasks? Is there any command that can help to do this?
Thanks!
avatar
S*A
2
Just limit the total number thread/process of your job
to 6.
That is depend on how you write your project code.
avatar
o*p
3
You can use xargs.

of
me
this?

【在 l*******r 的大作中提到】
: Hi all,
: One question about job scheduling... say I have a 8 core machine and would
: like to run hundreds of big tasks in the background, each takes a couple of
: hours to finish. How can I make them to use only 6 cores and leave 2 for me
: for other light weight tasks? Is there any command that can help to do this?
: Thanks!

avatar
q*d
4
sched_setaffinity?
avatar
l*o
5
pthread_setaffinity_np可以吧。
但如果是这些程序本身也要用到大量内存,那么目前的Linux系统不可能reserve一些资
源。
我记得有一篇paper就是讨论此类问题的,www.usenix.org/event/osdi08/tech/full_
papers/yang/yang.pdf。
不过,好像需要修改操作系统。
avatar
d*o
6
》》》那么目前的Linux系统不可能reserve一些资
linux container能不?

【在 l*****o 的大作中提到】
: pthread_setaffinity_np可以吧。
: 但如果是这些程序本身也要用到大量内存,那么目前的Linux系统不可能reserve一些资
: 源。
: 我记得有一篇paper就是讨论此类问题的,www.usenix.org/event/osdi08/tech/full_
: papers/yang/yang.pdf。
: 不过,好像需要修改操作系统。

avatar
l*o
7
没用过linux container,不知道,系统默认支持这个吗?
能不能说说你为什么需要这么做吗?
avatar
r*t
8
pbs

of
me
this?

【在 l*******r 的大作中提到】
: Hi all,
: One question about job scheduling... say I have a 8 core machine and would
: like to run hundreds of big tasks in the background, each takes a couple of
: hours to finish. How can I make them to use only 6 cores and leave 2 for me
: for other light weight tasks? Is there any command that can help to do this?
: Thanks!

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。