[Bug 229632] Re: ntpd should run niced

2011-08-19 Thread nutznboltz
You are supposed to be able to use the -N (--nice) option to ntpd but upstream ntp bug report shows it doesn't work: http://bugs.ntp.org/show_bug.cgi?id=1230 Testing on 11.04 $ lsb_release -ds Ubuntu 11.04 $ uname -srv Linux 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:07:17 UTC 2011 $ ntpd

[Bug 229632] Re: ntpd should run niced

2011-08-19 Thread nutznboltz
I thought it might be because the setpriority() call was tried after permissions were dropped but running as UID 0 doesn't change the niceness as seen in ps output $ (ps alx | head -1) ; (ps alx | grep ntpd) | grep -v grep F UID PID PPID PRI NIVSZ RSS WCHAN STAT TTYTIME

[Bug 229632] Re: ntpd should run niced

2011-08-19 Thread nutznboltz
When run with -N and -u 117:126 Aug 19 08:14:22 linux ntpd[14158]: sched_setscheduler(): Operation not permitted Aug 19 08:14:22 linux ntpd[14158]: setpriority() error: Permission denied Aug 19 08:14:22 linux ntpd[14158]: set_process_priority: No way found to improve our priority Freaking

[Bug 229632] Re: ntpd should run niced

2011-08-19 Thread Jamie Strandboge
This can be added to the apparmor profile to allow -N option to work: capability sys_nice, Then run: $ sudo apparmor_parser -r /etc/apparmor.d/usr.sbin.ntpd I'm preparing an upload for this policy change now. -- You received this bug notification because you are a member of Ubuntu Server

[Bug 229632] Re: ntpd should run niced

2011-08-19 Thread Jamie Strandboge
ntp (1:4.2.6.p2+dfsg-1ubuntu11) oneiric; urgency=low * debian/apparmor-profile: allow sys_nice for -N option to work. More work is needed to make ntpd start niced, so not auto-closing the bug. - LP: 229632 -- You received this bug notification because you are a member of Ubuntu Server

[Bug 229632] Re: ntpd should run niced

2011-08-19 Thread nutznboltz
I switched AppArmor for ntpd into complain mode $ sudo aa-complain /usr/sbin/ntpd Setting /usr/sbin/ntpd to complain mode. after that the ntpd -N flag started to work. $ (ps alx | head -1) ; (ps alx | grep ntpd) | grep -v grep F UID PID PPID PRI NIVSZ RSS WCHAN STAT TTYTIME

[Bug 229632] Re: ntpd should run niced

2011-08-19 Thread nutznboltz
Oops, didn't read Jamie's posts until just now, thanks Jamie! -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to ntp in Ubuntu. https://bugs.launchpad.net/bugs/229632 Title: ntpd should run niced To manage notifications about this bug

[Bug 229632] Re: ntpd should run niced

2011-08-19 Thread nutznboltz
Can an SRU for Lucid be done for the AppArmor modification too? -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to ntp in Ubuntu. https://bugs.launchpad.net/bugs/229632 Title: ntpd should run niced To manage notifications about this

[Bug 229632] Re: ntpd should run niced

2011-08-19 Thread nutznboltz
@Jamie given that the default ntpd configuration is to poll and the stability of the clock affects the polling interval[1] I would strongly suggest the default ntpd configuration be adjusted to run with the -N option since it would cut down on the load of NTP servers if polling was less frequent.

[Bug 229632] Re: ntpd should run niced

2011-08-19 Thread nutznboltz
The minimum sleep time between ntpd upstream requests is 64 seconds. With 64000 clients an ntpd server must answer one thousand requests per second. If the client ntpd clocks are very stable they will ratchet back to one request every 1024 seconds (about 17 minutes) so the same 6400 clients would

[Bug 229632] Re: ntpd should run niced

2011-08-19 Thread nutznboltz
Try with and with out ntpd -N option. Use ntpq -p or ntpdc -c peers to view the polling interval. Both reports have a poll column which is the sleep time in seconds between requests being sent out over the network to the upstream NTP source. The poll column will eventually change from 64 to 128

[Bug 229632] Re: ntpd should run niced

2011-08-16 Thread nutznboltz
@Weisi comment #7 is comment #6 in a patch file without line-breaks. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to ntp in Ubuntu. https://bugs.launchpad.net/bugs/229632 Title: ntpd should run niced To manage notifications about

[Bug 229632] Re: ntpd should run niced

2011-08-16 Thread nutznboltz
I should probably submit this change to Debian not Canonical. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to ntp in Ubuntu. https://bugs.launchpad.net/bugs/229632 Title: ntpd should run niced To manage notifications about this bug

[Bug 229632] Re: ntpd should run niced

2011-08-15 Thread Weisi
I fully support this request. Comment #6 is a good solution. Please note that due to the line-breaks the diff won't work without mangling. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to ntp in Ubuntu.

[Bug 229632] Re: ntpd should run niced

2010-05-20 Thread C de-Avillez
** Tags added: patch -- ntpd should run niced https://bugs.launchpad.net/bugs/229632 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to ntp in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings

[Bug 229632] Re: ntpd should run niced

2010-02-10 Thread nutznboltz
** Patch added: Adds an option to /etc/default/ntp to make the priority level of ntpd configurable. http://launchpadlibrarian.net/39006866/ntp-priority.patch -- ntpd should run niced https://bugs.launchpad.net/bugs/229632 You received this bug notification because you are a member of

[Bug 229632] Re: ntpd should run niced

2010-02-10 Thread nutznboltz
We are limited a single NTP upstream source due to political reasons outside our control and our Ubuntu ntpd loses sync periodically. I tried a number of solutions but they all failed. When I tried setting the ntpd server's nice value to negative eight it just works. Clearly the stability of

[Bug 229632] Re: ntpd should run niced

2010-02-10 Thread nutznboltz
Edit: while true ; do ntpq -p | grep name-of-upstream-time-source | logger -t ntpq -p daemon.info; sleep 64; done the sleep 64 was missing. -- ntpd should run niced https://bugs.launchpad.net/bugs/229632 You received this bug notification because you are a member of Ubuntu Server Team, which

[Bug 229632] Re: ntpd should run niced

2010-02-10 Thread nutznboltz
Scheduler preemption of ntpd causes the time on other systems to appear unstable since measurements are ruined if preemption occurs during them. -- ntpd should run niced https://bugs.launchpad.net/bugs/229632 You received this bug notification because you are a member of Ubuntu Server Team,

[Bug 229632] Re: ntpd should run niced

2010-02-09 Thread nutznboltz
You can edit your defaults file to run ntpd at maximum priority: --- /etc/default/ntp~ 2009-12-04 13:07:15.0 -0500 +++ /etc/default/ntp2010-02-09 17:56:07.0 -0500 @@ -1 +1 @@ -NTPD_OPTS='-g' +NTPD_OPTS='-g -N' -- ntpd should run niced https://bugs.launchpad.net/bugs/229632

[Bug 229632] Re: ntpd should run niced

2010-02-09 Thread nutznboltz
Actually the -N argument does nothing. -- ntpd should run niced https://bugs.launchpad.net/bugs/229632 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to ntp in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com

[Bug 229632] Re: ntpd should run niced

2010-02-09 Thread nutznboltz
Hacking the startup script seems to be the best temporary fix. -- default-intrepid-ntp-init-script 2010-02-09 15:01:43.255277872 -0500 +++ /etc/init.d/ntp 2010-02-09 15:02:48.0 -0500 @@ -57,7 +57,7 @@ exit 1 fi lock_ntpdate -