Bug 489171 - cron should be nicer and ionicer
Summary: cron should be nicer and ionicer
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: cronie
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Ondřej Pohořelský
QA Contact: Fedora Extras Quality Assurance
URL: https://fedorahosted.org/cronie/ticke...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-03-08 12:31 UTC by Bernie Innocenti
Modified: 2024-06-11 20:06 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-06-11 20:06:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bernie Innocenti 2009-03-08 12:31:13 UTC
It would be nice if cron would run all jobs as if they were prefixed with

  nice ionice -c2 -n6

Nicely starting the cron daemon itself would also be nice.

Have a nice nice day.

Comment 1 Bill McGonigle 2009-03-19 18:13:04 UTC
The particular values would be targets for tuning on a per-job basis, though some sane defaults are probably worthwhile (I don't need slocate to take all my I/O, thanks!).

Just to spur discussion, a proposal that steals from SELinux's MLS_LEVEL crond approach:

add to /etc/sysconfig/crond:

  IO_CLASS=2
  IO_PRIORITY=6
  NICE=10

and then modify crond to recognize:

  CRON_IO_CLASS=2
  CRON_IO_PRIORITY=6
  CRON_NICE=10

environment variables in crontabs and launch the jobs under nice and ionice if any of the above are set.  I stuck CROND_ in there to quasi-namespace them, so we don't clobber others' use of the names (which might be likely if this is filling an existing need).  The init script can launch prepend CRON_ when it starts crond.

This would be a big win for both desktops and servers, both of which tend to get unexpectedly bogged down during some common cron tasks.

Comment 2 Orion Poplawski 2013-06-13 16:48:41 UTC
This seems very reasonable.

Comment 3 Fedora Admin XMLRPC Client 2014-09-04 12:14:56 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Bernie Innocenti 2020-06-13 18:23:36 UTC
Very little is using cronie these days, but perhaps the systemd timer units are also not being spawned with batch priority and I/O class.

Comment 6 Bernie Innocenti 2024-06-11 20:06:04 UTC
cron has been superseded by systemd timers, many of which explicitly set Nice and IOSchedulingClass as appropriate.


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