
| May 14, 2012 | |
| May 11, 2012 | |
This news is actually a bit old, but I thought I’d make use of my new presence on planet.freedesktop.org to say that the Media Player Remote Interfacing Specification is now using FreeDesktop.org infrastructure, instead of a hodge-podge of other services.
You can view the specifiation, file a bug, view the git repository and participate on the mailing list.
If you’re creating an MPRIS2-capable media player, you may want to make use of the MPRIS tester application (which is actually not hosted on fd.o, but on GitHub).
| May 10, 2012 | |
mkdir -p xorg/util git clone git://anongit.freedesktop.org/git/xorg/util/modular xorg/util/modular cd xorg ./util/modular/build.sh --clone --autoresume built.modules /opt/xorgThat takes a while but if any component fails to build (usually due to missing dependencies) just re-run the last command. The built.modules file contains all successfully built modules and the script will simply continue from the last component. Despite the name, build.sh will also install each component into the specified prefix.
./util/modular/build.sh -L > module_list vim module_list # you can skip fonts, apps (except xkbcomp) and exotic drivers ./util/modular/build.sh --clone --autoresume built.modules --modfile module_list /opt/xorgEither way, you end up with /opt/xorg/bin/Xorg, the X server binary. I just move my system-installed and then symlink the new one.
sudo mv /usr/bin/Xorg /usr/bin/Xorg_old sudo ln -s /opt/xorg/bin/Xorg /usr/bin/XorgNext time when gdm starts the server, it'll start the one from git. You can now update modules from git one-by-one as you need to and just run make install in all of them. Alternatively, running the build.sh script again without the --clone parameter will simply git pull in each module.
alias mpx=". $HOME/.exportrc.xorg"and that file contains
export PKG_CONFIG_PATH=/opt/xorg/lib/pkgconfig:/opt/xorg/share/pkgconfig export LD_LIBRARY_PATH=/opt/xorg/lib/ export PATH=/opt/xorg/bin:$PATH export ACLOCAL="aclocal -I /opt/xorg/share/aclocal" export MANPATH=/opt/xorg/share/man/So running "mpx" will start git versions of the clients, link clients against git versions of the libraries, or build against git versions of the protocol.
Notification to speakers
The GUADEC 2012 programme committee took a bit more time than first anticipated to evaluate all talk submissions, but it's now all done: this morning, we finally sent the notification to speakers. Thanks to everyone who submitted a talk: it looks like we'll have a great GUADEC :-) Of course, we still need to create the schedule, but that should be trivial, right? (hmm...)
If you submitted a talk and didn't get a positive or negative answer by mail, please first check your spam folder: mail is from guadec-papers, and contains Your talk at GUADEC 2012
in the subject. If you don't find anything, feel free to ping me.
Help organize the lightning talks!
Next step is the call for lightning talks and for BoFs! I guess this will happen in the next few days. I don't think we have anyone in charge of this yet, so if that's something you'd like to help with, just drop us a quick mail on guadec-list and we'll happily give you a I'm fantastic: I'm helping organize GUADEC
badge ;-)
| May 08, 2012 | |
setlocal noexpandtab shiftwidth=8 tabstop=8The alternative is to add a snippet to the file itself but not every maintainer is happy with that.
/* vim: set noexpandtab tabstop=8 shiftwidth=8: */
| May 07, 2012 | |
| May 06, 2012 | |
My attempt at Letting Go, by Andrew York:
Two weeks ago we built a slackline setup in our back yard. The issue we had was that we don't have any trees back there to tie up to. Common solutions in this case involve building an A frame and using whatever sort of anchor you can come up with, with plenty of options available.
We first used the system last Sunday with great success. It's a typical 4-carabiner primitive system but we used a double pulley system behind that to get enough tension from a single person tightening that you'd stay off the ground in the middle. There was a disturbing amount of bending and some creaking in the 4x4s, but they held.| May 04, 2012 | |
| May 03, 2012 | |
We are working on putting together a miniconf on the topic of Boot & Base OS for the Linux Plumbers Conference 2012 in San Diego (Aug 29-31). And we need your submission!
Are you working on some exciting project related to Boot and Base OS and would like to present your work? Then please submit something following these guidelines, but please CC Kay Sievers and Lennart Poettering.
I hope that at this point the Linux Plumbers Conference needs little introduction, so I will spare any further prose on how great and useful and the best conference ever it is for everybody who works on the plumbing layer of Linux. However, there's one conference that will be co-located with LPC that is still little known, because it happens for the first time: The C Conference, organized by Brandon Philips and friends. It covers all things C, and they are still looking for more topics, in a reverse CFP. Please consider submitting a proposal and registering to the conference!
| May 01, 2012 | |
There's one feature In the upcoming Fedora 17 release that is immensly useful but very little known, since its feature page 'ckremoval' does not explicitly refer to it in its name: true automatic multi-seat support for Linux.
A multi-seat computer is a system that offers not only one local seat for a user, but multiple, at the same time. A seat refers to a combination of a screen, a set of input devices (such as mice and keyboards), and maybe an audio card or webcam, as individual local workplace for a user. A multi-seat computer can drive an entire class room of seats with only a fraction of the cost in hardware, energy, administration and space: you only have one PC, which usually has way enough CPU power to drive 10 or more workplaces. (In fact, even a Netbook has fast enough to drive a couple of seats!) Automatic multi-seat refers to an entirely automatically managed seat setup: whenever a new seat is plugged in a new login screen immediately appears -- without any manual configuration --, and when the seat is unplugged all user sessions on it are removed without delay.
In Fedora 17 we added this functionality to the low-level user and device tracking of systemd, replacing the previous ConsoleKit logic that lacked support for automatic multi-seat. With all the ground work done in systemd, udev and the other components of our plumbing layer the last remaining bits were surprisingly easy to add.
Currently, the automatic multi-seat logic works best with the USB multi-seat hardware from Plugable you can buy cheaply on Amazon (US). These devices require exactly zero configuration with the new scheme implemented in Fedora 17: just plug them in at any time, login screens pop up on them, and you have your additional seats. Alternatively you can also assemble your seat manually with a few easy loginctl attach commands, from any kind of hardware you might have lying around. To get a full seat you need multiple graphics cards, keyboards and mice: one set for each seat. (Later on we'll probably have a graphical setup utility for additional seats, but that's not a pressing issue we believe, as the plug-n-play multi-seat support with the Plugable devices is so awesomely nice.)
Plugable provided us for free with hardware for testing multi-seat. They are also involved with the upstream development of the USB DisplayLink driver for Linux. Due to their positive involvement with Linux we can only recommend to buy their hardware. They are good guys, and support Free Software the way all hardware vendors should! (And besides that, their hardware is also nicely put together. For example, in contrast to most similar vendors they actually assign proper vendor/product IDs to their USB hardware so that we can easily recognize their hardware when plugged in to set up automatic seats.)
Currently, all this magic is only implemented in the GNOME stack with the biggest component getting updated being the GNOME Display Manager. On the Plugable USB hardware you get a full GNOME Shell session with all the usual graphical gimmicks, the same way as on any other hardware. (Yes, GNOME 3 works perfectly fine on simpler graphics cards such as these USB devices!) If you are hacking on a different desktop environment, or on a different display manager, please have a look at the multi-seat documentation we put together, and particularly at our short piece about writing display managers which are multi-seat capable.
If you work on a major desktop environment or display manager and would like to implement multi-seat support for it, but lack the aforementioned Plugable hardware, we might be able to provide you with the hardware for free. Please contact us directly, and we might be able to send you a device. Note that we don't have unlimited devices available, hence we'll probably not be able to pass hardware to everybody who asks, and we will pass the hardware preferably to people who work on well-known software or otherwise have contributed good code to the community already. Anyway, if in doubt, ping us, and explain to us why you should get the hardware, and we'll consider you! (Oh, and this not only applies to display managers, if you hack on some other software where multi-seat awareness would be truly useful, then don't hesitate and ping us!)
Phoronix has this story about this new multi-seat support which is quite interesting and full of pictures. Please have a look.
Plugable started a Pledge drive to lower the price of the Plugable USB multi-seat terminals further. It's full of pictures (and a video showing all this in action!), and uses the code we now make available in Fedora 17 as base. Please consider pledging a few bucks.
Recently David Zeuthen added multi-seat support to udisks as well. With this in place, a user logged in on a specific seat can only see the USB storage plugged into his individual seat, but does not see any USB storage plugged into any other local seat. With this in place we closed the last missing bit of multi-seat support in our desktop stack.
With this code in Fedora 17 we cover the big use cases of multi-seat already: internet cafes, class rooms and similar installations can provide PC workplaces cheaply and easily without any manual configuration. Later on we want to build on this and make this useful for different uses too: for example, the ability to get a login screen as easily as plugging in a USB connector makes this not useful only for saving money in setups for many people, but also in embedded environments (consider monitoring/debugging screens made available via this hotplug logic) or servers (get trivially quick local access to your otherwise head-less server). To be truly useful in these areas we need one more thing though: the ability to run a simply getty (i.e. text login) on the seat, without necessarily involving a graphical UI.
The well-known X successor Wayland already comes out of the box with multi-seat support based on this logic.
Oh, and BTW, as Ubuntu appears to be "focussing" on "clarity" in the "cloud" now ;-), and chose Upstart instead of systemd, this feature won't be available in Ubuntu any time soon. That's (one detail of) the price Ubuntu has to pay for choosing to maintain it's own (largely legacy, such as ConsoleKit) plumbing stack.
Multi-seat has a long history on Unix. Since the earliest days Unix systems could be accessed by multiple local terminals at the same time. Since then local terminal support (and hence multi-seat) gradually moved out of view in computing. The fewest machines these days have more than one seat, the concept of terminals survived almost exclusively in the context of PTYs (i.e. fully virtualized API objects, disconnected from any real hardware seat) and VCs (i.e. a single virtualized local seat), but almost not in any other way (well, server setups still use serial terminals for emergency remote access, but they almost never have more than one serial terminal). All what we do in systemd is based on the ideas originally brought forward in Unix; with systemd we now try to bring back a number of the good ideas of Unix that since the old times were lost on the roadside. For example, in true Unix style we already started to expose the concept of a service in the file system (in /sys/fs/cgroup/systemd/system/), something where on Linux the (often misunderstood) "everything is a file" mantra previously fell short. With automatic multi-seat support we bring back support for terminals, but updated with all the features of today's desktops: plug and play, zero configuration, full graphics, and not limited to input devices and screens, but extending to all kinds of devices, such as audio, webcams or USB memory sticks.
Anyway, this is all for now; I'd like to thank everybody who was involved with making multi-seat work so nicely and natively on the Linux platform. You know who you are! Thanks a ton!
| April 30, 2012 | |
Another month is at end, and it looks like a good timing for another update about the Intel Linux Graphics project.
As usual, starting with Kernel, I can say that this way a very, very busy month, and we had more kernel patches during this time than I can remember from the past. Several patchbombs came through, such as:
Besides those major patch series, we had several patches for i8xx interrupts handling and gen2 fixes (which also helps to answer the question whether the old i8xx graphics cards are still supported
), improvements in page flipping, turbo initialization, Sandy Bridge GPU hangs in Google Maps/Earth, proper IPS polling which should be limited to Gen5 architecture now, pineview clock gating and several backlight fixes, besides all the other smaller ones.
On 2D driver side, the major news of the past month was the release of Glamor 0.4 acceleration backend. The biggest changes are the support for DRI2 and texture from pixmap functionalities, co-existance with AIGLX, many performance optimizations for pixmap uploading/downloading, full GLES2 color formats support and a new texture cache pool mechanism to reduce texture/fbo creating and destruction overhead and considerable improve overall performance.
Still on the 2D side of things, a new Cairo 1.12.2 release went out. This is a largely bugfixing release, which fixed a large number of issues which were found out since the Cairo 1.12 got released. Chris Wilson has also carried out a performance evaluation of Cairo 1.12.2 with different backends in his blog.
On Mesa side, lots of bugs were fixed, as usual, and among the most interesting updates for the past months that I caught were:
Moving to Wayland, the patches that caught my attention were:
And, last but not least, we’ve gone through the list of the open freedesktop.org and kernel.org bugzillas, and managed to scrub dozens of fixes in the past few weeks, solving a huge variety of issues – from i8xx-specific bugs up to recent GPU turbo issues after idle on newer machines. If you have a bug open with us, take a look if it is still active – chances are that many of the issues you could have were already gone
. And if it still there, it would be a great time to check it again and verify if the drm-intel-next tree is still affected by it. As Kernel 3.5 merge window gets closer, it is a very good timing to try to address the remaining issues prior to its opening.
That’s all for now – stay tuned for future news from the Intel Linux Graphics land, and enjoy the International Workers’ Day meanwhile – if your country considers it as a holiday, of course
!
The X.org window server is the foundation of the Linux desktop today. There are hopes that we will be moving to Wayland in the near future, but for now everything in Ubuntu and other desktop Linux distributions depend on X.org as the window server.
Unfortunately, X.org has very limited testing. There are some unit tests of internal functions, but much of the bugs in X are caused by specific server state that cannot be easily replicated in unit testing environments. There are some testing functionalities provided by XTest, but it does not provide a testing environment or framework. This poor test support has left us with very little testing. Practically no bug fixes are accompanied by regression tests, so bugs can reappear in later releases without anyone knowing.
I have been working on a project to bring better integration testing to X.org. Thomas Voss and I created xorg-gtest, which is a gtest wrapper to provide a real X.org environment for running tests and some useful utility functions and test fixtures. We have been using it for uTouch testing, which you can see at the Ubuntu Jenkins console, and last week I proposed the first regression test for the upstream X.org server.
There are a few key things that xorg-gtest provides:
Making testcase writing easy is a key goal of xorg-gtest. The testcase developer can subclass the xorg-gtest base test fixture, which sets up an X11 display connection, and then start writing the test case. Due to the features of gtest, the test case does not need to be explicitly registered; linking the test case into the test program is all that is needed. Further, the developer does not need to write a main() function for the test program. An xorg-gtest main() function is provided as a standalone library and should be sufficient for almost all testing requirements. The following is a really simple example testcase:
#include <xorg/gtest/test.h>
using namespace xorg::testing;
TEST_F(Test, MyExampleTest) {
EXPECT_NE(0, DefaultRootWindow(Display()));
}
All that is needed is to compile this file and link it with the xorg-gtest and xorg-gtest_main libraries. The following will be output when the test runs:
$ ./xorg-gtest-example
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up. [----------] 1 test from Test [ RUN ] Test.MyExampleTest [ OK ] Test.MyExampleTest (175 ms) [----------] 1 test from Test (175 ms total)
[----------] Global test environment tear-down [==========] 1 test from 1 test case ran. (3181 ms total) [ PASSED ] 1 test.
The test X.org server is started and stopped in the “Global test environment set-up” and “Global test environment tear-down” phases. In five lines of code we have created a simple test that runs against a headless X.org server. Simple!
There are limitations, of course. The default test server configuration provided by xorg-gtest uses the xf86-video-dummy driver. This allows for running the test server without interrupting your current desktop session. For input testing this works great, but it falls short of what would be needed for some graphical and graphics driver testing. For 2D graphic tests that are not driver specific it may be possible to query the dummy framebuffer contents. For 3D or driver-specific tests the dummy graphics driver won’t work. However, the xorg-gtest provided main() function has the –no-dummy-server option to force tests to be run in the existing X session. Thus, it may be possible to use xorg-gtest for xf86-video-intel testing when running in an existing X session on Intel hardware.
For more information on xorg-gtest, please see the documentation at http://people.freedesktop.org/~cndougla/xorg-gtest/. For a real world X.org testcase, see my proposed test for XIQueryPointer with touchscreens here. Note the parameterized test instantiation at the very bottom of the patch. It shows how to easily test different behavior for different XInput client versions.
A month in, and we’re starting to get some good feedback from people trying cairo-1.12. Unfortunately, it appears that we’ve exposed some bugs in a few drivers, though hopefully we will see driver updates to resolve those issues shortly. We also received a few bug reports against Cairo itself. The most bizarre perhaps was that LibreOffice failed to display the presentation slideshow. That turned out to be an inadvertent bug caught by better error detection – though since that affected the established API, we had to relax the checks somewhat. Along with a few other bug fixes, Cairo 1.12.2 was released.
In the last round of benchmarking I performed, some of you noticed that the glamor backend for the Intel driver was not included. It was left out for the simple reason that it was not able to complete the task. However with the first stable release of glamor-0.4, it is able to complete a benchmarking run. And so without further ado, let’s see how all the current drivers fare on a SandyBridge i5-2500 desktop with GT1 integrated graphics and a Radeon HD 5770 discrete GPU with cairo-1.12.2.
This time the results are normalized to the performance with Xvfb. Any driver that performs a test faster is above the centre, any that were slower below. Again the general state of the drivers leave much to be desired, and despite the bold claims for glamor, in my testing it fails to improve upon UXA. Early days you might say.
| April 28, 2012 | |
| April 27, 2012 | |
![]() |
| Galaxy Nexus running Weston and simple-shm. |
![]() |
| The original simple-shm client on a Weston desktop. |
![]() |
| The proposed appearance of simple-shm, the way it is supposed to look like. |
![]() |
| This is how the proposed simple-shm looks like when the X-channel is mistaken as alpha. |
| April 26, 2012 | |
SUSE is hiring people for the Boosters team! This is the team I've been involved in in the last few years, so I thought I'd share with you a few words on this...
The Boosters are working on enabling openSUSE contributors to reach their goals. This can involve technical diving, an artistic vision (not required, obviously, or I woulnd't be in the team ;-)), marketing fun, talking at events, discussing issues, etc.: all skills are welcome in our team, as all skills are welcome and needed in the community! It's really an amazing job where you're simply part of the community and your goal is to help the community move in the right direction. On top of that, I have to mention that the Boosters team is full of great minds, and we're enjoying every day working
on something we love!
Dream job, some might say :-)
Are you interested? Check out the details and apply! You can also check the other open positions at SUSE, there might be the one you're looking for... Oh, and as we keep hiring, remember to check out the careers page every now and then to see the latest openings!
Jason just pointed out in this email that the fact that we had a window of opportunity during the netbook boom that was lost was a failure of GNOME as a project. I'd like to point out that first of all, I think that if an ISV and an OEM failed to use GNOME and engage with our community to affect change so that they could build their own product, it's their failure, not ours. Nonetheless he has a point.
It's worth noting that people buying netbooks just wanted more portable and cheaper version of the traditional Windows desktop, and that's why demand for netbooks shrunken after a while. It failed to match the expectation of the user, and no matter how good and perfect GNOME was back then, we would have failed to match that expectation.
However we can learn a few things about what's been happening since then.
I am not saying that we are not making steps towards this goal at all, a lot of work is being done, but if we could concentrate the same amount of energy that we did for the 3.0 release on this goal, the possibilities are pretty encouraging.
| April 25, 2012 | |

