Erik’s Weblog

Technology, software engineering, and infrastructure — from someone who’s been building things on the internet since 1997.

Django PostgreSQL ORM Overhead

TL;DR: Django ORM + psycopg2 adds ~50% overhead vs raw C/libpq for trivial single-row SELECTs. PgBouncer costs ~5%. Local connections are ~30% faster than network. The bottleneck is client-side — the database server barely breaks a sweat. I’ve been dealing with database performance issues in a fairly large Django application — neither the app servers nor the database show high CPU utilization, yet something is clearly bottlenecked. I put together some simple benchmarks to isolate where the overhead lives. ...

June 24, 2010 · 10 min · Erik LaBianca

JavaScript QuickStart Reference

I wrote this quite some time ago when I had to re-acquaint myself with JavaScript, but never posted it. It’s not complete, but it’s got some of the basics so I’m going to go ahead and hit publish anyway. Javascript (actually ECMAScript nowadays) is everywhere. If you’ve never had to use it, you’ve somehow managed to avoid writing any modern web apps. The good thing is, it’s really very simple! A few things you should know before getting started: ...

June 24, 2010 · 3 min · Erik LaBianca

Windows Print Spooler Hangups

I know, it seems obvious… but when you’ve got one of those stupid print jobs stuck in the queue and they won’t go away… using the services manager to restart the print spooler apparently a pretty effective remedy in many cases. More later if I find out anything less lame.

December 5, 2007 · 1 min · Erik LaBianca

Oracle VM Manager on CentOS 5 i386 Install Notes

So everybody knows by now that Oracle just jumped into the virtualization fray with their new Oracle VM product. If you’ve been under a rock, go to the oracle website to check it out. Given that I’m cheap and currently using VMWare’s free offering, I jumped at the chance to check out a supposedly ’enterprise ready’ Xen implementation for free. The 1/3 the overhead claim is just gravy! Anyway, as cool as Oracle Enterprise (Unbreakable?!) Linux may be, I’m running CentOS and am perfectly happy with it. Oracle VM wants a dedicated machine for the management station, which I can arrange for with a little tweaking. However, I build most of my machines up from ‘minimal’ installs. I read in the Oracle documentation that I would need libaio installed to make things go, which I did without any trouble. ...

November 17, 2007 · 2 min · Erik LaBianca

LGA 775 Replacement Mounting Clips

I’ve been trying to find these blasted mounting clips for the stock intel socket lga775 heatsink/fan units for the better part of the last month. If you’ve ever tried to install them, or even worse, remove the heatsink after a not-perfect installation, you’ll know why I need replacements. They break easily! Well, after spending a few hours looking at complete new replacement heatsink units and noting that half of them use these pins in the first place, I renewed my search and finally found a forum post link directly to the intel site where they sell them in packs of 4! ...

July 28, 2007 · 1 min · Erik LaBianca

Authenticating CentOS 4 against Win2k3 R2 Active Directory

Prescript: I wrote this over a month ago and still haven’t found an authoring plugin I like so it still looks terrible. See my next post and give me ideas or just call me lazy, thanks! Based on http://blog.scottlowe.org/2007/01/15/linux-ad-integration-version-4/ First, install windows 2003 R2 and install the identity management for unix option. Open control panel, select add remove programs, click add/remove windows components. It will grind a while and give you a list of possible services. You’ll need to expand ‘Active Directory Services’ and check the ‘Identify Management for Unix’ service. You will need to be in the schema admins group to do this. ...

July 18, 2007 · 4 min · Erik LaBianca

Putty (windows ssh terminal) setup

I always forget the settings that get solid results connecting to my CentOS/Fedora systems under Putty. Here’s the whole nine yards, maybe someone else will be able to use ’em as well. Get putty from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html. I use the installer. Get puttycyg from http://web.gccaz.edu/~medgar/puttycyg/. Unpack the .exe files over your putty folder. This will be c:\program files (x86)\Putty if you use the installer on x64 windows. You’ll want to replace the originals. ...

June 5, 2007 · 1 min · Erik LaBianca

ASUS A7N8x Deluxe Linux (in)compatibility

Continuing in the vein of ‘stupid hardware problems’, this week I discovered that the ASUS A7N8x deluxe motherboard I’ve been trying to nurse along as the backbone of my MythTV PVR basically doesn’t play nicely with linux, period. Don’t ask me why I didn’t try searching the web a little harder before, since most of the threads I’ve referenced below are ancient. Basically there is something screwy with its ACPI implementation, SATA controller, and just about everything else. ...

February 25, 2007 · 2 min · Erik LaBianca

Tyan Thunder K8W (s2885) Compatibility Notes

For some reason in the last 2 weeks I’ve been confronted with resolutions to a couple of ‘in-your-face’ long term compatibility problems. What is particularly annoying is that I’ve had the hardware in question for the better part of 3 years and just placed blame elsewhere. In any case, I’m just throwing this out there in case anyone is searching the web the way I was. Basically, the Tyan s2885 (Thunder k8w) dual opteron board has a buggy AGP chipset and/or windows drivers. I’ve had intermittent problems with various video cards culminating in purchasing a brand new Geforce 6800XT just so I could run Windows Vista with Aero enabled. I installed Vista just fine, and tried to boot it up for the first time, and the machine hung EVERY time it tried to enable Aero during the login. No amount of tweaking was able to get past the login screen. ...

February 25, 2007 · 2 min · Erik LaBianca

Alltel Data Tethering with RAZR v3c

I’ve got a RAZR v3c and alltel, and have enjoyed the prevalent 1xRTT data tethering for the last year or so whenever I’m out and about, even in the car. However, recently I upgraded my laptop and lost the configuration settings, and forgot the specific details. As of today, the needed settings are as follows: Phone Number: #777 Username: [email protected] Password: alltel where nxxnxxxxxx is your Alltel mobile number. Also, for ease of reference, heres the skinny on Alltel data plans, from the Howardforums Alltel Data Thread ...

December 15, 2006 · 3 min · Erik LaBianca