All of lore.kernel.org
 help / color / mirror / Atom feed
* Can Yocto build to set up process running priority in service?
@ 2019-08-22  8:09 JH
  2019-08-22 21:32 ` JH
  0 siblings, 1 reply; 6+ messages in thread
From: JH @ 2019-08-22  8:09 UTC (permalink / raw)
  To: Yocto discussion list

Hi,

How to set up process running priority for services in Yocto build
using renice or some method?

Thank you.

Kind regards,

- jupiter


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Can Yocto build to set up process running priority in service?
  2019-08-22  8:09 Can Yocto build to set up process running priority in service? JH
@ 2019-08-22 21:32 ` JH
  2019-08-23  1:37   ` ChenQi
  0 siblings, 1 reply; 6+ messages in thread
From: JH @ 2019-08-22 21:32 UTC (permalink / raw)
  To: Yocto discussion list

I have two processes launched from a service unit, how can the Yocto
customer distro to set up high_priority_process?

ExecStartPre=low_priority_priority
ExecStart=high_priroty_process

Thank you.

Kind regards,

- jh

On 8/22/19, JH <jupiter.hce@gmail.com> wrote:
> Hi,
>
> How to set up process running priority for services in Yocto build
> using renice or some method?
>
> Thank you.
>
> Kind regards,
>
> - jupiter
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Can Yocto build to set up process running priority in service?
  2019-08-22 21:32 ` JH
@ 2019-08-23  1:37   ` ChenQi
  2019-08-23  2:58     ` JH
  0 siblings, 1 reply; 6+ messages in thread
From: ChenQi @ 2019-08-23  1:37 UTC (permalink / raw)
  To: JH, Yocto discussion list

On 08/23/2019 05:32 AM, JH wrote:
> I have two processes launched from a service unit, how can the Yocto
> customer distro to set up high_priority_process?
>
> ExecStartPre=low_priority_priority
> ExecStart=high_priroty_process
>
> Thank you.
>
> Kind regards,
>
> - jh
>
> On 8/22/19, JH <jupiter.hce@gmail.com> wrote:
>> Hi,
>>
>> How to set up process running priority for services in Yocto build
>> using renice or some method?
>>
>> Thank you.
>>
>> Kind regards,
>>
>> - jupiter
>>
Not sure about your exact needs. But as far as I know, nice value is 
inherited. You can just set it for the shell that starts a yocto build. 
If you are using some scripts, the same logic holds.

Best Regards,

Chen Qi



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Can Yocto build to set up process running priority in service?
  2019-08-23  1:37   ` ChenQi
@ 2019-08-23  2:58     ` JH
  2019-08-23  3:34       ` ChenQi
  0 siblings, 1 reply; 6+ messages in thread
From: JH @ 2019-08-23  2:58 UTC (permalink / raw)
  To: ChenQi; +Cc: Yocto discussion list

Thanks ChenQi, can the process priority be set in ExecStart= of the
xxx.service file?

Thank you.

Kind regards,

- jh

On 8/23/19, ChenQi <Qi.Chen@windriver.com> wrote:
> On 08/23/2019 05:32 AM, JH wrote:
>> I have two processes launched from a service unit, how can the Yocto
>> customer distro to set up high_priority_process?
>>
>> ExecStartPre=low_priority_priority
>> ExecStart=high_priroty_process
>>
>> Thank you.
>>
>> Kind regards,
>>
>> - jh
>>
>> On 8/22/19, JH <jupiter.hce@gmail.com> wrote:
>>> Hi,
>>>
>>> How to set up process running priority for services in Yocto build
>>> using renice or some method?
>>>
>>> Thank you.
>>>
>>> Kind regards,
>>>
>>> - jupiter
>>>
> Not sure about your exact needs. But as far as I know, nice value is
> inherited. You can just set it for the shell that starts a yocto build.
> If you are using some scripts, the same logic holds.
>
> Best Regards,
>
> Chen Qi
>
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Can Yocto build to set up process running priority in service?
  2019-08-23  2:58     ` JH
@ 2019-08-23  3:34       ` ChenQi
  2019-08-23  4:13         ` JH
  0 siblings, 1 reply; 6+ messages in thread
From: ChenQi @ 2019-08-23  3:34 UTC (permalink / raw)
  To: JH; +Cc: Yocto discussion list

