ndb_mgm pr0n

ndb_mgm> all report MemoryUsage

Node 1: Data usage is 11%(632 32K pages of total 5440)
Node 1: Index usage is 22%(578 8K pages of total 2592)
Node 2: Data usage is 61%(3331 32K pages of total 5440)
Node 2: Index usage is 40%(1039 8K pages of total 2592)
ndb_mgm>

Oh, and that’s coming from saved command history.

(as seen when upgrading my cluster here to mysql-5.1.19 ndb-6.2.3 – i.e. MySQL Cluster Carrier Grade Edition – i.e. the -telco tree)

Things that have recently stalled….

  • compressed backup patch
    • actually works rather well… and restoring from compressed backup too.
    • need to modify the rate-limiting code though… may as well rate limit the writing of the *compressed* data stream… otherwise the option isn’t nearly as useful
  • compressed LCP patch
    • well… the *restoring* of compressed LCPs…. can write them
  • working out exactly what more information I want out of the linux memory manager to find out what kswapd is really doing (and the patch that exports the right info)
  • re-jigging my procmail filters for commits@lists.mysql.com
  • fixing up my offlineimap patch and getting it in upstream
  • disk pre-allocation for MythTV recordings
  • buying workstation
  • unpacking the last few boxes around the house
  • finishing this list.

Run Backup, Run!

Over the past N weeks/couple of months, we’ve been making a number of improvements to how backups are done in MySQL Cluster.

Once you get to large data sets, you start to really care about how long a backup takes.

Traditionally, MySQL Cluster has been in-memory only. The way to back this up is to just write from memory to disk (rate limited) and synchronised across the cluster.  Since memory is really fast (compared to the rate we’re writing out to disk) – never had a problem.

In MySQL 5.1 (and Cluster Carrier Grade Edition- CGE), disk based attributes are supported. This means that a row has both in memory and disk based parts.  As we all (should) know, disk seeks take a very long time. We don’t want to seek.

So, at some point recently we changed the scanning order from in-memory order (which previously made perfect sense) to on disk order. Randomly seeking through RAM is much cheaper than all the disk seeks. This greatly improved backup performance.

We also did some read-ahead work, which again, greatly improved performance.

Today, I see mail from Jonas about changing the way we read tuples for backup (and LCP) to make it even more efficient (READ_PACKED). This should also reduce CPU usage for LCP/Backup… which is a casual issue. I should really take the time to look closely at this and review.

I also wrote a patch to the code in NDB that writes files to disk to write a compressed gzio stream instead of an uncompressed one. This happens in a different thread, so potentially using one of those CPU cores that ndb wouldn’t otherwise use… and also dramatically reducing the amount of data written to disk…. this patch isn’t in any tree yet, and I’ve yet to try it with the READ_PACKED patch, which together should work rather well.

I also need to grab Brian at some point and find out why azio (as used by the ARCHIVE engine) doesn’t work the same way as gzio for basic stream writing…

puzzling dot org : Finally feminism, suggested questions

So, Mary a little while ago found Finally, A Feminism 101 Blog (and she suggested some more questions for it). It turns out to be a pretty good read and summary… one well worth keeping around to at the very least point people to.  Oh, I should post more (got about 10 good blogging ideas in the brain) but I should really stop reading interesting RSS and get back to work…

Percent geekiness is not gender specific…

So, Pia is 80% geek. That area in the brain that causes you to take internet quizzes got activated and I went and did it…. casually surprised that the first question was “what gender are you”.  After being geeky enough to debate one of the questions (the email one… you should get more points to be okay with not going for mail for a while because you instead batch it up so that you loose less time to context switching), I did the “so what if I answered this quiz as a woman”. It turns out, no difference – still the same percentage of geek.

So why is the question there? Gah… the other part of my brain (the part responsible for optimisation) is firing intensely. gah.

Somebody should blog…

So, for whatever reason, at about 2am this morning I was finding out what showed up when you googled linux.conf.au for sites in Swedish.

(actually… I do know why.. I was waiting for a a cluster to start so i could run a test)

Somebody should blog (in Swedish) about how awesome the upcoming linux.conf.au in January 2008 (in Melbourne) is coming along.

Melbourne will be much warmer and sunnier than Sweden in January. Promise.

My Top 5 Wishlist for MySQL

I’m going and stealing Jay’s idea (who stole it off Brian Duff… but his was for Oracle so obviously doesn’t count :)

So, my five wishes for MySQL Are:

5. Six-monthly release cycles

Getting a release out there takes way too long. There’s a variety of reasons, but seeing the amazing success of other free software projects taking the shorter release cycle, with each release not being too ambitious, I’m pretty convinced.

Although I think our increased use of pushbuild has helped immensely with the general quality of the tree, there’s a lot more that can be done…

4. Much more in depth automated testing

For MySQL Cluster we have (in parts) an insanely detailed test suite… lots of error injection to test failure (or, more importantly, recovery), verifying data, transactional consistency etc. Also, tests that run multiple connections, threads, simultaneous transactions and test the results programatically (comparing strings is generally not very useful… even when it comes to something as simple as IPv4 or IPv6 address!).

Part of getting here is the SoC project I’m mentoring… which should have an output of some utilities for helping write better tests (rather like we have for NDB… but for SQL instead of NDB API).

3. Sane build system

Something that not just the build team knows how to produce a binary that’s released. The other side of this is a way to build your local working tree (and test it) on BLAH platform, without pushing.

