Tuesday, April 19, 2005

MySQL UC: Day 1

It's day 1 at the MySQL Users Conference.

Wake at 6:30 am PDT. Legs are a little stiff, but I expected much worse.

The free breakfast, rather than being the typical "continental breakfast", is a "full breakfast", which turns out to be a buffet: Pancakes, eggs, potatoes, bacon, sausage, cereal, etc. The normal price for it is $10, which is way expensive, but you get coupons which make it free.

Caught the 55 bus to Old Ironsides. Bus driver is not familiar with the route; he's driven it before, but not lately, and so he drives the route with one of the little route maps for riders. I still don't think the last stop was in the right place, but it was a block away from the hotel, so I can't complain.

There's also a trolley. One interesting thing about the trolley is the machine that sells you tickets speaks three languages: English, Spanish, and Vietnamese.

Morning session: MySQL Cluster

The clustering works like a new storage engine: When you create your tables, use ENGINE=NDB to use the cluster. You can have multiple mysqld front-end servers use the same cluster.

The data storage is handled by data nodes. The nodes implement replication and distribution. For a given table, rows are distributed across nodes based on a hash function. Each row is stored on n nodes, where n>0. n=1 is less reliable than no clustering at all. n=2 is most common; n=4 is the practical upper limit. For the rest of this, n=2 is assumed.

The nodes are partitioned into node groups. Each node group stores n fragments (some subset of a table). You can lose all but the last node of a node group before the cluster shuts down. If you have 32 nodes with two replicas (n=2), you get 16 node groups, and your table is split across all 32 nodes, with each fragment replicated.

WTF Moment: This is an in-memory database. Your database size is limited by the amount of RAM in your data nodes. However, the node perform checkpoints and snapshots, and so your data does get saved to disk. I spoke to Arjen Lentz during lunch, and he said this feature was purchased from Ericsson, and was developed for a telecom application where latency had to be minimized, and it was specified as an in-memory database. Disk database support is planned for the future. It was somewhat disturbing to find out about about 1/3rd of the way through, though, since it's probably the most important constraint on designing your cluster.

Afternoon Session: Advanced MySQL Optimization Tutorial

I knew this tutorial was in trouble when we got through 36 of 138 slides by the halfway break. We only got to slide 87 by the end. Most of the advanced material was in the last half of the slides, as near as I can tell. You know you're in trouble on your presentation when the screen saver keeps coming on. I don't think I learned anything cool from this.

The tutorial sessions are three hour presentations (with a half-hour break in the middle), or 180 minutes, so if you've got 138 slides, and want 15 minutes at the end for questions, that gives you about 70 seconds per slide. With my own presentation coming up on thursday, I'm targeting about a minute per slide, and the first third I'm planning to whiz through in about 10 minutes.

I don't think I learned anything cool from this.


Fine dining from Carl's Jr.

No comments: