You can imagine where it goes from here…

MySQL undefined “user”

I saw this odd exception today:


Caused by: java.sql.SQLException: There is no 'anotherdeveloper'@'localhost' registered
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:116

This happens after my server has started up, I’ve logged in through the web app, browsed around and then try to insert a message. It’s a little puzzling at first, how can the database user just change midstream. It turns out that it’s caused by a trigger trying to fire but the DEFINER for the trigger is set to “otherdeveloper@localhost” which is not a valid account on my local database. Would be nice if mysql import warned you about this or perhaps change it to the user the schema is being imported as if the DEFINER does not exist.

February 27, 2007 Posted by | Tech | 1 Comment

SSH throughput

I found this very good article that explains what I observed and commented on in my gigabit upgrade post, SSH is not CPU and disk bound on my gigabit network.

February 26, 2007 Posted by | Tech | 1 Comment

Eclipse Perm Gen errors

got you down? According to this article, if you’re using the Sun VM, add the following to your eclipse.ini:

-XX:MaxPermSize=[memory size]

I’m trying this right now on my Macbook Pro using the Apple supplied VM (build 1.5.0_07-154), so far so good. I hope it’s not a leaky VM. And while we’re on this topic, it would be really nice if Apple could stay a little bit more up to date with VM releases. There’s been some crappy java.util.Date bugs that’s apparently only been fixed in 1.5.0_10 which has been out for ages.

February 19, 2007 Posted by | Tech | Leave a comment

Bold font problem in Firefox on OSX

What is this? Only happens on one MacbookPro, the other with same version of OSX & Firefox is fine.

UPDATE: Fixed, I had a duplicate Arial regular font in my fontbook (indicated with a dot to the right of the font name), removed it and restarted Firefox and all is happy now!

Font rendering problem

January 5, 2007 Posted by | Tech | Leave a comment

Upgrading to gigabit ethernet

So the thing to look for is jumbo frame support, both on the switch and the NICs. Now what exactly is jumbo frame support? Depending on who you ask, it’s a network device that supports either a MTU of > 1500 (1500 is the historical limit & standard for 10/100 ethernet – incorrect) or a MTU >= 9000 (correct)

Then of course there’s the reality distortion field between manufacturer claims and The Real World(tm). This site lists some compliant hardware (jumbo frame clean).

What is the advantage of jumbo frame support? There is two major advantages:

  1. A 50% increase in throughput
  2. At the same time, a 50% decrease in CPU utilization

Almost sounds like a free lunch to me. And we all know there’s no such thing. For more detail see this great article.

So fortunately, my two Macbook Pros comes with Gigabit adapters that are Jumbo frame capable. For my Linux server I installed an Intel Pro/1000 GT desktop adapter that is rumoured to be well supported by the e1000 driver (contributed to and supported by actual Intel employees through Sourceforge).

As for a switch I decided on the Netgear GS108 which appears to support Jumbo frames too.

Configuring the MBP ethernet interfaces was easy as expected, see pic below. As for the linux server (running FC4), the card autoneg to 100Mbit/s and forcing it (ethtool -s eth1 speed 1000 duplex full autoneg off) into 1000Mbit causes it not to establish a link. I upgraded Ethtool 3 to Ethtool 5 to no avail. I also upgraded the e1000 kernel driver from what appears to be 7.0.33 to the latest 7.3.20. No luck. As a last resort I replaced the long’sh cheap ethernet cable with a shorter one that works with the MBP and.. voila! All cables involved in this episode are of Cat 5e persuasion (yes I need to get some Cat 6).

picture-1.png

So what does the actual benchmarks say? This is with iperf using a single thread:

Gigabit (1000Mbit) with MTU in brackets:

  • MBP (9000) -> Server (9000): 758Mbits/sec
  • MBP (9000) -> Server (1500): 480Mbit/sec
  • MBP (1500) -> Server (1500): 482Mbit/sec

FastEthernet (100Mbit) with MTU in brackets:

  • MBP (1500) -> Server (1500): 29.6Mbit/sec

Unstable with MTU 9000 using 100Mbit ethernet. The FastEthernet figures are surprisingly low, not quite sure why yet. As an aside, using 5 client side threads I could get to 970Mbit/s.

Eyeballing the CPU usage, during the MTU 9000 tests, the MBP averages around 50% on both cores while the server averages around 29%, during the MTU 1500 tests, the MBP averages around 70% on both cores while the server averages around 20% interestingly enough. I have not played with linux driver settings on the server at all, the e1000 driver allows for myriad of settings to be fiddled with (including NAPI).