3.5. (yes, i have a 3.5)

Kill HPUX. There’s a reason the name sounds like a disease.

2. Increased liberal use of asserts

This is just a wish from a bug I’ve been tracking down where the code to build an I_S table didn’t check that we opened all the tables successfully before calling handler::info()… which promptly goes fooey because the handler hasn’t opened the table. Luckily here it’s ended in a crash… IMNSHO it’s better to bail out on an assert than possibly return crap to the user…

1. Pluggable data dictionary

There are so many oddities and “bugs” around related to the casually strange mix of data dictionaries around the MySQL Server (and Federated, NDB, InnoDB, Falcon etc) that we could do a lot better if we had a “Virtual Data Dictionary Layer”… where engines who really do have a reason to not be simple (e.g. NDB) could plug in and the MySQL Server could get all the metadata consistently from the cluster (with out own form of sane-ish caching).

This would also solve the online ALTER TABLE frm consistency problem with engines that may roll back the alter table on crash recovery (or not support querying the index until it has finished being built).

Perhaps this is something for either the next engine summit or dev conf…

It’s here! It’s here!

So, I hear you ask (ask dagnammit!), what does a MySQL Cluster hacker do when not hacking MySQL Cluster?

Well,

Today, a box arrived:

dsc_7868.JPG

I eagerly opened the box… eager for what was inside:

dsc_7869.JPG

Hrrm… this does look promising! Quickly I turned it all up the right way:

dsc_7871.JPG

It’s here! It’s here! Only about a month after Michael got his copies! Gah international shipping (and moving addresses) can be casually annoying sometimes. But anyway, it’s here, it looks sweet and now I can go set up a menu option to automatically transcode MythTV recordings to a good format for the iPod. Brilliant!

Of course, this is about how many copies you should go and buy:

dsc_7874.JPG

So kids, go order your copy of Practical MythTV today! You too, like me, can then go “hrrm… my MythTV MySQL database isn’t Clustery enough… perhaps I should run it on NDB”. :)

You should also go and get a copy of the MySQL Cluster Certification Study Guide as I have writing in it too! Yes, this past year has kept me busy!

Backups don’t suck

Today, immediately after lunch, I got IO errors from my laptop hard drive (ironically while attempting a file system dump). Words to the affect of “oh gosh and bother” exiting my mouth and the decision was made to go get a new drive.

Well… one “shortcut” to the computer store later, have new HD (will travel).

Backup from previous night, xfsrestore here I come. And a good number of hours later… about 1.5million files restored.

I do wish file systems had REPEATABLE_READ though… that would be nice.

Positive response on “Practical MythTV” from somebody who actually has the book

My trusty google alerts alerted me to: Yeraze’s Domain 2.0 – Practical MythTV (and about 15 seconds after mailing off to Mikal going all awww over it, I saw he’s blogged this already.

Not only is the review positive on the book (“5 out of 5” is a good rating), it looks as though the book will be of value to the reviewer as they expand their MythTV system (precisely one of the aims we had with the book). In fact even I am looking forward to my hard copy to use as a reference when doing some things to my MythTV system….. oh, and likely when I finally give into my mum’s requests and build her one too (yes, the same mother of mine who finds keyborad shortcuts confusing but has been using Linux on the desktop for years and now even installs her own security updates).

I feel good.

SCM performance

Linus is right when he talks about the performance of SCMs…. and that BitKeeper was about the first one to be worth using at all (really).

But as an interesting speed comparison… I’ve managed to pull the latest git (with git) and build it in less time than BitKeeper has taken to pull the latest NDB tree…. hrrm..

One of the reasons I’m so enjoying quilt for every day hacking is that it is blindingly fast.

MySQL Cluster Certification Exam

As Roland pointed out, recently a bunch of us took the MySQL Cluster Certification Exam. I was strongly encouraging people to take it (and, in fact, got the majority of people to take it… except those working on urgent customer issues or were rather new to the product).  That’s one of my cunning plans (number 8 IIRC) – to have anybody doing anything to do with MySQL Cluster inside MySQL AB to be certified (in cluster, not insane).

Response from the exam is overwhelmingly positive and as it’s new, afterwards I discussed a few questions with Roland (in fact, all the ones I got wrong). The (good!?) news is that I legitimately brain-farted on some.

As for bragging rights… I currently share the top score. I’ll also (happily) buy a (large) beer for the first person to score higher than I did. So get cracking!

(oh, warning.. this isn’t some trivial know-a-tiny-bit-and-score-really-high certification… this is a serious one).

P.S. I may have heard at some point one of our people saying they thought it was the best certification exam we have…

P.P.S. Yes, this means you should go strive towards getting it if you do anything with MySQL Cluster.

P.P.P.S. If you’re an employer/manager with people doing stuff (or will be doing stuff… or evenly possibly going to do stuff) with MySQL Cluster, get them certified!

86 Mac Plus Vs. 07 AMD DualCore. You Won’t Believe Who Wins

86 Mac Plus Vs. 07 AMD DualCore. You Won’t Believe Who Wins

Well, except I did believe it – and pretty much expected it.

Proves my suspicion that next time I need to go type a few pages of text I should just go and boot up the MacPlus (as I have little doubt that these numbers are also true for OpenOffice.org).

Of course, these days my xchat logs take up about 10x the disk space of any drive you could buy for the MacPlus….