Bug 810801 - ntpd cann't set the realtime scheduler
Summary: ntpd cann't set the realtime scheduler
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ntp
Version: 16
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Lichvar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-09 08:37 UTC by Michael Tatarinov
Modified: 2012-05-15 12:54 UTC (History)
3 users (show)

Fixed In Version: ntp-4.2.6p5-2.fc17
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-08 04:15:52 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 805397 0 unspecified CLOSED watchdog cann't set the realtime scheduler 2021-02-22 00:41:40 UTC

Internal Links: 805397

Description Michael Tatarinov 2012-04-09 08:37:44 UTC
Description of problem:
ntpd cann't set the realtime scheduler

Version-Release number of selected component (if applicable):
ntp-4.2.6p4-1.fc16.i686
systemd-37-17.fc16.i686

How reproducible:
Always



Steps to Reproduce:
1. add the '-N' or '-P XX' option to /etc/sysconfig/ntpd
2. systemctl restart ntpd.service
  
Actual results:
Apr  9 12:35:53 n3331 ntpd[836]: ntpd 4.2.7p264 Mon Mar 19 08:37:28 UTC 2012 (3)
Apr  9 12:35:53 n3331 ntpd[836]: 9 Apr 12:35:53 ntpd[836]: ntpd 4.2.7p264 Mon Mar 19 08:37:28 UTC 2012 (3)
Apr  9 12:35:54 n3331 ntpd[836]: sched_setscheduler(): Operation not permitted
Apr  9 12:35:54 n3331 ntpd[836]: 9 Apr 12:35:54 ntpd[836]: sched_setscheduler(): Operation not permitted
and so on...

Expected results:
ntpd should set the realtime scheduler

Comment 1 Michael Tatarinov 2012-04-09 08:39:44 UTC
ups... sorry... another version ntpd

Actual results:
Apr  9 12:38:32 n3331 ntpd[1176]: ntpd 4.2.6p4 Thu Oct  6 15:37:56 UTC 2011 (1)
Apr  9 12:38:32 n3331 ntpd[1176]: sched_setscheduler(): Operation not permitted
Apr  9 12:38:32 n3331 ntpd[1176]: proto: precision = 0.679 usec
and so on...

Comment 2 Miroslav Lichvar 2012-04-10 10:05:57 UTC
It seems to be blocked by systemd.

Lennart, are the processes supposed to be able to change the scheduler and priority or should it be controlled only by the CPU* settings in the service file?

Comment 3 Lennart Poettering 2012-04-11 13:28:21 UTC
By default every system service gets its own cgroup in the "cpu" hierarchy, so that an apache with 100 CGI scripts doesn't get 20x more CPU than mysql with 5 processes.

Unfortunately that breaks RT for system services. (This is something that should be fixed in the kernel one day)

The fix is to specifically move ntpd back into the root "cpu" cgroup, with ControlGroup=cpu:/ in the [Service] section where RT is available.

Hope this helps.

Comment 4 Fedora Update System 2012-04-27 08:41:50 UTC
ntp-4.2.6p5-2.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/ntp-4.2.6p5-2.fc17

Comment 5 Fedora Update System 2012-04-27 15:44:25 UTC
Package ntp-4.2.6p5-2.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ntp-4.2.6p5-2.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-6798/ntp-4.2.6p5-2.fc17
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2012-05-08 04:15:52 UTC
ntp-4.2.6p5-2.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Michael Tatarinov 2012-05-10 11:40:13 UTC
whether it will be fixed in the Fedora 16?

Comment 8 Miroslav Lichvar 2012-05-15 12:54:25 UTC
I'm not sure this change alone is enough for an F16 update, it's just a config file modification and the real time scheduling is not that useful with kernel packet timestamps. If there are other bugs to be fixed, this will be included.


Note You need to log in before you can comment on or make changes to this bug.