Archive for 29/1/2008

OLPC, by Jim Gettys

Some notes from Jim’s OLPC talk, which was full. I’ve added thoughts about (rural) Malaysia, because its naturally close to my heart. I’ve not had a similar opportunity to go around rural Australia (does it even exist?), and things are (I think) a lot better in Australia, than they are in Malaysia… I’m sure Jim’s talk video will be up soon, and his slides are worth going through – some interesting pictures there too.

Everybody wants the best for their kids. Most kids in the world, have no electricity at home :( Parents, themselves, might be illiterate or aware of the world. Teaching is not a valued profession by society, sometimes, and worse, books sometimes may not exist. Classrooms? You might not be so lucky.

So, what is the OLPC trying to achieve? A few hours of access in the computer lab every week, is not enough. Children lack opportunity, not capability. We should focus on high-quality education for all.

If schools exist in some places, there are insufficient classrooms. True, take Malaysia for example – there are two sessions to ensure folk get an education (morning, and afternoon sessions). This makes one get a fewer hours per day in school. Schools are often very crowded, so cables don’t really work.

The OLPC has a sunlight readable screen. This means classrooms can be outside. This won’t really affect Malaysians, seeing that there are actually classrooms. Electricity, might be hard to come by in some rural areas, but there are at least classrooms (or cabins, even).

In e-book mode, the OLPC runs for about 13 hours in B&W mode, and 8 hours in colour mode.

Parents tend to not be computer literate. Girls tend to have lower literacy than boys. Do we have fonts, for said languages? Does a computer interface (or even Sugar) apply, because we base our UI on metaphors?

Teachers, often only have 5-6 years of schooling themselves. Luckily in Malaysia, there are teacher training colleges, and you don’t become a teacher, unless you’ve gone through teacher training. However, teaching in Malaysia, does seem like an undesirable job (low paying, for example, might be an answer). One laptop/teacher? I honestly don’t even think this has been achieved in Malaysia.

What does one do about drop outs? Logistics, sometimes make it not feasible, for one to get to school, every day. Even in Malaysia, we know of people spending 2 hours to walk, to get to school. These stories move you, and you wonder, if its possible that they don’t have to go to school daily. People in the Klang Valley (read: Kuala Lumpur and surrounds) don’t even have electricity (or can’t afford it).

Regular laptops take about 10-20 watts, but the OLPC goal is 2W! They’re not there yet, but they’re getting there. 3-5W isn’t good enough.

A small child can generate 5-10 watts. Its a 21 watt battery. So the idea of hand cranking, too much is not good. Jim passed around a hand crank, and a solar panel. Both cost about the same, about USD$12-15. The solar panel does 5W, and costs about USD$12.

Mesh network, demands that the wireless is always on, otherwise, packets will not be forwarded.

Whats the CPU, on average, doing? Usually just refreshing the screen, and forwarding packets. Incidentally, the OLPC screens use LEDs – this makes them easy to recycle. The OLPC is an environmentally friendly laptop!

The OLPC actually turns off the CPU and most of the system – it just keeps the wireless and mostly, the display on. They use a DCON chip, and Marvell’s wireless chipset allows this to work well. During e-book reading, you’re only using 1.5-2.5 watts, depending on the screen and wireless use (so the 21 watt battery will do wonders).

Generators at schools, means that there’s a great cost, for fuel. And fuel prices are going up. So power for regular laptops, suck.

Jim highly recommends us to read Three Cups of Tea. Its been on the New York Times bestseller list for quite a while.

I noticed someone using the hand crank in the talk. The hand crank, can be mounted to a table, by the side, and then cranked. Very smart design. It however, does make noise. Imagine a classroom filled with folk, cranking their OLPCs? I don’t think the teacher will be very pleased.

The OLPC’s are hardy. You want to ensure they survive a rainstorm or a duststorm. Accidents happen, so allow kids to repair these things. A repair station can be very far away. The machine itself, can be assembled and disassembled, with a screwdriver. This could be interesting if its sent around Malaysia – rural areas in Sabah/Sarawak, and probably on the Peninsular, will definitely benefit from this.

Mountains are great for the network. Speaking to David Woodhouse earlier, and he mentioned that dry climates (like what we get in Melbourne, and generally the rest of Australia) is great for the mesh network. However, humidity, is generally not so good – this can affect Malaysia, especially during the monsoon season, the humidity goes up pretty high.

5 year life is aimed at. 2,000 battery cycles is the aim. Now, imagine replacing books? In Malaysia, 5 years means 5 years of either secondary education, or 5 years of primary education (well, its 6, but with the OLPC, I can imagine kids get to skip grades…) Books are really expensive, and while going to the schools are generally free, its not free to get books. Students going without books, is just silly. It realistically seems that the OLPC might be ideal to kids in primary school, rather than secondary school. I don’t actually know if its expandable for learning biology, chemistry, physics, etc.

The “Show Source” key exists. Learn, learning, by debugging!

The aim is to create children that will be both consumers, and creators. This I see benefiting not only Malaysia, but also Australia (ICT deficit in Australia is the largest in the budget, at something like $21 billion, and growing yearly).

Sugar: GTK+/Pango/ATK/Cairo. Python is what is used to tie it all together. Presence, allows you to build collaborative applications with each other. Take pictures, and share with people all around you. That’s what the “Share” activity in the UI is for.

How do you deal with parents who are suspicious with the OLPC, due to illiteracy? Involve them in the process. Do it upfront, don’t wait till later.

I’m actually highly moved by the OLPC. My recent travels to Vietnam, Cambodia, Thailand, India, China, and of course Malaysia, has made me think hard about what we need to do for spreading education and FLOSS. I’m sure I’ll talk about this more, later…

Trying to reliably make MyISAM crash; Maria is sturdy as

I’ve been very excited seeing that we announced the Maria Engine Preview. Giuseppe and I were trying to setup a demo, for Maria, at the lightning talks happening later today, towards the end of the MySQL MiniConf at linux.conf.au 2008. It involved MySQL with Maria, and an Asus Eee PC. For the demo, we wanted to show pulling the plug, which can be done either via a kill -9 `pgrep mysqld` or pulling out the battery of the Eee.

However, we failed to get MyISAM to reliably crash! Yes, imagine that, we actually want it to crash – pity that it might have only happened about 1/3rd of the time we tested it. The magic we were looking for:

check table t1;
+---------+-------+----------+---------------------------------------------------------+
| Table   | Op    | Msg_type | Msg_text                                                |
+---------+-------+----------+---------------------------------------------------------+
| test.t1 | check | warning  | 1 client is using or hasn't closed the table properly   |
| test.t1 | check | warning  | Size of datafile is: 23998464       Should be: 16000256 |
| test.t1 | check | error    | Recordlink that points outside datafile at 23000368     |
| test.t1 | check | error    | Corrupt                                                 |
+---------+-------+----------+---------------------------------------------------------+
4 rows in set (0.09 sec)

What we got instead was just a warning mentioning a client is using or hasn’t closed the table properly. Clearly, not so good for a demonstration.

When the magic of set storage_engine=maria; was run, and you crashed (either via pulling out the battery or doing a kill operation), Maria would survive the crash. At worst, you’ll see:

check table t1;
+---------+-------+----------+------------------------------------------------------------+
| Table   | Op    | Msg_type | Msg_text                                                   |
+---------+-------+----------+------------------------------------------------------------+
| test.t1 | check | warning  | Auto-increment value: 0 is smaller than max used value: 32 |
| test.t1 | check | status   | OK                                                         |
+---------+-------+----------+------------------------------------------------------------+
2 rows in set (0.20 sec)

So, Maria is clearly tough, as Giuseppe puts it. Give it a twirl (binaries, sources), and hop on over to the Maria Forums if you have questions. And if you’re checking out/building from source, you might find the Building MySQL from source guide handy

Alas, only a demo in a VM today . It seems more reliable inside a VM, not quite on the Eee. Besides, the poor SSD has been through quite a number of fsck’s now. BTW, one other thing to note: Maria log files seem to be pretty huge. Running it on a SSD that has about 1.5GB of free space (total, 4GB), is harsh.

For reference, the test (generally, wait for count to reach 128, switch terminals, and kill mysqld/pop battery off):

drop table if exists t1;

create table t1 (id int not null auto_increment primary key, b longblob) ;
select table_schema,table_name,engine
     from information_schema.tables
     where table_schema=schema() and table_name='t1';
insert into t1 values (1, repeat('a',1000000));
insert into t1 select null,b from t1; select count(*) from t1;
insert into t1 select null,b from t1; select count(*) from t1;
insert into t1 select null,b from t1; select count(*) from t1;
insert into t1 select null,b from t1; select count(*) from t1;
insert into t1 select null,b from t1; select count(*) from t1;
insert into t1 select null,b from t1; select count(*) from t1;
insert into t1 select null,b from t1; select count(*) from t1;
insert into t1 select null,b from t1; select count(*) from t1;
insert into t1 select null,b from t1; select count(*) from t1;

Technorati Tags: , , , ,


i