Bug 810801 - ntpd cann't set the realtime scheduler
ntpd cann't set the realtime scheduler
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: ntp (Show other bugs)
16
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Miroslav Lichvar
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-09 04:37 EDT by Michael Tatarinov
Modified: 2012-05-15 08:54 EDT (History)
3 users (show)

See Also:
Fixed In Version: ntp-4.2.6p5-2.fc17
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-08 00:15:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michael Tatarinov 2012-04-09 04:37:44 EDT
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@1.2483-o 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@1.2483-o 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 04:39:44 EDT
ups... sorry... another version ntpd

Actual results:
Apr  9 12:38:32 n3331 ntpd[1176]: ntpd 4.2.6p4@1.2324-o 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 06:05:57 EDT
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 09:28:21 EDT
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 04:41:50 EDT
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 11:44:25 EDT
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 00:15:52 EDT
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 07:40:13 EDT
whether it will be fixed in the Fedora 16?
Comment 8 Miroslav Lichvar 2012-05-15 08:54:25 EDT
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.