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

JD Rogers rogersjd at gmail.com
Thu Mar 12 19:57:06 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   :> ]

hah, nice. I need to look at that more sometime. I assume they use
autocorrelation and look for maximums, but I don't know how they do it
effectively with such small overlaps sometimes. I also need to look at
this because I keep taking all these pictures with the intent to
stitch them and make a wicked panorama, but then I just let them sit
on my drive. Meh.

>> 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...  ;-)

Touche. I'm clearly a lesser man. :-)

>> 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).

Exactly. Here there is this pretty awesome concept, already
implemented and standard, and yet we sorta just ignore it. What really
kills me if how we regress. I'm not sure if it was one of my trysts
with another distro that I'm remembering, but I remember only one
runlevel used to start X. My debian install starts up gdm/xdm/kdm in
all multi-user runlevels. I don't know, maybe that was never
standardized, but I always thought that was useful.

>> 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).

I was thinking along the lines of 3 modes: AC (all services, all
modules, full 3D, etc.. leave disks spinning so we don't wear them out
as fast and we get quicker response times), Battery normal (spin down
disks, go to lower power where it makes sense, but don't limit the
available services or interface at all),  Battery airplane (shutdown
networking, turn off all 3D, stop all services, remove modules where
possible, basically let me work on a document or a debug code, but
that's it). Mode 1 and 2 might be controlled by laptopmode within a
given runlevel, or might be different runlevels, but mode 3 could be
pretty easy to do with runlevels switching.

The downside is that it might be more akin to a reboot than people are
used to, since it might require restarting X and so forth, but I would
be fine with that  in the circumstances when it gains me an hour+ of
battery life on long flights.

> 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. ???

Ya, why not? Server vs workstation vs laptop? Seems like it would be
easy to do, especially since there are runlevels 2-5 that appear to me
to be identical on my debian system.

>> 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").

Ah, that's interesting. It seems pretty nonstandard other than 0 and 6
even across linux distros. At least debian has update-rc.d and it's
all about links in the /etc/rc#.d/ directories.  In fact, if I get off
my duff for a bit, I could probably try out some of these ideas on my
laptop and see how practical it is pretty easily.
>
> But, even that could be changed as Ithink it is only there for
> hysterical raisins.

Heh. I am now picturing that scene in airplane with everyone in a line
to slap the woman, except the woman is a dried grape.

>> 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).

I know. I had high hopes to use nice levels for something once. Now I
can't even remember what that was. I sometimes consider trying to
figure out how to renice a user though. :-)

> --don
>
>
>
>
> _______________________________________________
> Tucson Free Unix Group - tfug at tfug.org
> Subscription Options:
> http://www.tfug.org/mailman/listinfo/tfug_tfug.org
>




More information about the tfug mailing list