- finding out that my laptop warranty doesn’t cover fan beyond 12 months. fuckers. #
- and the fuckers and now focused on me getting my broken hard-disk replaced. #
Powered by Twitter Tools.
Powered by Twitter Tools.
Sitting in the last lightning talk session of OSDC2007 and in a couple of hours will be (surprise) jumping on a plane back home.
Has been a good and interesting conference. Met cool people, done cool hacking and chatting around the place.
Gave my talk today, and seemed to go down well…. at least Paul Fenwick liked it :)
Bug ID: 6493264 Solaris libc should provide posix_memalign
At least it’s acknowledged as a problem :)
Although I now have to go and implement it in the NDB portlib.
I wish we could drop support for everything other than linux 2.6… would make this stuff a lot nicer.
Powered by Twitter Tools.
Powered by Twitter Tools.
So Rusty gave me this idea for simulating crashes in libeatmydata to check durability of application data with stuff hitting the rust in interesting ways. Preserving fsync barriers, but mucking with the data before the last one and crashing. Then, recovery should all work.
Interesting… something to soon hack on…
Following my successful linux.conf.au talk “Eat My Data: How Everybody Gets POSIX File I/O Wrong“, I started to feel the need to easily be able to have my data eaten.
Okay, not quite. However, when you’ve written your software properly, so it uses fsync() correctly, opening files with O_SYNC or whatever – tests take longer as you’re having to wait for things to hit the rust.
So….. LD_PRELOAD=libeatmydata.so to the rescue! With a POSIX compliant fsync() (that does nothing) and filtering on open(2), it can take your test run times down dramatically.
The only time you shouldn’t use it for your tests is when you end up crashing the machine to test durability (i.e. when the OS doesn’t have the opportunity to cleanly write out the data to disk).
See the libeatmydata project page: http://www.flamingspork.com/projects/libeatmydata/
and the bazaar repository: http://www.flamingspork.com/src/libeatmydata
(it’s seemed to have saved somewhere between 20 and 30% of the time for innodb/ndb tests in mysql-test-run).
Powered by Twitter Tools.
Powered by Twitter Tools.
Powered by Twitter Tools.
Mail me for details! (Obviously only really applicable if you’re in Melbourne this Saturday night)
Powered by Twitter Tools.
Powered by Twitter Tools.
Powered by Twitter Tools.
Powered by Twitter Tools.
Powered by Twitter Tools.
Powered by Twitter Tools.
Powered by Twitter Tools.
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).