[Tfug] Re-nice... erm, and runlevels.

Bexley Hall bexley401 at yahoo.com
Thu Mar 12 08:41:58 MST 2009


Hi, Jeremy,

[I was thinking of you/optics as I was "stitching" photos
together the other day -- wondering what magic lies in
the algorithms used therein   :> ]

> Interesting question. I have no pertinent contribution, but
> it brings up a point that occasionally keeps me up nights.

Yikes!  World Hunger, The Economy, etc. keep *me* up...  ;-)

> For the longest time, I have felt like there are two
> aspects of linux (and perhaps other *nixen) that go sadly
> underused: (1) nice and (2) runlevels.

Run levels are SysV-ish (which makes you wonder why Linux
doesn't embrace them more).  Traditionally, very *coarse*
controls like "Single user mode", "multi-user", "networking
services on", etc.  I'll admit I've rarely seen any more
judicious use than this (I've seen a "backup mode" on one
system that prevented multiple users from signing on during
system backup).

> I still feel like a runlevel should be dedicated to
> low-power mode for laptops whereby switching runlevels
> removed power-hungry modules and set certain hardware
> into low power mode, or standby and shutdown
> unneeded services that otherwise keep spinning up disks.

For "laptops in general"?  Or, for laptops running off
batteries?  (e.g., I don't like disk-intensive applications
running on laptop as most laptop disks are slow).

You also bring up an interesting possibility -- using different
run levels to configure stock distributions for different
types of use.  E.g., server vs. workstation vs. ???

> Especially stuff like 3D graphics drivers and various services.
> Laptopmode is one thing, but it just seems like runlevels would
> be a powerful tool for changing such a state of the system, and
> you could still have a config/updatescript that allows choice
> of what gets switched on/off.

Run levels in BSD are managed in a somewhat ad-hoc manner.
You have to "order" the various actions in configuration
directories.  So, adding a new action involves picking (gambling)
a numeric value that will put that action in relative sequence
with other actions (I guess there could be a tool to automatically
reorder/renumber the existing actions so you could "insert this
before action #24").

But, even that could be changed as Ithink it is only there for
hysterical raisins.

> Uh.. and back on topic, similarly to nice levels. We should
> use those more effectively too. :-)

But, how often *do* you re-nice something?  It seems like
you typically just "let it run" and/or kill off competitors
(note that closing a window is essentially the same thing).

--don


      




More information about the tfug mailing list