More real world figures just from general usage, large file scp’s went from around 10Mbyte/s to around 14Mbyte/sec, totally unscientific of course 🙂 Not bad but not quite the improvement I was looking for either. The process on either side doesn’t appear to be disk or CPU bound, need to look into this more.

UPDATE: turns out the VIA Rhine linux driver doesn’t appreciate 9000MTU packages, spamming “oversized ethernet frame spanned multiple buffers” to the console and being generally unhappy with life. Which is unfortunate since this means my EPIA connected to my home theater & hifi doesn’t want to boot of the said linux server, using a NFS root fs and all unless I switch back to 1500MTU on the server. I see this problem mentioned a few places but no solutions. I’ll try upgrading the driver at some point 🙂

January 4, 2007 Posted by | Tech | Leave a comment

SMTP & POP3 on Mac OSX

I need a SMTP & POP3 server for the current project I’m working on. This would be a 10 minute operation to get going on Linux (in all fairness in part due to familiarity).

I selected Exim for SMTP and QPopper for POP3.

Exim

Pretty straight forward, installation process just like on any other *nix. Make sure $PREFIX/var/spool and $PREFIX/var/spool/log and $PREFIX/var/mail exists and are owned by the exim user (compiled into the binary, i just used account manager to add an exim user). Add sticky bit to /var/mail (chmod 1777).

QPopper

Less straight forward, configure with:

./configure –enable-debug –with-pam=pop3 –enable-standalone

The included pam sample file does not work for me, in the end i just copied /etc/pam.d/ftpd to /etc/pam.d/pop3

To test, fire it up on the command line with:

sudo /usr/local/sbin/popper 127.0.0.1:110 -d -t /var/log/qpopper.log -S

which should fork off and create a daemon process.

Write a StartupItem script based on CrashReporter as the documentation suggests, here’s my interpretation:

[xxx@xxx QPopper]$ cat QPopper
#!/bin/sh##
# QPopper Daemon
##. /etc/rc.common

StartService ()
{
        if [ "$QPOPPER:=-YES-}" = "-YES-" ]; then
                /usr/local/sbin/popper 0.0.0.0:110 -d -t /var/log/qpopper.log -S
	fi
}

StopService ()
{
        killall popper
}

RestartService ()
{
        StopService
        StartService
}

RunService "$1"

January 1, 2007 Posted by | Uncategorized | Leave a comment

DARPA noise cancelling coming to a bluetooth headset near you soon!

It seems pretty cool. Check out the demo movies.

December 23, 2006 Posted by | Tech | Leave a comment

A tale of two sisters

I got another Macbook Pro, a 2.33ghz Core 2 Duo 15″ (matte). I also got one around March 06, a 2ghz Core Duo 15″.

So has anything changed? Not really, the finish on the new keyboard is slightly different, it feels a little courser, nice but only used in a pinch or on the road. The screen unfortunately is still shit. The spatial uniformity is really poor (in all fairness somewhat better than the older one of the two.. production variance?) and has a pretty bad backlit leak at the bottom (they all do). By default the new one has a strong blue cast while the older one has a strong yellow cast. It is a disgrace how much better the 15″ LCD in my old PentiumM $1100 Dell is. Not to mention 1680×1050 vs 1440×900.

Doing some more IO & CPU intensive tasks (such as installing the same software with fink) the new MBP is clearly faster than the old one. It’s interesting to note the Seagate drive has been replaced with a Fujitsu, also the Matshitty dvd burner has been replaced by a HL-DT-ST (which I believe is a TEAC – anyone remember them from the good ol 1.2 & 1.44mb floppy days?) that is now DVD+R DL capable.

It will be time to wish the older one goodbye in two weeks, I’m moving on to another job. Anyone knows of a good way to get stickers of a MBP ?:)

December 23, 2006 Posted by | Tech | Leave a comment

Tab stopped working in Firefox

Just mysteriously overnight.. used to work just fine. The problem persists on all pages I’ve visited, restarts made no difference. No upgrades has happened in the mean time that I know about. Seems like I’m not alone.

UPDATE: I don’t have the specific extension mentioned in that forum post but I uninstalled a few old extension that I still had floating around, restarted firefox and voila, problem cured.

December 6, 2006 Posted by | Uncategorized | Leave a comment

Disappearing windows on OSX

It has happened a few times now, somehow when moving my Macbook Pro around and disconnecting from my desktop LCD some windows (typically Mail) will move (almost) entirely offscreen. It’s quite persistent too, restarting the app or even the OS makes no difference. Fortunately there is a silver sliver to the story.

November 29, 2006 Posted by | Tech | Leave a comment