atd doesn't increase limit load factor on smp systems (upstart)

Bug #527723 reported by H.-Dirk Schmitt
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
at (Debian)
New
Unknown
at (Ubuntu)
Confirmed
Wishlist
Unassigned

Bug Description

Binary package hint: at

The old /etc/init.d/atd includes the following code:

# Arguments to atd
#
if uname -v |grep -q SMP >/dev/null
then
    # more as 1 CPU
    ARGS="-l 4.0"
else
    ARGS="-l 2.0"
fi

This is totally missing in the upstart job.
As consequence is atd running with the default load limit 1.5 since the migration to upstart.

Tags: precise
Revision history for this message
H.-Dirk Schmitt (dirk-computer42) wrote :

Changing the upstart job to the following will fix the issue
exec atd -l $(awk '/^processor/{cpu++}END{load=cpu-0.4; if (cpu < 2) load=1.5; print load;}' /proc/cpuinfo)

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

The atd initscript at the point this was converted to Upstart *DID NOT* have this code, that makes this a wishlist only.

Unfortunately your patch is incorrect; Upstart will folllow the awk process pid, rather than atd's. Also this kind of grep/awk on every boot for everyone is exactly the kind of thing we do not want to do on every boot.

It would be better to patch atd's C code to call uname() itself and check for "SMP" in utsname.version

Changed in at (Ubuntu):
status: New → Confirmed
importance: Undecided → Wishlist
Revision history for this message
H.-Dirk Schmitt (dirk-computer42) wrote :

Another general solution could be the reinventing auf /etc/defaults for tweaking service confgurations.
e.g. cron loglevel coud be tweaked this way before the migration to upstart.

Revision history for this message
H.-Dirk Schmitt (dirk-computer42) wrote :

atd process pid:

/var/run/atd has the right pid of the atd process.
So I doesn't understand the point that upstart follows the awk pid.

Changed in at (Debian):
status: Unknown → New
tags: added: precise
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.