Monday, April 23, 2007

Slow MySQL Performance over a USB Bus

Slow MySQL Performance over a USB Bus

Parsing a 3gig MySQL dB with ~5 million datasets can be agonizingly slow. The bottleneck here being the USB bus.

I had to get MySQL running off an external USB HDD due to the heat generated on my notebook (Intel Core 2 Duo, SATA HDD).

The only advantage of this setup is the heat issue. As for the cons, there are plenty:

- USB connector can break the connection for some reason
- Slow USB bus
- USB external is powered through AC, brick needs to convert from AC -> DC
- The external IDE connector

Time consumed:
100 tables per week
~2.5 weeks
22/7, One 10-15 minute standby break before script execution

Filesystem: NTFS

dB dumped and imported to an ext3 filesystem

Monday, April 02, 2007

Send Attachments with Mutt

Use mutt to send an email through shell.
-a flag to attach an attachment
-s flag is the subject
echo -e creates the message in the body

#!/bin/bash
echo -e "This is the body message of the email" | mutt -a attachment.zip foo@recipient.com -s "This is the email subject"