On 08/23/2019 10:58 AM, JH wrote:
> Thanks ChenQi, can the process priority be set in ExecStart= of the
> xxx.service file?
>
> Thank you.
>
> Kind regards,
>
> - jh

I didn't try it out. But I think the answer is likely to be 'No'.

systemd does not like the old 'nice'. So there's no mechanism integrated 
in systemd.
You can use more modern way of CPUWeight, which makes use cgroup 
mechanism. Check systemd.recource-control(5) for more info.

Best Regards,
Chen Qi

> On 8/23/19, ChenQi <Qi.Chen@windriver.com> wrote:
>> On 08/23/2019 05:32 AM, JH wrote:
>>> I have two processes launched from a service unit, how can the Yocto
>>> customer distro to set up high_priority_process?
>>>
>>> ExecStartPre=low_priority_priority
>>> ExecStart=high_priroty_process
>>>
>>> Thank you.
>>>
>>> Kind regards,
>>>
>>> - jh
>>>
>>> On 8/22/19, JH <jupiter.hce@gmail.com> wrote:
>>>> Hi,
>>>>
>>>> How to set up process running priority for services in Yocto build
>>>> using renice or some method?
>>>>
>>>> Thank you.
>>>>
>>>> Kind regards,
>>>>
>>>> - jupiter
>>>>
>> Not sure about your exact needs. But as far as I know, nice value is
>> inherited. You can just set it for the shell that starts a yocto build.
>> If you are using some scripts, the same logic holds.
>>
>> Best Regards,
>>
>> Chen Qi
>>
>>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Can Yocto build to set up process running priority in service?
  2019-08-23  3:34       ` ChenQi
@ 2019-08-23  4:13         ` JH
  0 siblings, 0 replies; 6+ messages in thread
From: JH @ 2019-08-23  4:13 UTC (permalink / raw)
  To: ChenQi; +Cc: Yocto discussion list

I just found a blog:
http://bristot.me/setting-real-time-priorities-to-services-using-systemd/

Set following CPUSchedulingPriority, systemd does support priority
setting, right? Or that just bogus.

[Service]
ExecStart=/usr/sbin/mcelog --ignorenodev --daemon --foreground
CPUSchedulingPolicy=fifo
CPUSchedulingPriority=20

Thank you.

- jh

On 8/23/19, ChenQi <Qi.Chen@windriver.com> wrote:
> On 08/23/2019 10:58 AM, JH wrote:
>> Thanks ChenQi, can the process priority be set in ExecStart= of the
>> xxx.service file?
>>
>> Thank you.
>>
>> Kind regards,
>>
>> - jh
>
> I didn't try it out. But I think the answer is likely to be 'No'.
>
> systemd does not like the old 'nice'. So there's no mechanism integrated
> in systemd.
> You can use more modern way of CPUWeight, which makes use cgroup
> mechanism. Check systemd.recource-control(5) for more info.
>
> Best Regards,
> Chen Qi
>
>> On 8/23/19, ChenQi <Qi.Chen@windriver.com> wrote:
>>> On 08/23/2019 05:32 AM, JH wrote:
>>>> I have two processes launched from a service unit, how can the Yocto
>>>> customer distro to set up high_priority_process?
>>>>
>>>> ExecStartPre=low_priority_priority
>>>> ExecStart=high_priroty_process
>>>>
>>>> Thank you.
>>>>
>>>> Kind regards,
>>>>
>>>> - jh
>>>>
>>>> On 8/22/19, JH <jupiter.hce@gmail.com> wrote:
>>>>> Hi,
>>>>>
>>>>> How to set up process running priority for services in Yocto build
>>>>> using renice or some method?
>>>>>
>>>>> Thank you.
>>>>>
>>>>> Kind regards,
>>>>>
>>>>> - jupiter
>>>>>
>>> Not sure about your exact needs. But as far as I know, nice value is
>>> inherited. You can just set it for the shell that starts a yocto build.
>>> If you are using some scripts, the same logic holds.
>>>
>>> Best Regards,
>>>
>>> Chen Qi
>>>
>>>
>
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-08-23  4:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-22  8:09 Can Yocto build to set up process running priority in service? JH
2019-08-22 21:32 ` JH
2019-08-23  1:37   ` ChenQi
2019-08-23  2:58     ` JH
2019-08-23  3:34       ` ChenQi
2019-08-23  4:13         ` JH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.