Tales of an IT Nobody

devbox:~$ iptables -A OUTPUT -j DROP

mk-heartbeat – sample conf file July 26, 2011

There’s not a whole lot (if any) documentation on what the file for the –config parameter for Maatkit‘s mk-heartbeat should look like.

If you quickly pilfer through the source code, what it’s looking for becomes pretty straight forward (It’d be nice to have this in the documentation, however).

The config files are newline delimited and resemble a my.cnf file using ‘param=value’ notation.


Sample config

So this would be launched using something like:

In my book, this is essential behavior to avoid having your password hang out on the output from ps

No Comments on mk-heartbeat – sample conf file
Categories: mysql

All of your PHP code is going to look silly! PHP 5.4, here we come! July 22, 2011

No, not as in 5.4 will make you write stupid code. As in it will make all pre-5.4 attempts to maximize re-use through crazy inheritance chains look ridiculous compared to what traits will deliver.

I already have a sense of dread of being a year into PHP traits looking at not-too-old code; how painful it will be to look back at what kind of crap we put up with!

This is going to be awesome, and I for one, welcome our new trait supporting overlords.


I recently had a discussion with a peer and we pretty much summarized what we wish the stance on types for PHP will become something like this:

PHP is a loosely typed language, as it matures in OOP, it must support more strict typing features (including generics: string, int, float, bool, etc). Emphasis on support, not enforce.

Those who want to leverage the dynamics of loosely typed programming can go for it, there’s a place for everyone here to do what they want.

It’s the hippy thing to do!

P.S.: Here’s a fun conjecture about the php.net domain name and a get-rich-quick scheme!

No Comments on All of your PHP code is going to look silly! PHP 5.4, here we come!
Categories: php programming

Nay say for ext2/ext3, seemingly ext4 for MySQL servers July 19, 2011

 Basically I felt compelled to make a note regarding what filesystem to evaluate when you are performing a MySQL install. There seems to be a lot of reasons NOT to use the ext filesystems, and instead use XFS..

This is a straight out quote from a MySQL at Facebook blog entry:

ext-2 and ext-3 lock a per-inode mutex for the duration of a write. This means that ext-2 and ext-3 do not allow concurrent writes to a file and that can prevent you from getting the write throughput you expect when you stripe a file over several disks with RAID. XFS does not do this which is one of the reasons many people prefer XFS for InnoDB.

More on IO concurrency from  MySQL big name Domas Mituzas

  • O_DIRECT serializes writes to a file on ext2, ext3, jfs, so I got at most 200-250w/s.
  • xfs allows parallel (and out-of-order, if that matters) DIO, so I got 1500-2700w/s (depending on file size – seek time changes.. :) of random I/O without write-behind caching. There are few outstanding bugs that lock this down back to 250w/s

 A patch for ext4 was created, but it doesn’t appear that it made it in; it seems to yield minimal benefit.

And some other performance and risk observations involved with the most wildly used ext3.

If you’re looking to install or upgrade a MySQL server, it may very well be worth the time investment to research the depths of what filesystem you select, since it has just as much to do with the database performance as the MySQL configuration itself! 

No Comments on Nay say for ext2/ext3, seemingly ext4 for MySQL servers
Categories: databases mysql servers

Worthy of distribution: Reset root MySQL password July 18, 2011

Oh snap! Need to reset your mysql root/admin (or any?) MySQL password? Well, you’ll need root and control over MySQLd to some extent, but this is worthy of a rainy-day bookmark indeed: http://mysqlpreacher.com/wordpress/2011/03/recovering-a-mysql-root-password-three-solutions/

No Comments on Worthy of distribution: Reset root MySQL password