[systemd-devel] Real Time access in a systemd control group
Barry Scott
barry.scott at onelan.co.uk
Mon Aug 1 07:01:39 PDT 2011
On Friday 29 July 2011 13:50:49 Marius Perjeru wrote:
> Hi,
>
> We configured a systemd environment, but we cannot have real time access
> when running an application.
>
> We have defined a xorg.service which starts the X, and every script
> runned gets under systemd/xorg.service control group, and because this
> control group does not have real time access (cpu.rt_runtime_us contains
> 0 value), we cannot run real time applications.
>
> I tryied to create a system_at_marius.service containing:
> [Unit]
> Description=Systemd for marius user
>
> [Service]
> User=marius
> PAMName=systemd
> ExecStart=/bin/systemd --user
>
> [Install]
> WantedBy=multi-user.target
>
> But it won't start:
> Starting Systemd for marius user...
> <29>systemd[1]: systemd_at_marius.service: main process exited,
> code=exited, status=1
> <29>systemd[1]: Unit systemd_at_marius.service entered failed state.
>
> Is there anyway that I could give real time access to some control
> groups (or services)? I know there is LimitRTTIME variable which I set
> it to infinity, but the behavior does not change.
>
> I also tried to create a realtime group, added it to
> /etc/security/limits.d/99-realtime.conf
> @realtime - rtprio 99
> @realtime - memlock unlimited
>
> And add marius user to this group. But that also did not change anything.
>
> Best Regards,
> Marius
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
>
We do this:
[Service]
StandardOutput=syslog
WorkingDirectory=/data/data/logs
ControlGroup=cpu:/ cpuacct:/screen
LimitRTPRIO=2
LimitRTTIME=60000000
CPUSchedulingPolicy=rr
CPUSchedulingPriority=1
ExecStartPre=/usr/local/onelan/ntb/bin/ntb_apply_screen_settings /etc/onelan/ntb/x.conf
ExecStartPre=-/bin/plymouth quit --retain-splash
ExecStart=/usr/bin/Xorg :0 -noreset -nolisten tcp -background none vt1 -dpi 75 -logfile /data/data/logs/screen-server.log -dumbSched -config /etc/onelan/ntb/x.conf
Barry
More information about the systemd-devel
mailing list