# Configuring real-time scheduler with docker in balena os

**URL:** <https://forums.balena.io/t/configuring-real-time-scheduler-with-docker-in-balena-os/156611>\
**Category:** balenaOS\
**Created:** [July 17, 2020, 5:10pm UTC](https://forums.balena.io/t/configuring-real-time-scheduler-with-docker-in-balena-os/156611 "2020-07-17T17:10:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tgirotto](https://avatars.discourse-cdn.com/v4/letter/t/bcef8e/32.png) [@tgirotto](https://forums.balena.io/u/tgirotto)\
**Post date:** [July 17, 2020, 5:10pm UTC](https://forums.balena.io/t/configuring-real-time-scheduler-with-docker-in-balena-os/156611/1 "2020-07-17T17:10:09Z")

</div>

Can [real time scheduling offered by docker](https://docs.docker.com/config/containers/resource_constraints/#configure-individual-containers) work in Balena OS?

---

<div class="post-metadata">

**Author:** ![dt-rush](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/dt-rush/32/1405_2.png) [@dt-rush](https://forums.balena.io/u/dt-rush)\
**Post date:** [July 17, 2020, 6:31pm UTC](https://forums.balena.io/t/configuring-real-time-scheduler-with-docker-in-balena-os/156611/5 "2020-07-17T18:31:52Z")

</div>

This flag and functionality seem to be available in moby, so by analysis that means we inherit the functionality by default in balena-engine, which is built on moby:

> <https://github.com/moby/moby/blob/master/cmd/dockerd/config_unix.go#L59>

> **[moby/moby](https://github.com/moby/moby/search?q=CPURealtimeRuntime&unscoped_q=CPURealtimeRuntime)**
>
> Moby Project - a collaborative project for the container ecosystem to assemble container-based systems - moby/moby

If you can think of a simple test case, we could deploy it and find out empirically.

---

<div class="post-metadata">

**Author:** ![ca1ebd](https://avatars.discourse-cdn.com/v4/letter/c/eb9ed0/32.png) [@ca1ebd](https://forums.balena.io/u/ca1ebd)\
**Post date:** [June 16, 2021, 10:08pm UTC](https://forums.balena.io/t/configuring-real-time-scheduler-with-docker-in-balena-os/156611/7 "2021-06-16T22:08:32Z")

</div>

Did this end up going anywhere? I’m interested in the possibility of a real-time scheduler for one of my containers

---

<div class="post-metadata">

**Author:** ![rcooke-warwick](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@rcooke-warwick](https://forums.balena.io/u/rcooke-warwick)\
**Post date:** [June 18, 2021, 1:07pm UTC](https://forums.balena.io/t/configuring-real-time-scheduler-with-docker-in-balena-os/156611/8 "2021-06-18T13:07:40Z")

</div>

Hi there, do you have a simple test or use case for this?

---

<div class="post-metadata">

**Author:** ![dtischler](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/dtischler/32/2483_2.png) [@dtischler](https://forums.balena.io/u/dtischler)\
**Post date:** [June 26, 2021, 1:49am UTC](https://forums.balena.io/t/configuring-real-time-scheduler-with-docker-in-balena-os/156611/10 "2021-06-26T01:49:16Z")

</div>

Hi there, just wanted to check in quickly, and see if you had a sample or test for this that we could run?

---

<div class="post-metadata">

**Author:** ![cees.koolen](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/cees.koolen/32/7009_2.png) [@cees.koolen](https://forums.balena.io/u/cees.koolen)\
**Post date:** [February 20, 2024, 5:55am UTC](https://forums.balena.io/t/configuring-real-time-scheduler-with-docker-in-balena-os/156611/12 "2024-02-20T05:55:15Z")

</div>

It would be really great if we add real-time scheduler support to Balena since that will allow us to create a better division of CPU time between the different containers. What’s currently lacking I think is that the kernel that is part of Balena OS is not configured to have real-time group scheduling enabled:

```auto
/proc# zcat config.gz |grep CONFIG_RT_
# CONFIG_RT_GROUP_SCHED is not set
CONFIG_RT_MUTEXES=y

```

---

<div class="post-metadata">

**Author:** ![thomas](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@thomas](https://forums.balena.io/u/thomas)\
**Post date:** [February 23, 2024, 10:37am UTC](https://forums.balena.io/t/configuring-real-time-scheduler-with-docker-in-balena-os/156611/13 "2024-02-23T10:37:34Z")

</div>

FYI, you can support this request:

> **[A CONFIG\_PREEMPT kernel for x86\_64 device types · Balena Roadmap](https://roadmap.balena.io/posts/115/a-config_preempt-kernel-for-x86_64-device-types)**
>
> In order to enable real-time /low-latency robotics and drone applications while running Balena. Add a CONFIG\_PREEMPT kernel configuration with CONFIG\_
