Better disk allocation with MythTV and XFS

Running MythTV on XFS? Noticed that all your recordings end up rather fragmented? (use xfs_bmap to find out) Well, the culprit is MythTV not being too nice to the file system. Good news is, it’s rather fixable.

From the MythTV source code, edit libs/libmythtv/ThreadedFileWrite.cpp and look for the following:

void ThreadedFileWriter::Sync(void)
{
if (fd >= 0)
{
#ifdef HAVE_FDATASYNC
fdatasync(fd);
#else
fsync(fd);
#endif
}
}
You then want to, after the first squiggly bracket (a { ) put in a “return;” so that it looks like this:

void ThreadedFileWriter::Sync(void)
{
return;
if (fd >= 0)
{
#ifdef HAVE_FDATASYNC
fdatasync(fd);
#else
fsync(fd);
#endif
}
}

Recompile MythTV and go!

(Before anybody says, yes – this patch could be neater and all that… I just haven’t had time yet).

Practical MythTV for $14.95US

Julie at Apress let me know that over at Bookpool: Practical MythTV: Building a PVR and Media Center PC they’re having a big sale of Apress titles, including Practical MythTV.

So over there now for (a bit) less than $15US you can get Practical MythTV. Pretty neat. So everybody should go buy two copies (buy one get one free… right? :)

At some point soon, I’ll even post how I go with upgrading my MythTV box to Ubuntu 7.10 (Gutsy)… once I gather up the courage to do so :)

MythTV and poor quality DVB reception

So… I’ve been getting really poor DVB reception recently. I mean bad…. as in next to nothing is getting recorded… and anything HD is more noise than image (or sound).

A symptom of this is that the mythbackend (and indeed frontend) can crash when processing really bad MPEG2 (recording) files. So, if you get poor reception and crashing frontend/backend.. this is probably why.

Even loading the list of recordings from MythWeb can be problematic (as it has to generate the preview image).

Just something to watch out for… hopefully i’ll track it down a bit and be able to file a sensible bug report.

Another positive review for Practical MythTV!

Over at fosswire.com, there’s a review of Practical MythTV. Here the copy of the book was provided by our publisher, Apress – who are getting some copies out there to people to look at and review (and the reviews are positive which is great news for us!).

You can get Practical MythTV from Amazon for under $20USD at the moment… which is pretty cool.

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!

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.

Mikal reports the book has shipped!

My co-conspiritor Mikal (a geek from Canberra living in Silicon Valley) reports that copies of the book have arrived at his house! Not only that, Amazaon is reporting it’s in stock!

Now, hoping that because I’ve just moved the books still get to me… eep.  Expect me to be going around showing off the book as soon as I get it. I reckon it’s cool :)

book writing tools

I’m involved in the authoring of two books at the moment – both using different tools, neither of which would be my choice if it was up to me. One is using DocBook, writing raw incredibly verbose XML… which honestly, isn’t that much fun. The other is in Microsoft Word (well, OpenOffice.org Writer for me). The last time I really used Microsoft Word really seriously was probably around 1998/1999 with Office 98 on the Mac. It was a pretty awesome suite of software actually. Especially after the update that fixed a few crashing bugs :)

One thing I do notice though is the collaboration tools in OOo Writer are nowhere near good enough. The notes are small yellow rectangles where you either have to hold the mouse cursor over them to read them (ick, slow) or double click them and scroll right forever to read the whole or in conjunction with the last way, use the object browser.

Also, track changes doesn’t really track changes to things you’ve changed. i.e. i cannot edit the same thing twice and keep both changes. urgh. I’m pretty sure MS Word let me do that… It certainly allowed me to use versions in a Microsoft Word format document – which, unfortunately, a lot of the world still primarily deals with.

If these few things were fixed it would be a much better word processor.

It’s always frustrated me how poorly word processors handle large files too (except perhaps Nisus Writer… that was certainly a neat app). Add a bunch of images and your file now takes ages to open and save. blergh.

As for figures in DocBook, there seems to not be much input and output processing… i.e. if you put in SVG and you output to HTML it doesn’t output very nicely (puts in SVGs into small windows) and probably completely doesn’t work on browsers that don’t do SVG.

I sometimes wonder if we’ve really moved on to something better than LaTeX and xfig…. okay, there are better tools than xfig for a large number of diagram types.