Shallow Thoughts : tags : linuxworld
Akkana's Musings on Open Source, Science, and Nature.
Sun, 12 Aug 2007
The best thing at Linuxworld was the Powertop BOF,
despite the fact that it ended up stuck in a room with no projector.
The presenter, Arjan van de Ven, coped well with the setback and
managed just fine.
The main goal of Powertop is to find applications that are polling or
otherwise waking the CPU unnecessarily,
draining power when they don't need to.
Most of the BOF focused on "stupid stuff": programs that wake up
too often for no reason. Some examples he gave (many of these will
be fixed in upcoming versions of the software):
- gnome-screensaver checked every 2 sec to see if the mouse moved
(rather than using the X notification for mouse move);
- gnome volume checked 10 times a second whether the volume has changed;
- gnome-clock woke up once a second to see if the minute had rolled
over, rather than checking once a minute;
- firefox in an ssl layer polled 10 times a second in case there was a
- the gnome file monitor woke up 40 times a second to check a queue
even if there was nothing in the queue;
- evolution woke up 10 times a second;
- the fedora desktop checked 10 times a second for a smartcard;
- gksu used a 10000x/sec loop (he figures someone mistook
milliseconds/microseconds: this alone used up 45 min on one battery test run)
- Adobe's closed-source flash browser plugin woke up 2.5 times a
second, and acroread had similar problems (this has been reported to
Adobe but it's not clear if a fix is coming any time soon).
And that's all just the desktop stuff, without getting into other
polling culprits like hal and the kernel's USB system. The kernel
itself is often a significant culprit: until recently, kernels woke
up once a millisecond whether they needed to or not. With the recent
"tickless" option that appeared in the most recent kernel, 2.6.22,
the CPU won't wake up unless it needs to.
A KDE user asked if the KDE desktop was similarly bad. The answer
was yes, with a caveat: Arjan said he gave a presentation a while back
to a group of KDE developers, and halfway through, one of the
developers interrupted him when he pointed out a problem
to say "That's not true any more -- I just checked in a fix while
you were talking." It's nice to hear that at least some developers
care about this stuff! Arjan said most developers responded
very well to patches he'd contributed to fix the polling issues.
(Of course, those of us who use lightweight window managers like
openbox or fvwm have already cut out most of these gnome and kde
power-suckers. The browser issues were the only ones that applied
to me, and I certainly do notice firefox' polling: when the laptop
gets slow, firefox is almost always the culprit, and killing it
usually brings performance back.)
As for hardware, he mentioned that
some linux LCD drivers don't really dim the backlight when you
reduce brightness -- they just make all the pixels darker.
(I've been making a point of dimming my screen when running off batteries;
time to use that Kill-A-Watt and find out if it actually matters!)
Wireless cards like the ipw100 use
a lot of power even when not transmitting -- sometimes even more than
when they're transmitting -- so turning them off can be a big help.
Using a USB mouse can cut as much as half an hour off a battery.
The 2.6.23 kernel has lots of new USB power saving code, which should help.
Many devices have activity every millisecond,
so there's lots of room to improve.
Another issue is that even if you get rid of the 10x/sec misbehavers,
some applications really do need to wake up every second or so. That's
not so bad by itself, but if you have lots of daemons all waking up at
different times, you end up with a CPU that never gets to sleep.
The solution is to synchronize them by rounding the wakeup times to
the nearest second, so that they all wake up at
about the same time, and the CPU can deal with them
all then go back to sleep. But there's a trick: each machine has to
round to a different value. You don't want every networking
application on every machine across the internet all waking up at once
-- that's a good way to flood your network servers. Arjan's phrase:
"You don't want to round the entire internet" [to the same value].
The solution is a new routine in glib: timeout_add_seconds.
It takes a hash of the hostname (and maybe other values) and uses that
to decide where to round timeouts for the current machine.
If you write programs that wake up on a regular basis, check it out.
In the kernel, round_jiffies does something similar.
After all the theory, we were treated to a demo of powertop in action.
Not surprisingly, it looks a bit like top. High on the screen
is summary information telling you how much time your CPU is spending
in the various sleep states. Getting into the deeper sleep states is
generally best, but it's not quite that simple: if you're only getting
there for short periods, it takes longer and uses more power to get
back to a running state than it would from higher sleep states.
Below that is the list of culprits: who is waking your CPU up most
often? This updates every few seconds, much like the
program. Some of it's clear (names of programs or library routines);
other lines are more obscure if you're not a kernel hacker, but
I'm sure they can all be tracked down.
At the bottom of the screen is a geat feature: a short hint telling
you how you could eliminate the current top offender (e.g. kill the
process that's polling). Not only that, but in many cases powertop
will do it for you at the touch of a key. Very nice! You can try
disabling things and see right away whether it helped.
Arjan stepped through killing several processes and showing the
power saving benefits of each one. (I couldn't help but notice, when
he was done, that the remaining top offender, right above nautilus,
was gnome-power-manager. Oh, the irony!)
It's all very nifty and I'm looking forward to trying it myself.
Unfortunately, I can't do that on the
laptop where I really care about battery life. Powertop requires a
kernel API that went in with the "tickless" option, meaning it's
in 2.6.22 (and I believe it's available as a patch for 2.6.21).
My laptop is stuck back on 2.6.18 because of an IRQ handling bug (bug 7264).
Powertop also requires ACPI, which I have to disable
because of an infinite loop in kacpid (bug 8274,
75174). It's frustrating to have great performance tools like
powertop available, yet not be able to use them because of kernel
regressions. But at least I can experiment with it on my desktop
[ 13:06 Aug 12, 2007
More linux |
permalink to this entry
Sat, 11 Aug 2007
Last week was the annual trek to Linuxworld.
There wasn't much of interest on the exhibit floor. Lots of
small companies doing virtualization or sysadmin tools.
The usual assortment of publishers. A few big companies,
but fewer than in past years. Not much swag. Dave commented
that there was a much higher "bunny quotient" this year than
last (lots of perky booth bunnies, very few knowledgeable people
working the floor). The ratio of Linux to Windows in the big-company
booths was much lower than last year, especially at AMD and HP,
who both had far more Windows machines visible than Linux ones.
The most interesting new hardware was the Palm Foleo. It looks
like a very thin 10-inch screen laptop, much like my own Vaio only
much thinner and lighter, with a full QWERTY keyboard with a good
feel to it. The booth staff weren't very technical, but apparently
it sports a 300MHz Intel processor, built-in wi-fi and bluetooth,
a resolution a hair under 1024x768 (I didn't write down the
exact numbers and their literature doesn't say), a claimed battery
life of 5 hours, and runs a Linux from Wind River.
The booth rep I talked to said
it would run regular Linux apps once they were recompiled for
the processor, but he didn't seem very technical and I doubt it
runs X, so I'm not sure I believe that. For a claimed price of
around $400 it looks potentially quite interesting.
Their glossy handout says it has VGA out and can display PowerPoint
presentations, which was interesting since the only powerpoint
reader I know of on Linux is OpenOffice and I don't see that
running on 300MHz (considering how slow it is on my P3 700).
Apparently they're using Documents To Go from DataVis, a PalmOS app.
Aside from that there wasn't much of interest going on.
They split up the "Dot Org Pavilion" this year so not all the
community groups were in the same place, which was a bummer --
usually that's where all the interesting booths are (local LUGs,
FSF, EFF, Debian, Ubuntu and groups like that: no Mozilla booth
this time around). But this year
the dotorgs were too spread out to offer a good hangout spot.
It didn't look like there was much of interest at the conference
either: this year they gave us Exhibit Hall pass attendees a free
ticket to attend one of the paid talks, and I couldn't find one
on the day we attended that looked interesting enough to bother.
However, that changed at the end of the day with the BOF sessions.
The Intel Powertop BOF was an easy choice -- I've been curious about
Powertop ever since it was announced, and was eager to hear more about
it from one of the developers. The BOF didn't disappoint, though the
room did: they didn't even provide a projector (!), so we all had
to cluster around the presenter's laptop when he wanted to show
something. Too bad! but it didn't keep the BOF from being full of
I'll split that off into a separate article.
[ 11:34 Aug 11, 2007
More conferences |
permalink to this entry
Sat, 19 Aug 2006
It's been a week jam-packed with Linuxy stuff.
Wednesday I made my annual one-day trip to Linuxworld in San
Francisco. There wasn't much of great interest at the conference
this year: the usual collection of corporate booths (minus Redhat,
notably absent this year), virtualization as a hot keyword (but perhaps
less than the last two years) and a fair selection of sysadmin tools,
not much desktop Linux (two laptop vendors), and a somewhat light
"Dot Org" area compared to the last few years.
I was happy to notice that most of the big corporate
booths were running Linux on a majority of show machines, a nice
contrast from earlier years. (Dell was the exception, with more
Windows than Linux, but even they weren't all Windows.)
Linuxworld supposedly offers a wireless network but I never managed to
get it to work, either in the exhibit hall or in the building where
the BOFs were held.
Wednesday afternoon's BOF list didn't offer much that immediately
grabbed me, but in the end I chose one on introducing desktop
Linux to corporate environments. Run by a couple of IBM Linux
advocates, the BOF turned out to be interesting and well presented,
offering lots of sensible advice (base your arguments to management
on business advantages, like money saved or increased ability to get
the job done, not on promises of cool features; don't aim for a
wholesale switch to Linux, merely for a policy which allows employees
to choose; argue for standards-based corporate infrastructure since
that allows for more choice and avoids lock-in). There was plenty
of discussion between the audience and the folks leading the BOF,
and I think most attendees got something out of it.
More interesting than Linuxworld was Friday's Ubucon,
a free Ubuntu conference held at Google (and spilling over into
Despite a lack of advertising, the Ubucon was very well attended.
There were two tracks, ostensibly "beginner" and "expert", but
even aside from my own GIMP talk being a "beginner" topic, I
ended up hanging out in the "beginner" room for the whole day,
for topics like "Power Management", "How to Get Involved", and
"What Do Non Geeks Need?" (the last topic dovetailing into the
concluding session Linux corporate desktops).
All of the sessions were quite interactive
with lots of discussion and questions from the audience.
Everyone looked like they were having a good time, and I'm sure
several of us are motivated to get more deeply involved with Ubuntu.
Ubucon was a great example of a low-key, fun,
somewhat technical conference on a shoestring budget and I'd love to
see more conferences like this in the bay area.
Finally, the week wrapped up with the annual Linux Picnic in
Sunnyvale, a Silicon Valley tradition for many years and always a good
time. There were some organizational glitches this year ... but it's
hard to complain much about a free geek picnic in perfect weather
complete with t-shirts, an installfest, a raffle and even (by
mid-afternoon) a wireless network. Fun stuff!
[ 19:52 Aug 19, 2006
More conferences |
permalink to this entry
Thu, 11 Aug 2005
There's really not much to say about Linuxworld this year. It was
smaller than last year (they moved it across the street to the
"little" Moscone hall) and the mood seemed a bit subdued.
SWAG was way down: to get anything remotely cool you generally had
to register to watch a presentation that gave you a chance to get
something to wear that would enter you for a chance to win something
cool later. Or similar indirections. You had to be pretty
desperate. But maybe people were, since I saw lines at some of the
I did my annual sweep of the big booths to see
who was running Linux on their show machines. This year was the first
time that all the major booths used predominately Linux (except on
machines running fullscreen presentation software, where it's
impossible to tell). It was a huge change from past shows --
I stopped keeping tabs after a while.
I saw only one or two confirmed Windows machines each
at most of the big booths, like Intel, AMD, IBM, Sun, and even HP.
They seemed fairly evenly divided between SuSE and Redhat.
At the AMD booth, lots of machines sported cardboard signs saying
"Powered by Redhat" or "Powered by SuSE". One of
the "Powered by Redhat" machines clearly had a Start menu,
so I had to ask. The AMD rep gave me a song and dance about
virtualization technologies, pointing out that although the machine
was running Windows, it displayed both Redhat and SuSE windows which
he said were running on the same machine. Okay, that's a perfectly
good reason to be running Windows at a Linux convention. No points off
there. I suspect most of the booths showing Windows had similar excuses.
"Virtualization is the wave of the future! Everybody here is
displaying virtualization technologies," the AMD rep told me.
Indeed, virtualization was everywhere. I don't know that I'm convinced
it's the wave of the future, but there was no question that it was the
wave of the present at this year's Linuxworld.
Sweeping the hall, I passed by the Adobe booth, where
someone was giving a presentation to an audience of maybe ten people.
The projector showed a window which showed ... nothing. A blank window
border with nothing inside.
"Now, it's connecting to San Jose", explained the presenter with
apparent pride, "to get permission to display the document."
I kept walking . It hadn't finished connecting yet by the time I
was out of earshot. Perhaps the audience was somehow persuaded by this
demo to buy Adobe software. I guess you never know what people will like.
A bit past Adobe was the weirdest booth of the exhibit hall:
SolovatSoft, offering offshore software development at rates starting
at $18/hour. Honest, this was an actual booth at Linuxworld. I should
have taken my camera.
Gone were most of the nifty embedded Linux displays of yesteryear. I saw
only two: one (Applieddata.net, I think) which I've seen there
before, showing an array of fun-looking custom embedded platforms of
all sizes, and another showing Linux on various cellphones and similar
consumer devices. Only one laptop maker (Emperor) made it there, and
none of the smaller-than-laptop manufacturers -- I was hoping Nokia,
Sharp, Psion or some other maker of nifty Linux PDAs might be there.
The "Dot Org Pavilion", the place where free software groups like
Debian, Mozilla, the FSF, and the EFF have their booths, was on a
completely separate floor, and would have been easy to miss if you
didn't look at the maps in the convention guide. But it wasn't all
bad: someone on a LUG mailing list pointed out that this put them in a
nice quiet area away from the raucous advertising of the big
commercial booths in the main hall, so you could actually have a
conversation with the booth folks. Also, the dot-orgs got a nice view
out the second-floor windows compared to the cavernous indoor
I only went to one keynote, "The Explosive Growth of Linux and Open
Source: What Does It All Mean?" The description made it look like a
panel discussion, but it was really just five prepared speeches: three
suits repeating buzzwords (Dave and I amused ourselves counting the
uses of the word "exciting", and with Toastmasters reflexes I couldn't
help counting the "ah"s) and two more interesting talks (well, okay,
Eben Moglen was also wearing a suit but at least he didn't spend
his whole talk telling us about the exciting opportunities ahead for
I would have liked to have heard Mike Shaver's keynote on web
technologies, but it wasn't worth going back to San Francisco for a
second day just for that.
In the end, the real highlight of the day was hooking up with Sonja at
the Novell/SuSE booth for a nice lunch. Hooray for conferences that
give you an excuse to meet friends from far away! Catching up with
some of the Mozilla crowd was good, too. That made the trip worth it
even if the exhibit hall didn't offer much.
[ 21:25 Aug 11, 2005
More conferences |
permalink to this entry
Tue, 10 Aug 2004
A Sun employee named James Todd has been posting
paeans to Sun and their Linux support on the svlug list
I don't intend to follow up to that thread,
because I expect after 18 messages in four days
(including 9 from jwtodd spanning over 800 lines)
I expect most folks on the list would prefer to move on to other topics.
James attacks me repeatedly for my earlier blog entry
wherein I say that the machines I saw in the Sun booth were all running
Windows. He says he worked in the booth, and there were no Windows
If that's true, then that's terrific! I'm very happy to hear that
all the machines I saw with "Start" menus and Redmond-looking icons
and themes were actually just a theme Sun puts on their Linux
(or Solaris?) desktop boxes. I don't know why Sun feels it
necessary to make Linux look just like Windows -- maybe that's part
of their theory that you don't need to know what OS you're on (which
is really quite a good idea for corporate installations, and
reportedly is working quite well internally at Sun).
Perhaps they further assume that if they make the non-Windows
installations look like Windows, people will be more accepting of
the idea. I'm not sure this part is a good idea -- wouldn't it be better
if the theme sent the message "Sun" rather than "Windows",
so customers don't get the idea that they can just zip off to Dell
or somewhere and buy cheaper machines that will do the same thing?
Wouldn't it be better marketing at a show like Linux World to show
off a theme that didn't look like Windows?
But that's all marketing. If the machines were in fact running
Linux and Solaris, I'm happy to hear that I was wrong.
Time will tell whether the Windows-like theme is the
choice, and whether Sun sticks with Linux in the long run.
Of course I hope they do, and that they succeed in selling linux
boxes to corporate customers, and that the recent settlement
agreement with Microsoft does not herald a withdrawal from open source,
as it has with some other companies.
(Whether Sun has helped open source is not at issue,
and never was part of this debate, as far as I know.
They've already contributed quite a bit, with the Open Office
project, and with contributions to Gnome and Mozilla accessibility
[ 13:29 Aug 10, 2004
More linux |
permalink to this entry
Tue, 03 Aug 2004
I just got back from Linuxworld.
The exhibit floor isn't very different from last year.
A few more desktop booths, a few fewer embedded and small (e.g.
PDA) booths, still dominated by server oriented exhibits --
clustering, network monitoring and similar sysadmin tools.
The "Dot Org Pavilion" was quite a bit bigger than last year
(which I like, since that's where most of the interest is for me).
The most interesting corporate booth was Psion, which was showing
a small device midway between a large PDA (like their old Revo)
and a small subnotebook (like my Vaio SR). It has a keyboard that
looks smaller than my Vaio's, but which types very well,
surprisingly comparable to the Sony. It uses CF as its main disk,
but also has a SD/MMC slot, and PCMCIA and USB (no actual hard drive).
And a touchscreen. They claim 8 hours battery life.
They told Dave that it might sell for around
$1000-1500 (too much, probably because of the touchscreen).
They've been trying to sell
the hardware as a WinCE box to corporate buyers and vertical
markets, and I guess it isn't doing well, so they put linux on it
(a Debian variant) and brought two of them to the show to gauge
interest. It looked like they weren't expecting any interest at
all: their booth was spare, with a table with two of the devices on
it, one guy who seemed to know something and two women who just
stood around and didn't seem inclined to talk to anyone or answer
questions. No fliers, no sign, no nuthin. There were people
crowded around the booth (not thickly, but a few) both times I
passed. Perhaps they'll decide there's enough interest to go ahead.
The linuxastronomy.com guy
was there again (with a friend) showing
off a live homebuilt seismometer, recording on the show floor.
Very cool. Someone who came to visit the booth showed his latest
hack, a knoppix that boots from an NTFS partition (so it's fast and
doesn't require a CD). I suggested he show it to the open source in education
guy in the booth next door, since I'd just been
commiserating with him about how hard it is to get people at schools
(or any Windows users, really) to try something like Knoppix.
The Mozilla booth was doing great and always had a crowd around it.
Apparently they sold out of the plush firefox toys immediately,
surprising everyone since they hadn't been selling on the web site.
The Debian and local LUG (shared between LUGoD, SVLUG, PenLUG and
BayLUG) booths were both doing well, and the Gentoo booth always had
a few visitors typing on the demo machines. The Fedora staffer
looked lonely; hardly anyone seemed interested in the Fedora booth.
I did my usual quick survey of which of the big booths were running
linux in their booth. Oracle and Redhat were clear winners, with no
definite Windows boxes (a few in each case which were running full
screen presentation software so I couldn't tell what the OS was).
Sun was the worst, with only one Linux box I saw, and the rest all
Windows: no Solaris that I saw. AMD leaned toward Linux (maybe
60%), Veritas leaned the other way (60% Windows) and IBM was about
50-50 (no better than last year).
The "Golden Penguin Bowl" was strange. It's a trivia contest
between two teams of luminaries; but in this case, one team (the
Nerds) was three big-name Linux luminaries, and the other team (the
Geeks) was all Apple or BSD people with no connection to Linux at
all. Dave kept wondering, "And his connection to Linux is ...?"
About half the questions dealt with sci-fi rather than
computers, and the Geeks had a strong lead there, but the Nerds
cleaned up on the computer questions and ended up with the prize.
Timothy D. Witham (of OSDL) was particularly impressive with his
knowledge of obscure CPUs, and got several major ovations from the
audience after correcting the judges.
Then it was BOF time, and I chose the Zeroconf BOF. I'd done a
little research into Zeroconf a month ago for a possible article,
but hadn't been able to get it to work, and ran into a snag that
the sourceforge page on zcip says it's been removed because of
Apple asserting intellectual property rights over the protocol.
I hoped that the BOF would shed some light on what I was missing.
Boy, was that wrong! The BOF was a long advertisement for Apple,
run by an Apple employee, Stuart Cheshire,
and an Apple user (and former employee? I wasn't clear). It
consisted of a powerpoint presentation followed by numerous demos of
two Mac laptops talking to each other, or a Mac laptop talking to
some obscure-but-nifty piece of hardware that implements rendezvous
(or whatever Apple is calling it now). After about an hour of this
I finally asked where linux fit in, and the answer boiled down to,
"Gee, linux doesn't really do zeroconf very well and we wish it did,
we're hoping someone writes it."
He mentioned zcip as one of the options, so I made the mistake of
asking about the message on sourceforge about Apple's patents, and
got a long lecture on how beneficent apple was and how they'd never
sue anyone other than in self defense, and anyone who says otherwise
is probably trying to push an anti-patent political agenda,
but poor apple has to have patents to protect itself from mean
companies. And besides, he thinks the patent expired a couple
of weeks ago, but it was a good patent, which may seem obvious
now but probably wasn't back when it was issued.
Hoping to get back on track after unintentionally derailling the
conversation, I asked what Linux users should use given
that his first suggestion, zcip, was unavailable. He mentioned
HOWL, by Scott Herscher (who was there at the session),
which implements all three parts of zeroconf.
Googling later at home, I found it at
software. It's apparently a mixture of BSD licensed code and
Apple licensed code. But it doesn't seem to require signing the
Apple developer agreement to download it. I haven't tried it yet.
He said that the zcip part of zeroconf would be much better
implemented in the kernel, where it would be only about twelve lines
of additional code. (He seemed to be talking about the "choose a
random number, check for traffic, and back off if it's occupied"
portion. Isn't there more to zcip than that? Or is the rest
already there in the kernel?) He wondered why no one was adding it.
Dave asked, "So, why don't you do it? C'mon, just twelve lines!"
Stuart was not amused, and said that while writing the twelve lines
wasn't a problem, setting up the build environment for the kernel
takes a lot of time, far more than he had available.
Speaking of that Apple license and agreement,
Stuart says that there's nothing
prohibiting Apple licensed code like zeroconf from being distributed
in any linux distro, and he seemed surprised and perturbed that no
distro was shipping it (of course, the fact that it just released
a couple weeks ago might have something to do with that. :-)
Other bits I wasn't previously clear on: a machine can have a link local
address and a regular IP address concurrently, on the same ethernet
card. I'm not clear how this shows up in ifconfig (if it does).
Link local addressing is not required for the other two parts of
zeroconf: MDNS and service discovery should work even over normal
Some of the docs on the web about zeroconf say that MS is backing a
service discovery protocol called SLP, rather than the DNS-SD protocol
used by Apple, and that most people think SLP scales much better
than DNS-SD. As presented at the BOF, both Apple and MS support
Rendezvous as it exists now (but then why point out that Apple's
Rendezvous is now available for Windows? If Windows already does
it, why would anyone need to register with Apple and download
different software? I wasn't clear on that) and UPNP, backed by
MS, is losing ground and probably won't win in the long run.
Perhaps UPNP is a renaming of SLP. I declined to ask about the
scaling issues, having already unwittingly caused enough trouble
asking about patents.
Great quote from Stuart, possibly sufficient to justify sitting
through an hour and a half of Apple advertising:
he was talking about somebody having trouble with a networked
printer which it turned out had been configured to have a
non-default IP, then returned to Fry's, and added
"Fry's is the Silicon Valley Hardware Lending Library."
Incidentally, the BOF area was supposed to have wi-fi, with an
essid that was given on the signs, but I got "access point out of
range". I guess I really should try one of the other drivers,
linux-wlan or hostap. Dancer says hostap is easier to set up,
and apparently it uses the normal wireless-tools, unlike linux-wlan
which uses its own set of tools. I don't need hostap mode, but
if it's a good driver for normal client use then I guess that's
what matters. Though the Apple people didn't see a network either,
but maybe that's because they didn't know about the essid.
[ 22:36 Aug 03, 2004
More conferences |
permalink to this entry