Having signed and sent of my contract I think the time has come to let the every one know that I am starting to work for what I think is a very cool company in just two Months, Red Hat. I have been a Red Hat and later Fedora user ever since I first tried Linux back in the late 90ties (by installing either 4.1 or 4.2 of Red Hat Linux), so it does feel like a bit of a homecoming for me. And in my opinion Red Hat is still what they where back then, the biggest driving force behind pushing linux and open source forward. And this is what I hope to be a part of by joining Red Hat, to play my part in continuing to push new innovations into the operating system and through that make it an even better choice for more and more users and organisations out there.
It is still with a bit of melancholy that I leave Collabora behind as I am very proud of the team we built there over the last five years. The amount of features and maturity we managed to put into GStreamer over those years and all the new usecases we managed to cover is quite amazing. But with Rob and Philippe at the helm I am sure the company will continue to prosper even without me.
I will of course continue to be a part of the GStreamer community and will be working with both Collabora and the GStreamer community for instance on organizing this years GStreamer Conference (hope to have the GStreamer Conference 2012 page up in a few days). So while I am now moving onto a new challenge I do not plan on leaving all the great people and friends I made behind, in fact since my new role at Red Hat will be as part of the Desktop team I will continue to haunt a lot of the same conferences and gatherings in the years to come
.
Also as part of this new job I will be moving to Brno in the Czech Republic, joining the 400 strong Red Hat team there. For me, the best thing about living in Brno, in addition to being a very nice city, is that it will allow me to put even more pressure on Jimmac to create a new icon for Transmageddon, as he will be living only a few hours away by car
#
# === Google Calendar (from Microsoft Exchange; iCalendar) ===
#
:0 c:
* H ?? ^Content-Type: multipart/(alternative|mixed)
* B ?? ^Content-Type: text/calendar
{
:0 Wac: Mail/multipart.lock
| munpack -q -t -C ~/Mail/.munpack 2> /dev/null
:0 Wac: Mail/multipart.lock
| /home/oliver/bin/calendar.sh
:0 Wac: Mail/multipart.lock
| rm -f ~/Mail/.munpack/*
}
:0 Wc: Mail/multipart.lock
* H ?? ^Content-Type: multipart/(alternative|mixed)
* B ?? ^Content-Type: text/calendar
{
:0 Wac:
| munpack -q -t -C ~/Mail/.munpack 2> /dev/null
:0 Wac:
| /home/oliver/bin/calendar.sh
:0 Wc:
| rm -f ~/Mail/.munpack/*
}
This beautiful undocumented recipe is actually quite simple, but perhaps needs some explanation. From man procmailrc:A line starting with ':' marks the beginning of a recipe. It has the following format: :0 [flags] [ : [locallockfile] ]
zero or more conditions (one per line) exactly one action line
#!/bin/bash
http_proxy=http://proxy.example.com:8080
CALENDAR_ID='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX@group.calendar.google.com'
for i in ~/Mail/.munpack/*; do
if [ -n "$(grep 'BEGIN:VCALENDAR' ${i} 2> /dev/null)" ]; then
expect -dc \
"spawn /usr/bin/cadaver -p ${http_proxy/http:\/\/} \
https://www.google.com/calendar/dav/${CALENDAR_ID}/events ; \
expect \"dav:\" ; \
send \"put ${i}\\r\" ; \
expect \"dav:\" ;
send \"bye\\r\""
fi
done
Newlines have been inserted into the script so that it doesn't break layouts on other pages; you will need to fix those if copying this script.The login should not include the @gmail.com otherwise it will fail. Happy hacking!machine www.google.com login john.doe password example123
| April 23, 2012 | |
Swift is the software behind the OpenStack Object Storage service.
This service provides a simple storage service for applications using RESTful interfaces, providing maximum data availability and storage capacity.
I explain here how some parts of the storage and replication in Swift works, and show some of its current limitations.
If you don't know Swift and want to read a more "shallow" overview first, you can read John Dickinson's Swift Tech Overview.
If we refer to the CAP theorem, Swift chose availability and partition tolerance and dropped consistency. That means that you'll always get your data, they will be dispersed on many places, but you could get an old version of them (or no data at all) in some odd cases (like some server overload or failure). This compromise is made to allow maximum availability and scalability of the storage platform.
But there are mechanisms built into Swift to minimize the potential data inconsistency window: they are responsible for data replication and consistency.
The official Swift documentation explains the internal storage in a certain way, but I'm going to write my own explanation here about this.
Swift uses the principle of consistent hashing. It builds what it calls a ring. A ring represents the space of all possible computed hash values divided in equivalent parts. Each part of this space is called a partition.
The following schema (stolen from the Riak project) shows the principle nicely:

In a simple world, if you wanted to store some objects and distribute them on 4 nodes, you would split your hash space in 4. You would have 4 partitions, and computing hash(object) modulo 4 would tell you where to store your object: on node 0, 1, 2 or 3.
But since you want to be able to extend your storage cluster to more nodes
without breaking the whole hash mapping and moving everything around, you
need to build a lot more partitions. Let's say we're going to build
210 partitions. Since we have 4 nodes, each node will
have 210 ÷ 4 = 256 partitions. If we ever want to
add a 5th node, it's easy: we just have to re-balance the
partitions and move 1⁄4 of the partitions from each node to this
5th node. That means all our nodes will end up
with 210 ÷ 5 ≈ 204 partitions. We can also define a
weight for each node, in order for some nodes to get more partitions than
others.
With 210 partitions, we can have up to 210 nodes in our cluster. Yeepee.
For reference, Gregory Holt, one of the Swift authors, also wrote an explanation post about the ring.
Concretely, when building one Swift ring, you'll have to say how much partitions you want, and this is what this value is really about.
Now, to assure availability and partitioning (as seen in the CAP theorem) we also want to store replicas of our objects. By default, Swift stores 3 copies of every objects, but that's configurable.
In that case, we need to store each partition defined above not only on 1 node, but on 2 others. So Swift adds another concept: zones. A zone is an isolated space that does not depends on other zone, so in case of an outage on a zone, the other zones are still available. Concretely, a zone is likely to be a disk, a server, or a whole cabinet, depending on the size of your cluster. It's up to you to chose anyway.
Consequently, each partitions has not to be mapped to 1 host only anymore, but to N hosts. Each node will therefore store this number of partitions:
number of partition stored on one node = number of replicas × total number of partitions ÷ number of node
Examples:
We split the ring in 210 = 1024 partitions. We have 3 nodes. We want 3 replicas of data.
→ Each node will store a copy of the full partition space:3 × 210 ÷ 3 = 210 = 1024 partitions.
We split the ring in 211 = 2048 partitions. We have 5 nodes. We want 3 replicas of data.
→ Each node will store211 × 3 ÷ 5 ≈ 1129 partitions.
We split the ring in 211 = 2048 partitions. We have 6 nodes. We want 3 replicas of data.
→ Each node will store211 × 3 ÷ 6 = 1024 partitions.
In Swift, there is 3 categories of thing to store: account, container and objects.
An account is what you'd expect it to be, a user account. An account contains containers (the equivalent of Amazon S3's buckets). Each container can contains user-defined key and values (just like a hash table or a dictionary): values are what Swift call objects.
Swift wants you to build 3 different and independent rings to store its 3 kind of things (accounts, containers and objects).
Internally, the two first categories are stored as SQLite databases, whereas the last one is stored using regular files.
Note that this 3 rings can be stored and managed on 3 completely different set of servers.

Now that we have our storage theory in place (accounts, containers and objects distributed into partitions, themselves stored into multiple zones), let's go the replication practice.
When you put something in one of the 3 rings (being an account, a container or an object) it is uploaded into all the zones responsible for the ring partition the object belongs to. This upload into the different zones is the responsibility of the swift-proxy daemon.

But if one of the zone is failing, you can't upload all your copies in all zones at the upload time. So you need a mechanism to be sure the failing zone will catch up to a correct state at some point.
That's the role of the swift-{container,account,object}-replicator processes. This processes are running on each node part of a zone and replicates their contents to nodes of the other zones.
When they run, they walk through all the contents from all the partitions on the whole file system and for each partition, issue a special REPLICATE HTTP request to all the other zones responsible for that same partition. The other zone responds with information about the local state of the partition. That allows the replicator process to decide if the remote zone has an up-to-date version of the partition.
In case of account and containers, it doesn't check at the partition level, but check each account/container contained inside each partition.
If something is not up-to-date, it will be pushed using rsync by the replicator process. This is why you'll read that the replication updates are "push based" in Swift documentation.
# Pseudo code describing replication process for accounts
# The principle is exactly the same for containers
for account in accounts:
# Determine the partition used to store this account
partition = hash(account) % number_of_partitions
# The number of zone is the number of replicas configured
for zone in partition.get_zones_storing_this_partition():
# Send a HTTP REPLICATE command to the remote swift-account-server process
version_of_account = zone.send_HTTP_REPLICATE_for(account):
if version_of_account < account.version()
account.sync_to(zone)
This replication process is O(number of account × number of replicas). The more your number of account will increase and the more you will want replicas for your data, the more the replication time for your accounts will grow. The same rule applies for containers.
# Pseudo code describing replication process for objects
for partition in partitions_storing_objects:
# The number of zone is the number of replicas configured
for zone in partition.get_zones_storing_this_partition():
# Send a HTTP REPLICATE command to the remote swift-object-server process
verion_of_partition = zone.send_HTTP_REPLICATE_for(partition):
if version_of_partition < partition.version()
# Use rsync to synchronize the whole partition
# and all its objects
partition.rsync_to(zone)
This replication process is O(number of objects partitions × number of replicas). The more your number of objects partitions will increase, and the more you will want replicas for your data, the more the replication time for your objects will grow.
I think this is something important to know when deciding how to build your Swift architecture. Choose the right number the number of replicas, partitions and nodes.
The problem, as you might have guessed, is that to replicate, it walks through every damn things, things being accounts, containers, or object's partition hash files. This means it need to open and read (part of) a every file your node stores to check that data need or not to be replicated!
For accounts & containers replication, this is done every 30 seconds by default, but it will likely take more than 30 seconds as soon as you hit around 12 000 containers on a node (see measurements below). Therefore you'll end up checking consistency of accounts & containers on each all node all the time, using obviously a lot of CPU time.
For reference, Alex Yang also did an analysis of that same problem.
Worst, the HTTP connections used to send the REPLICATE commands are not pooled: a new TCP connection is established each time something has to be checked against the same thing stored on a remote zone.
This is why you'll see in the Swift's Deployment Guide this lines listed under "general system tuning":
# disable TIME_WAIT.. wait.. net.ipv4.tcp_tw_recycle=1 net.ipv4.tcp_tw_reuse=1 # double amount of allowed conntrack net.ipv4.netfilter.ip_conntrack_max = 262144
In my humble opinion, this is more an ugly hack than a tuning. If you don't activate this and if you have a lot of containers on your node, you'll end up soon with thousands of connections in TIME_WAIT state, and you indeed risk to overload the IP conntrack module.
We also should talk about container deletion. When a user deletes a container from its account, the container is marked as deleted. And that's it. It's not deleted. Therefore the SQLite database file representing the container will continue to be checked for synchronization, over and over.
The only way to have a container permanently deleted is to mark an account as deleted. This way the swift-account-reaper will delete all its containers and, finally, the account.
On a pretty big server, I measured the replications to be done at a speed of around 350 {account,container,object-partitions}/second, which can be a real problem if you chose to build a lots of partition and you have a low number_of_node ⁄ number_of_replicas ratio.
For example, the default parameters runs the container replication every 30 seconds. To check replication status of 12 000 containers stored on one node at the speed of 350 containers/seconds, you'll need around 34 seconds to do so. In the end, you'll never stop checking replication of your containers, and the more you'll have containers, the more your inconsistency window will increase.
Until some of the code is fixed (the HTTP connection pooling probably being the "easiest" one), I warmly recommend to chose correctly the different Swift parameters for your setup. The replication process optimization consists in having the minimum amount of partitions per node, which can be done by:
For very large setups, some code to speed up accounts and containers synchronization, and remove deleted containers will be required, but this does not exist yet, as far as I know.
The opinions expressed here represent my own and not those of my employer.
| April 21, 2012 | |
| April 20, 2012 | |
It has been way too long since my last status update on systemd. Here's another short, incomprehensive status update on what we worked on for systemd since then.
We have been working hard to turn systemd into the most viable set of components to build operating systems, appliances and devices from, and make it the best choice for servers, for desktops and for embedded environments alike. I think we have a really convincing set of features now, but we are actively working on making it even better.
Here's a list of some more and some less interesting features, in no particular order:
Much of the stuff above is already available in Fedora 15 and 16, or will be made available in the upcoming Fedora 17.
And that's it for now. There's a lot of other stuff in the git commits, but most of it is smaller and I will it thus spare you.
I'd like to thank everybody who contributed to systemd over the past years.
Thanks for your interest!
Actually the UTF-8 options are not required due to the way I am launching terminals from my window manager, but it does not cause any damage. Black terminal background is mandatory!XTerm*Background: Black XTerm*Foreground: White XTerm*UTF8: 2 XTerm*utf8Fonts: 2
My friend, Mike Ward, and I help out at our kids school by teaching 5th and 6th graders programming in conjunction with a Lego class. For several years, I was teaching Logo on ancient Apple II machines. The teacher had a great curriculum and the kids learned a lot, but this year we decided to switch things around and try them out on Arduinos.
This spring, the kids are building a Lego display centered around a birthday party theme for the star elephant at the Oregon Zoo (Packy), who turned 50 last weekend. In a moment of fun, I suggested that perhaps we should have some fireworks, along with the presents and birthday cake. How hard could it be to wire up a couple of LEDs to an Arduino to make something that looked like fireworks?
Mike and I sat down to order some parts from Digikey. We found these nice, cheap, LED drivers from Sharp. Then we found a selection of LEDs from Cree along with current-programming resistors (12.7kΩ) to drive the LEDs at 20mA, and some bypass caps (0.1μF) to keep the parts happy.
The LED drivers are simple shift registers, with separate clock and data. They have both input and output pins, so you can daisy chain them and drive as many as you like from a single pair of CPU pins. We figured 160 LEDs would be plenty, so we ordered 10 chips.
The LED drivers came in a through-hole, DIP package; it seemed like we’d be able to just stuff them into a breadboard and quickly wire things up.
The LED driver chips turn out to use a much finer pitch package than the usual 0.1” spacing. There’s no way we could stuff them into a breadboard and quickly wire things up. Obviously, a bit more care while ordering would have uncovered this, but my experience with through-hole parts is limited to parts from the mid 1970s…
I soldered extension wires onto one chip to test the circuit, and managed to get one chip talking to an Arduino. Here’s a short movie of that in action:

You can see the LED driver chip sitting on a set of extension leads plugged into the breadboard. It’s hooked to the SPI port on the Arduino board, with the clock set as fast as it will go. If you watch the video, you can see that the LEDs actually vary in brightness. They’re actually being pulse-width modulated. Clocked at 2MHz, there’s enough bandwidth in the SPI bus to drive 160 LEDs with 127 discrete pulse widths at nearly 100Hz (100 * 127 * 160 = 2032000).
With the chip propped up on its extension wires, and the LEDs plugged in, the whole setup was not surprisingly fragile. Getting five of these chips wired up and running for the length of the Lego show (one day at school and two days at the zoo) seemed unlikely. So, we decided to build some custom circuit boards.
My business partner, Bdale Garbee, and I build rocketry electronics through Altus Metrum. He’s the hardware guy and I spend my weekends writing firmware for various micro-controllers. Of course, I use free software tools for the firmware, and Bdale uses the free gEDA tools for the hardware. I’ve gotten vaguely familiar with those by helping Bdale review circuit diagrams and PC board layout over the years. So I figured I’d be able to learn a bit more about them and come up with some designs.
I decided to stick two LED drivers on each board. As the chips can drive each LED with up to 50mA of current, each board could potentially consume 1.6A at 5V. Sticking a linear regulator on each board capable of supplying that much current would have required a hefty heat sink. Instead, I decided to stick a mini USB connector on the board and use some cheap USB power supplies.
Of course, there wasn’t a pre-packaged schematic symbol or footprint for the LED driver, so I first had to construct those. But, with symbols for all of the parts I used available, I drew this circuit:
It’s really easy to draw wires showing 32 LEDs hooked up to each board. Actually selecting connectors that can be easily hooked up took a bit more time. The idea of crimping individual two-pin connectors for 160 LEDs didn’t seem like fun, plus individual connectors were going to cost a small fortune (the best option I found would have cost about $0.40 per LED). Bdale suggested using ribbon cable with a crimp-on connector — crimp a connector across the whole cable and then split out two-wire sets for each LED. I’d still have to individually solder each LED to the wire, but on the board end, all I’d have to do is crimp the connector on to the cable.
The gEDA tools separate schematic design and PCB layout into two separate tools; the schematic program, gschem, exports a netlist and set of components which the schematic program, PCB, can import. This sounded a bit clunky to me, as you have to re-export and re-import the schematic data into the PCB each time you make changes, but it seems to work reasonably well in practice.
The first time the schematic data is imported to the PCB tool, all of the component footprints are simply stacked on top of one another. With those moved to sensible locations, the tool will show ‘rats’ for each netlist.
Having drawn the schematic with symbols that strongly resembled the actual components, it was pretty easy to work through the rats one at a time by painting copper on the board. I’d noticed that all of the signals could easily be routed on one side of the board, so I flooded the back side with a ground plane to keep things quiet.
The final circuit board design looks like this:
All Altus Metrum products are manufactured by Advanced Circuits, and we’ve been quite happy with them. They offer a cheap and fast prototyping service through their barebonespcb.com site. These boards are two layers with no silk screen or solder mask.
I uploaded my design and in a couple of days I got back some shiny circuit boards:
The footprint I designed for the LED drivers turned out to have a very small gap between the pads for each pin and the ground plane. This lead to a couple of shorted pins in the five boards, which were pretty easy to diagnose as the LED driven by that pin would be stuck on.
Here’s another picture with the ribbon cable connected and an LED lit up:
I started by writing a small nickle program to simulate the trajectory of a ballistic fireworks shell followed by an explosion at apogee and subsequent ballistic tracks for the resulting pieces. I made the initial conditions of the launch somewhat random, and Mike and I sat and watched that draw things until we saw a couple that looked ‘good’. The output from that was a series of X/Y locations spaced uniformly in time. Mike used those to drill holes in a piece of acrylic from TAP plastics. He glued the LEDs into that with some white glue (so that we have a chance of getting them back out):
I spent last weekend visiting my father for his birthday. Meanwhile, Mike was busy back home building a case for the project. I got home and found that he had fabricated a solid maple case. It’s beautiful, and holds all of the LEDs, boards, wires and a couple of 4-outlet USB power supplies.
Here’s a picture of the joint he made in the box corners:
Here’s the inside of the box:
And here’s a movie of the whole thing in action. It’s missing 8 white LEDs; I hadn’t ordered enough from Digikey.
The hardware design is licensed under the TAPR Open Hardware License. It’s all stored in git (of course):
git://keithp.com/git/hw/fireworks
All of the symbols I created are also available through git:
git://keithp.com/git/hw/keithp
One of the frustrating things about moving atoms around instead of just bits is that once you’ve got a physical artifact, it’s really expensive to change it. There are a couple of minor things I would change if I were going to build more of these:
Add mounting holes. Not having any way to mount the boards means that they’re flopping around inside the cabinet. We’ll probably find a way to tie them down somehow, but a couple of holes in the boards would have made that really easy.
Increase the gap between the pin pads and the ground plane. The narrow space provided ample opportunity for solder bridges. I’ve increased that spacing in the git repository version of the boards.
Used a variable resistor for LED current control. With a fixed value, it’s very difficult to adjust the relative brightness of the LEDs. Even though we used LEDs from the same series, the different colors have different apparent brightness.
Used surface mount passives. We had bought through-hole parts when the plan was to build these on a breadboard, but soldering through-hole parts onto the board is more work than using surface mount parts. 0805 (or even 1206) parts are plenty large to solder by hand and are faster to deal with than having to fold leads, insert them into holes, flip the boards over, solder them down and trim the leads.
Perhaps we went a bit overboard on this project…
There were a couple of things that went better than I had expected:
The gEDA tools aren’t that hard to use. Constructing the circuit board really was a simple matter of painting with copper. If you can drive inkscape, you can make circuit boards.
Advanced Circuits bare-bones PCB service. It was really cool to upload the output files from gEDA and have actual boards arrive in the mail a couple of days later.
Building the boards. I really didn’t expect all of the components to ‘just fit’ in the boards; I figured I’d mess up the footprints or drill sizes and end up kludging something onto the boards. Bdale did catch a small drill size on the LED driver pins, which I bumped up a bit, but other than that, all of the parts slipped in and soldered easily. Each board took about 10 minutes to put together.
| April 19, 2012 | |
xinput set-prop "device name" "Synaptics ClickPad" 1 synclient ClickPad=1This toggles a few driver behaviours to make the clickpad much more usable. Most notably, you can use one finger to press the button and another finger to move the cursor around.
Section "InputClass"
Identifier "Default clickpad buttons"
MatchDriver "synaptics"
Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
EndSection
The order of soft button edges is left, right, top, bottom for the right button, then left, right, top, bottom for the middle button. So the above snippet sets the right half of the bottom 18% to be a right button, with no middle button present. A coordinate of 0 means "stretch to edge of touchpad". [1]| April 18, 2012 | |
| April 17, 2012 | |
Off-and-on for a couple years (no kidding) I've been working on a branch that
compiles the assembly shaders (e.g.,
GL_ARB_vertex_program)
to GLSL IR. I even talked about it at XDC
2011. This project has turned
into such an incredible rat's nest of irritation that I can't even believe
it.
All of that asside, the project reached a significant milestone today. I can run retail Doom3 binaries. There are a couple caveats (incorrect rendering, have to disable HiZ on Sandybridge, etc.), but it's still significant progress. The images below are i965 on Mesa 8.0.2 (with HiZ disabled), i965 on my branch (with HiZ disabled), and classic swrast on my branch. At least at the time of this writing, there are some bugs related to separate stencil on Sandybridge that only occur when HiZ is enabled.
Today I release a Python client library to query Munin servers.
I wrote it as part of some experiments I did a few weeks ago. I discovered there was no client library to query a Munin server. There's PyMunin or python-munin which help developing Munin plugins, but nothing to access the munin-node and retrieve its data.
So I decided to write a quick and simple one, and it's released under the name of PyMuninCli, providing the munin.client Python module.
Thanks to Akira Tagoh for taking over maintenance of fontconfig. As a result of this switch, there’s a new release, 2.9.0.
Along with this new upstream release, I’ve responded to Debian bug 651493 and removed all defoma support from the fontconfig packages. Installing the new version should remove all traces of the old defoma support as well.
I’d love to hear from people with success (or not) in testing this version of the package; 2.9.0 should be uploaded to unstable in time for the next freeze.
| April 16, 2012 | |
xinput set-button-map <device name> 1 2 3 5 4Now down is up and up is down. The device name can be obtained as usual with xinput list. This will work for servers up to including 1.11.
| April 14, 2012 | |
As Starks used to say, “Winter is coming”. So in this sense, time has come for another round of updates from the Intel Linux Graphics project.
This time, it took me less time than on previous round of updates, so I think I’ll be able to give you some more details about some of the most interesting changes I’ve spotted for the past weeks.
Starting with the Kernel, many and many patches has landed into the intel-gfx mailing list. Among some of the most interesting were:
Moving to Mesa, lots of patches on all the areas as well. The most interesting ones related to the Intel GPUs that I managed to look at were:
Besides those changes, we had hundreds of patches that I left out of the scope of this update. Lots of activities are going on on many Mesa-related development, and the progress of this open-source GL implementation is looking great!
On 2D driver side, lots of patches entered the xf86-video-intel project for the past weeks, mostly related to the SNA acceleration backend, but also some glyph-related fixes and other bugfixes for UXA. All of them came from Chris Wilson, who is doing an unbelievable job on the project for the past years!
On Wayland project, as usual, lots of activity was going on. Among the most interesting developments was the addition of piglit support to the project by Chad Versace, which allows to run the piglit tests under GLX, Wayland and X11/EGL while selecting the desired window system at runtime.
And finally, on a related project, Jeremy Huddleston has released the first maintenance release for xorg-server, which fixes many input-related issues together with some RandR fixes and small memory leaks.
I guess that’s it for today. Stay tuned for future updates, and enjoy the next season of The Game of Thrones meanwhile (which works amazingly well on my Intel-based card with vaapi acceleration by the way
).
| April 13, 2012 | |
If you want to give a talk at GUADEC 2012 in A Coruña (Spain), hurry up: the deadline for the GUADEC CfP is tomorrow. Don't think twice, just go ahead and submit your talk!
| April 12, 2012 | |
This afternoon I’m giving a brief talk on the Nuanti C++/CLI compiler built on Clang at the LLVM European Conference, London.
We started this project a couple of years ago to cover the language specification in ECMA-372, having found it a pain to integrate applications and SDK written in C and C++ with .NET. Since then, the compiler has developed into a self-hosting toolchain that’s been used to port entire applications to run on Mono, Silverlight, Mac OS X and Linux.
There are two codegen modes: (1) fully managed .NET bytecode, and (2) native optimized machine code with hooks into the Mono runtime for invocations. There’s some flexibility to mix and match the two. Sometimes it’s handy to call into an existing managed library from your C++ application and this use case is simple as adding an import header and calling the methods you need. No bindings or wrappers, and if using a runtime like Mono the stack is garbage collected behind the scenes.
The frontend has all the parser support you’d expect plus CLR metadata import. Meanwhile there’s a CIL backend using the LLVM codegen infrastructure. The two work together to generate native-looking SDK-quality assemblies out of all kinds of unmanaged code.
The implementation embraces and extends the ECMA spec with dynamic types from C# 4.0, LINQ for C++, expression trees and full-blown DLR syntax trees, going beyond the original specification in many ways. This is the real interesting part, since it’s what we use to bootstrap the compiler (so it can compile itself).
We were able to port User Mode Linux and WebKit to Silverlight using this with a certain amount of patching. There are other fascinating integration points like a pretty neat Objective-C++/CLI bridge.
Our main focus has been in-game ‘scripting’ and IOS applications. Going forward we’re concentrating more on open web standards and JavaScript for the platform but this continues to be a fun R&D project with often surprising uses, and it’ll be a fun story to tell.
See you there!
(Oh, and we’re looking for developers to join our compiler team in London.)
| April 10, 2012 | |
TL;DR: systemd does not require the performance-sensitive bits of Linux control groups enabled in the kernel. However, it does require some non-performance-sensitive bits of the control group logic.
In some areas of the community there's still some confusion about Linux control groups and their performance impact, and what precisely it is that systemd requires of them. In the hope to clear this up a bit, I'd like to point out a few things:
Control Groups are two things: (A) a way to hierarchally group and label processes, and (B) a way to then apply resource limits to these groups. systemd only requires the former (A), and not the latter (B). That means you can compile your kernel without any control group resource controllers (B) and systemd will work perfectly on it. However, if you in addition disable the grouping feature entirely (A) then systemd will loudly complain at boot and proceed only reluctantly with a big warning and in a limited functionality mode.
At compile time, the grouping/labelling feature in the kernel is enabled by CONFIG_CGROUPS=y, the individual controllers by CONFIG_CGROUP_FREEZER=y, CONFIG_CGROUP_DEVICE=y, CONFIG_CGROUP_CPUACCT=y, CONFIG_CGROUP_MEM_RES_CTLR=y, CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y, CONFIG_CGROUP_MEM_RES_CTLR_KMEM=y, CONFIG_CGROUP_PERF=y, CONFIG_CGROUP_SCHED=y, CONFIG_BLK_CGROUP=y, CONFIG_NET_CLS_CGROUP=y, CONFIG_NETPRIO_CGROUP=y. And since (as mentioned) we only need the former (A), not the latter (B) you may disable all of the latter options while enabling CONFIG_CGROUPS=y, if you want to run systemd on your system.
What about the performance impact of these options? Well, every bit of code comes at some price, so none of these options come entirely for free. However, the grouping feature (A) alters the general logic very little, it just sticks hierarchial labels on processes, and its impact is minimal since that is usually not in any hot path of the OS. This is different for the various controllers (B) which have a much bigger impact since they influence the resource management of the OS and are full of hot paths. This means that the kernel feature that systemd mandatorily requires (A) has a minimal effect on system performance, but the actually performance-sensitive features of control groups (B) are entirely optional.
On boot, systemd will mount all controller hierarchies it finds enabled in the kernel to individual directories below /sys/fs/cgroup/. This is the official place where kernel controllers are mounted to these days. The /sys/fs/cgroup/ mount point in the kernel was created precisely for this purpose. Since the control group controllers are a shared facility that might be used by a number of different subsystems a few projects have agreed on a set of rules in order to avoid that the various bits of code step on each other's toes when using these directories.
systemd will also maintain its own, private, controller-less, named control group hierarchy which is mounted to /sys/fs/cgroup/systemd/. This hierarchy is private property of systemd, and other software should not try to interfere with it. This hierarchy is how systemd makes use of the naming and grouping feature of control groups (A) without actually requiring any kernel controller enabled for that.
Now, you might notice that by default systemd does create per-service cgroups in the "cpu" controller if it finds it enabled in the kernel. This is entirely optional, however. We chose to make use of it by default to even out CPU usage between system services. Example: On a traditional web server machine Apache might end up having 100 CGI worker processes around, while MySQL only has 5 processes running. Without the use of the "cpu" controller this means that Apache all together ends up having 20x more CPU available than MySQL since the kernel tries to provide every process with the same amount of CPU time. On the other hand, if we add these two services to the "cpu" controller in individual groups by default, Apache and MySQL get the same amount of CPU, which we think is a good default.
Note that if the CPU controller is not enabled in the kernel systemd will not attempt to make use of the "cpu" hierarchy as described above. Also, even if it is enabled in the kernel it is trivial to tell systemd not to make use of it: Simply edit /etc/systemd/system.conf and set DefaultControllers= to the empty string.
Let's discuss a few frequently heard complaints regarding systemd's use of control groups:
I hope this explanation was useful for a reader or two! Thank you for your time!
In case you haven't submitted your talk proposal for GUADEC 2012 in A Coruña, Spain yet, hurry: the deadline is on April 14th, i.e. this saturday! Read der Call for Participation! Submit a proposal!
| April 09, 2012 | |
| April 08, 2012 | |
Ok, I was away on holidays for the last week so I missed everything. Thanks to Simon Thum, I found the Chrome team's April fools joke: Chrome's Multitask Mode. Allegedly a mode for Chrome that allows to use multiple pointers simultaneously.
Great, except that it's just an April fool's joke, they didn't actually implement it. Even though, well, it's been a standard feature in the X.Org X server since September 2009. Yep, right. Fedora 12 had it, for example, and every version since. It's ubiquitous on the GNU/Linux desktop. GTK3 has support for it.
Being able to use two hands is quite useful, research papers on the benefits go back well over 20 years. Use cases are generally as dominant hand/non-dominant hand methods (e.g. an artist holding the palette with one hand while painting with the other one) or as equal bimanual interaction (aligning a rectangular mask around an object). All this isn't new, and as I said above this is all a standard feature in X since 2009. You really just [1] need to add it in your application. So Chrome's April fool's joke is pretty much a joke about not implementing a feature. Which, well, uhm... ok. Haha.
The video is a bit outlandish, with a guy playing golf and a shooter simultaneously. However, listening to just the audio on the video largely makes sense (except the switching off your computer part). Using two mice became natural for me quite quickly. I even conducted a user-study about users using two browser windows simultaneously to research and gather information about a specific topic. Yep, they could do it, including typing up the results in a decidedly single-user Abiword without major conflicts.
Now I'm waiting for next year's joke, maybe it's about how we drive cars with, wait for it, steering wheels.
[1] I say "just", but implementing it is really hard. It opens a can of worms about assumptions in user interface paradigms that aren't quite that simple to deal with. From a technical point of view, it's a "just" though...| April 07, 2012 | |
After a long period of very slow development of Transmageddon where most work has been in debugging issues with GStreamer 0.11 and porting existing features to GTK3 and GStreamer 0.11, I decided it was time to start thinking about where to go forward again. That said, there are still some issues with the new GTK3 and GStreamer 0.11 version, but I needed a break from just tedious porting/re-implementation work and instead start looking at some new ideas and features.
There are two major items I am thinking of. The first is what to do with the usecase of people just wanting to create a manual transcode. The goal of Transmageddon is to make transcoding simple, but the problem is that I am trying to simplify something that is inherently quite complex. The current user interface doesn’t really let you set a lot of things and I know that sometimes that will create files that doesn’t conform to the needs of the user, for instance a lot of settings are just kept from the original output file, like number of audio channels or bitrate used and so on. And many others just rely on the default values of the GStreamer elements used. I don’t want to try to support tweaking all of them through the user interface as there is no way of doing so without making the user interface either cluttered or filled with what will be for most people just gibberish. It is the problem I feel for instance Handbrake is suffering from, that yes it does let you set everything you could ever need, so it can create files that will be useable in some cases where the default user interface of Transmageddon falls short, but it also becomes a hard to navigate jungle for people. My answer to the need for that level of settings is and will continue to be the device profiles option, which I also have some plans for. That said there are a couple of features I do think would be useful to enable from the non-preset interface, like being able to resize the video, choose if you want deinterlacing or not and to allow you to choose stereo output for the audio and finally I want to allow the creation of transcoding queues, so you don’t have to wait until one transcode is finished before configuring another one.
The one special feature I already got in there, the ability to rotate the video, so that if your video for instance was shot with a camera held sideways, also felt rather arbitrary (it was put in there due to a very early bug request) to have exposed in the userinterface.
So what I have been experimenting with is as user interface which has an Advanced menu option in which you can set certain things and also enable certain extra options in the user interface.
The Transmageddon editor
Of course the Advanced menu will never become the solution to all transcoding challenges, the device profiles will still be that. But I realized that editing textfiles is not for everyone and it also makes creating advanced profiles a task for even fewer people than there needs to be. I don’t know how many people out there have made their own profiles, but the only one I ever got submitted was from Stefan Kost who made one for the N900. That is probably mostly due to lack of documentation of how to create profiles and where to put them, a problem I have been planning to remedy. That said I realized that maybe creating some kind of editor would be an even better solution, as it could provide a lot of helpful tools for profile creation and thus making it accessible to a lot more people. Which is why I been trying to prototype what such an user interface could look like.
The interface above is what I got so far, and it is just a glorified profile viewer atm, but my hope is to make it fully functional and hopefully useful to people. One feature I really want to do is to allow you to take an existing video, have the profile editor analyze it and create a new profile that will allow you to replicate the settings of that file. So when you get a new phone or device the manufacturer most likely put a sample file on it, you can then load that sample into the editor and the editor will create a profile that matches it. This will enable you to transcode other files to that profile and thus make them work on your device.
That said this will be a major task creating this editor, because I want to to contain a lot of clever logic, so that it doesn’t just end up being a glorified text editor, but I will need to test and experiement to figure out what that logic will be and how to expose it in the user interface.
Anyway, I am hoping to hear back from the community on these two new things and playing with to hear what you think, both from a usability standpoint and of course ideas for how the features could work or should not work, and what you would need to make Transmageddon suit your needs.
| April 04, 2012 | |
Smurf com•mit [smɚf kə'mĭt]
noun
Commit made, usually during a long series of commits, that makes incremental changes or tweaks while developing some larger feature or performing some larger refactor. Such commits often feature commite messages such as "almost there," "will be working soon," or "not much further now."
Commit made by a Smurf.
| April 03, 2012 | |
Students, this Friday at 1900 UTC is the deadline to apply for this year’s GSoC. It’s an awesome program that pays you to work on open-source projects for a summer (where you == a university/college student).
It’s by no means too late, but start your application today. You can find more information on Gentoo’s projects here (click on the Ideas page to get started; also see our application guidelines) and on the broader GSoC program here.
Good luck!
Apache 2.4 being out, I noticed that my good old mod_defensible did not compile anymore.
The changes in the new Apache 2.4 API were small for its concern, so it was pretty easy to update this software to make it compile again.
Honestly, I'm not sure that this module is really used into the wild, but I still think that it can serve as a good prototype for doing other things so I like keeping it around. :-)
All this has been triggered by the Apache 2.4 arrival into Debian experimental. Therefore I've updated the mod_defensible package to use the new dh_apache2, and imported it into Git at the same time.
I love a good photo project. Here are some favourites -- feel free to suggest any that you've enjoyed in the comments.
Pierre Beteille's Books/Livres:
Natsumi Hayashi's Levitating Girl:
Adele Enersen's When My Baby Dreams:
Carli Davidson's Portraits of loving pets with disabilities:
Adde Adesokan’s Triptychs of Strangers:
| April 02, 2012 | |
I didn't pay much attention to sports when I lived in England. They're much harder to ignore now that I live in the US, especially in a competitive town like Boston where each of the national titles in basketball, American football, ice hockey and baseball have been won by a local team at least once since 2000.
Mad just won her lab's March Madness bracket (this involves making predictions on the winners and losers of 63 college basketball games, and getting more of them correct than the other people who are competing with you) so we've watched a lot of basketball games recently, and I like to watch my countryman1 Andy Murray play tennis when I can.
I've also been trying to decide what my favorite sport is. Sometimes people ask you things like that here. I think they're mainly asking to see whether I say something "outlandish" about soccer being better than American Football, or cricket being the zenith of physical competition between teams. I find that I enjoy watching basically all of them, especially with friends. My actual answer is long and complicated, so I'll write it out here. I'm going to concentrate on popular sports in the US, since that's where I live now.
As Mako pointed out to me, it's rarely worth tuning in to a basketball game before the last five to ten minutes. A 10-15 point deficit is by no means insurmountable with ten minutes left to play, and teams are rarely more than 20 points ahead by then. You generally won't have missed the decisive portion of the game if you wait until the last quarter to start watching, which makes watching the first three quarters feel unsatisfying somehow.
The NBA tries to make the league more competitive between teams by having a draft where the teams that didn't make the playoffs in the previous season get the first choice of upcoming college players in the new season; it also has a salary cap and luxury tax. I like these ideas in principle, but they don't seem to be working in practice yet: the NBA has teams that repeat championship wins more often than the NFL, showing that these rules are not working to break up domination by a few teams.
Morale seems to be a particularly visible aspect of basketball given the frequent scoring — one team going on a 10-0 run is common, often with the other team coming back with a reversed run later, and that's satisfying to watch.
Basketball seems especially prone to having games be decided by controversial referee decisions, most of which can not be appealed or corrected.
Baseball has no salary cap, and has the far worse equivalent of a luxury tax which sends money to the MLB organization itself when a team pays over a salary limit. This does not bother teams like the New York Yankees or Boston Red Sox, which continue to spend ridiculous amounts on players undeterred. The last game of the 2011 season, between the Red Sox and the Tampa Bay Rays, was between a team with a $156M payroll and a team with a $37M payroll2. Why is that supposed to be fun or fair to watch? I guess it could be fun if you always cheer for the team that is vastly outperforming its payroll (as Tampa Bay did against Boston that night!), but otherwise I don't see the point.
As for Mako's decisive-moment metric, baseball almost has the inverse problem to basketball — a bases-loaded homer in the 3rd inning (for example) can often decide the game right there, so you have to start watching at the beginning to be confident of not missing a decisive play. The games are pretty long too. I think there's a middle ground between early-decisiveness and last-minute-decisiveness that I prefer instead.
I like that the NFL has a direct salary cap, so no team can spend many times more on players than another team as they do in baseball. I also like the amazing speed, agility and split-second instincts that NFL players exhibit. The decisiveness seems about right. The system for appealing rulings and referring to instant replays works well.
But I hate that the NFL has a problem with chronic traumatic encephalopathy that it is basically doing nothing about. Many veteran players are suffering from this form of early-onset dementia. This exposé by GQ in 2009 (GQ, really?!) is completely damning, and I think it should be required reading for anyone who watches NFL football. There's also Malcolm Gladwell's article in the New Yorker directly comparing American football to dogfighting, which seems sound to me.
But wait, you say! This season the NFL instituted new rules on what type of hits are allowed. These rules entirely miss the point — as you'll read in the GQ article, professional footballers take the equivalent of multiple car crashes of sub-concussion every game, and none of the plays that cause these sub-concussions were illegal before the new rules or are illegal after them. The new "devastating tackle" rule bans tackles that look gruesome, while leaving alone the hits that are known to cause permanent brain injury when repeated as they are on almost every play. It's a cover up, and the player-safety equivalent of security theater.
We also don't get to see NFL teams practice, yet the HITS data referred to by the GQ article suggests that practices contain many sub-concussions too, and can be as damaging as the games themselves. If the players spend 80% of their time practicing and 20% playing in season games, then practice could be responsible for 80% of the brain injuries due to concussion they get, and we don't even see it happening.
My preferred solution is to remove helmets altogether, as rugby does. Faced with the option of colliding heads at 100 gs of force but without a helmet, it seems likely that players would just decide not to do something so ridiculous with their heads.
I'm not at all expert in ice hockey, but it seems to me that it has the same safety problems as football, plus legalized and celebrated fighting between players. Gross.
It's nice to have an individual sport as well as team ones. Psychology and willpower often seem to become the dominant factor in who wins a game, and that's exciting to watch. I guess it ties back into my experience playing Chess and Go, and individual tennis might be my favorite sport for that reason alone.
At first glance it seems like tennis has the same decisiveness problems as baseball, with it being hard to come back from an early deficit, but it doesn't really. Tennis doesn't keep an absolute cumulative score in the same way as baseball — you can lose the first set in a 1-6 blowout and win the second set 7-6, and then everything's all square again even though you only won 8 games and your opponent won 12. The baseball equivalent would be something like if you could make up for your opponent's third-inning bases-loaded homer with a well-timed single run afterwards, and that would certainly keep the games closer.
Tennis refereeing decisions can be appealed with a challenge system that works well.
Has the "beginning of the game can decide the match" problem of baseball. Clubs refuse to institute a salary cap, leading to the same kind of disparity that baseball has between teams — in 2008, the median Premier League total team salary was $44M/year, yet Chelsea spent3 $172M/year!
Worse, continuing to refuse to use instant replay to correct poor referee decisions (in 2012!) is basically unforgivable, and caused significant international dispute during the last World Cup. Peter Singer wrote an article about the ethics of cheating in football that I agree with wholeheartedly; I don't think soccer players make good role models under the current rules (with the possible exception of Lionel Messi's refusal to flop).
Singer looks for an instance of overtly ethical play in soccer, but even the one example he manages to find is not a good one. He mentions Robbie Fowler in 1997 being awarded a penalty which he tries to decline, but the referee insists that he take it. Singer says that Fowler takes the penalty "in a manner that enables the goalkeeper to save it", but that's not what happens — the keeper does get a hand to the shot, but then it spills back out and one of Fowler's teammates puts in the rebound for a goal. If Fowler actually wanted to decline the penalty, he could have simply not aimed it at the inside of the goal. Fowler says that he was not intending to miss, and was playing with acceptance of the referee's decision even though he didn't agree with it.
Okay, so I have complaints and likes about every sport. How do I decide which one is my favorite? In the true spirit of utilitarianism, I have a nerdy idea about comparing sports against each other using the axes I care about directly: the satisfyingness of Mako's decisive moment's timing, the long term safety of the players, the impact of referee decisions on the outcome and the impact that money has on the strength of each team; but I'll break this post up here and wait until my next post to detail my calculation. Of course, these variables might be much more important to me than to you. What do you think? Are there more variables that you'd add for consideration? How does your favorite sport stack up in these metrics? Do you want to set me straight on ice hockey?
1: No, I'm not trying to claim that Andy Murray is English like me; he is Scottish. But apparently the United Kingdom is a country that consists of countries, even though that makes no sense, so he's still my countryman.
2: Figures are from http://baseballplayersalaries.com/.
3: Stats from http://www.trophy4toon.co.uk/salaries.html. I can't find total salary data that's newer than 2008.
I do have a SandyBridge desktop. This system is a bit special as it is the one in which I can run a discrete card in direct comparison to the ingrated processor graphics, i.e. run both GPUs simultaneously (but not yet co-operatively). In this system I put a Radeon HD5770 which at the time was a mid-range GPU offering good value for performance. So how does Cairo fare on this box? In particular are the DDX drivers any better than pixman, the backend for Cairo’s software rasteriser?
Once again the white baseline in the centre represents the performance of the image backend, how fast we expect to be able to render the contents ourselves. Above that baseline, the driver is faster; below slower, laggy and power hungry. This is quite a busy graph as it compares the performance of the propietary fglrx driver and the open-source radeon driver along with the alternative acceleration methods for the integrated graphics. I’d recommend viewing at full size, but the gist of it is that in many cases the propietary driver lags behind the open-source effort. Neither are truly comparable to just using the CPU and only the open-source effort is ever faster. In contrast, we have the integrated processor graphics. Even this GT1 desktop system (only half the GPU capability of a GT2 system such as found on mobiles and on a few desktop chips) can outclass the CPU. When not limited by a poor driver, that is.
| planet.fd.o | ||
|
planet.freedesktop.org is powered by Venus,
and the freedesktop.org community.
|
||