chrisdaniel.net

  • About
  • Photos
  • I am currently looking for employment in the Portland area. See my resume in PDF, OpenDocument, or MS Word formats.

    Tuesday, May 20

    ATI sucks

    Filed under: Rants ::

    Since I started using Linux, I’ve always avoided ATI graphics cards, simply because they have historically withheld Linux drivers for certain graphics cards, waiting until the cards were near obsoletion to release compatible drivers — even binary ones. Nvidia, on the other hand, has had a relatively good track record for keeping their binary Linux drivers current. This was really my only reason for staying away from ATI.

    Recently, however, I have had some very bad experiences with ATI graphics cards on Linux. My employer recently purchased a couple of LCD monitors for my use; strangely, when using the VGA inputs, the picture on these monitors had too much red and blue (tried different cables, different cards with same results). My main card (AGP, Nvidia Geforce FX 5200) had a DVI output, so that was no problem; but I needed to replace my second PCI Nvidia card. The only cards we had available with DVI outputs were ATI. I grudgingly popped one of these in (a Radeon 7000 64MB).

    ATI cards in trash

    The very cards — where they belong.

    Right out of the gate, everything seemed to be okay. I powered on my machine, added the new device in xorg.conf with the “radeon” driver (I think this is the open source one; I didn’t care about 3D acceleration on the secondary screen anyway), and up came X as I expected. Then I moved a window on the second screen, and the display flickered off for about two seconds and then came back on. Wtf? I looked to make sure everything was on separate IRQ channels and whatnot; yep, no problems there. I tried moving it to a different slot to take up a different IRQ — same problems. I tried another identical card, and saw the same problem.

    Oh well, I had another ATI PCI card to try. I replaced the problematic card with the new one (this one a Radeon 9250 128MB), and powered on my computer. It worked okay at first, same as the other one, with the same driver. I moved a window around on the second screen — yay, no more flickering! At this point I just chalked the previous problem up to the Radeon 7000 being too slow, or something.

    Time to get down to work on my pretty new LCDs. I put on my headphones, and turned on some music — and nearly went deaf from the horrible static noises produced. Well … something’s broken there. Checked interrupts — everything was on its own IRQ. I tried a few things here: moving the graphics card to a different slot, moving the sound card to a different slot, trying different IRQ schemes in Linux to assign the sound card a higher priority IRQ, etc. The only action that solved my problem was to use the motherboard-integrated sound card, which I had stopped using because of audible interference.

    I went back to the first PCI card I tried, since I’d much rather deal with flickering (I rarely moved things on the second screen, anyway) — it no longer exhibited the flickering problem. I must have changed something, but I don’t know what. Over the couple weeks that I used this card, I began noticing a new interference problem on the sound car, when I listened on my headphones. Also, very rarely, and seemingly randomly (except when scrolling in OpenOffice — I could consistently reproduce this), it would flicker a bit just as before. Sigh.

    Finally, I asked my employers to buy a cheap ($35) Nvidia Geforce FX 5200 PCI card from Newegg. I just put it in today, and the new card works perfectly. No more flickering (tried OpenOffice on both monitors, flung windows about the screens at lightning speed, resized windows, etc.), and no more interference with sound (I listened intently for several minutes to some quiet music).

    Why do these ATI cards cause so many intermittent issues with my hardware? It could possibly be just a bad combination of hardware, and I’m not truly sure where the fault belongs, but given that I consistently experienced problems only when ATI cards were in my system, I place it with them. Take what you will from this post, but I will continue avoiding ATI.

    Friday, February 15

    Windows Server 2000 “just works” … no matter what you do

    Filed under: Rants ::

    You’ve heard of layer eight problems? Well, here’s what I call a “split layer eight” issue.

    A couple of weeks ago, the company I work for finished up moving servers to a new data center; part of this move involved changing some servers’ IP addresses. Since the move, one of our servers had been behaving slightly erratically. It was running SQL Server on Windows Server 2000, and had one linked server (the main database server, which was local, even connected to the same switch) so stored procedures could query the other server’s databas, and whathaveyou. Small queries (short connections) would work just fine, but anything that took longer than a few seconds broke with “General network error”; the connections appeared to get interrupted.

    I tried testing the connection between servers using iperf; the connection for that initially worked, but then got interrupted after a few seconds, too! The same test was okay between the main database server and a different server, so that narrowed the issue down to our strangely-behaving server or its switch port.

    Hardware? Switch port reports no errors, so it’s probably not that …

    Duplex mismatch? Both switch and server report autonegotiated 100Mbps/full-duplex, so that’s not the problem …

    Network configuration? Well, let’s check just for the hell of it.

    /26 subnet mask?

    Let me explain something to everyone before I go any further. IP addresses are 32-bit numbers, and they’re divided up into sections using bit masks, called “subnet masks”. For example, I have 192.168.1.0/24 (24-bit subnet mask, which means I can use any number in the last octet, the .0 in the address), and I want to divide it up into four segments. I would use a /26 subnet mask to divide the address space (the last octet) up like this:

    Block 1: 0-63 | Block 2: 64-127 | Block 3: 128-191 | Block 4: 192-255

    Essentially, this means, for example, that 192.168.1.1 cannot directly talk to 192.168.1.152, because they each know they are in different blocks (.1 is in block 1, .152 is in block 3), and have to talk to an intermediary (a router) in order to reach the other.

    Now, back to my server’s network configuration. My server was .152, and it had a /26 subnet mask, so the router, the central database server, and almost everything else it needed to talk to were not in that network block. Certainly, everything I had tested from was outside of that block.

    Why was I even able to connect!? Instead of doing what network standards suggest, and simply returning a “no route to host” error, Microsoft’s networking stack was apparently ignoring the subnet mask, allowing the connection, and then later realising what the subnet mask was and dropping the connection … (?!)

    Even if the above was not the case, and something very weird was going on, and Microsoft’s networking stack is flawless, I should have been presented with an error when I input a default router address that was not in the same subnet as the server. By definition, one’s default gateway must be in the same subnet!

    This very simple problem should have never happened, obviously, but all three links in the chain failed:

    1. I, the user, failed to input the correct information.
    2. Microsoft failed to recognise that the information I input was inherently incorrect and could not possibly work under any circumstances.
    3. Microsoft’s networking stack failed by happily taking the horribly wrong information and somehow worked anyway … marginally. Guys, guys — you’ve got entirely the wrong idea of “just works”.

    This is a split layer eight issue, because the fault is split between the user and the developer. I am the first to apologise to users for failures to do proper input validation, or failures to work as expected. Developers can do wrong, and frequently fuck their users by failing in this manner; most users only recognise the “user error” portion of it, unfortunately, and continue using the software.

    Microsoft have touted their commercial software as “best in the business” because they have spent billions on development; they have said that their billions spent make their expensive products cost-saving. I ask you, where have those billions gone when such a simple error can be made by the user? Aren’t they supposed to be making the experience easier and more efficient? Think about how many times similar situations have probably happened around the world; either extra time was spent, or extra money was thrown at an outside consultant to come in to identify the issue. Forget how much they’ve “saved” us; how many billions of dollars have Microsoft cost the IT industry?

    My Linux and FreeBSD boxes don’t do this shit. If I change my subnet mask to something that puts my default gateway in another subnet, my default route gets deleted. If I try to connect to something outside of my subnet, I get a “no route to host” error; the connection doesn’t go through and then get interrupted. THIS IS FREE SOFTWARE — DEVELOPED BY “AMATEURS”. WHAT THE FUCK ARE YOU DOING, MICROSOFT?

    Somehow, I don’t think Microsoft includes “simple errors caused by developer fuckups” in their estimates of total cost of ownership.

    Thursday, January 24

    Build ulcer-free webapps, please

    Filed under: Rants ::

    Recently, I’ve been heavily involved in moving the database / web application infrastructure of the company I work for; we have been migrating our production systems over to a new IP space and new physical space in a colocation center. In an ideal world, this would be a simple matter of changing IP addresses, updating DNS records, and then at least physically moving the servers (but probably bringing up second instances of them in the new location, then switching DNS and keeping the old ones in place for overlap for any public-facing applications). Well, in the real world, a small company like mine ends up having tons of old, poorly designed and poorly written web application code that has things like public IP addresses of database servers hardcoded — which means that, in addition to doing the ideal-world things, I get to sift through thousands of lines of hellish ASP code to make sure I get all the database configuration changed.

    Let’s talk about avoiding this situation.

    First of all: DNS is there for a reason — use it. Whatever you do, don’t depend on a public IP address (or any IP, really) to remain the same forever. Especially with web applications — there is quite likely a nice layer of caching between your application and the actual DNS lookup to minimise any possibility of DNS lookups slowing down your application, so just don’t worry about it. If there isn’t, you can add it. Later on, when someone’s moving the database server, they’re going to be pissed at you if they have to go into your application to change things instead of just making a single change in DNS (and maybe pointing the old record to the new server). Another reason for this problem is DNS admins who suck — create CNAMEs for services that point to A records for hosts (e.g., database.example.com is an alias for myhotdbserver.example.com). Implement things using the CNAMEs. Then, when you have to replace your decade-old database server because it keeps falling over under load, you only have to change where the CNAME points.

    Second: Don’t repeat yourself. How do programmers not get this? In my company’s case, we have a whole lot of little duplicates of the same application, each of which has some small difference (organisation identifier, branding, perhaps some very small difference in behaviour), but whose working information is stored in the database in the same format as all the others. Putting aside for the moment the fact that one application with many variables should have been used here … each little duplicate also has its own include file, which contains that information mentioned above that differentiates it from the other duplicates. What else does the file contain? Database connection information. That’s right, we’ve got tens of duplicates of the same web application, all completely intended to work off the same database, and each has its own database connection configuration. Why didn’t the programmer(s) of this thing take a few minutes of their time to simply create a global include file? I don’t know. I really can’t fathom it.

    So, I got to make changes in many, many files. Now, at least, they’re pointing to a DNS name that can be changed. Just, please, don’t inflict these evils on your sysadmins, gentle reader. Use DNS wisely, and put your configuration in one place.

    Thursday, January 24

    Announcing the MacBook Snare

    Filed under: Rants ::

    First, Apple made the iPod.

    The iPod was very pretty and easy to use; it became Apple’s biggest seller in short order, causing other portable music player makers to beef up their own products’ lacking areas in attempts to compete. Overall, the iPod was (and is) a very good thing for the portable music player “industry” — today, thanks to its competition, better alternatives abound. The iPod’s feature set continues to suck fantastically, but every once in a while it gets some new, shiny, marginally useful “feature” or upgrade (or new model that’s better suited to your jogging / casual listening style / whatever) … and Apple see absolutely no reason to improve its feature set. They have users nearly locked into their little world with iTunes, “MP3 player” is now completely interchangeable with “iPod” in the lexicon, and the iPod’s style and ease of use have overshadowed any lack of fetures or stability that might exist.

    It’s a perfect world for Apple — comfortable companies tend to show their bad sides quickly. We’ve seen Apple’s bad side showing more and more as they have grown.

    The PowerPC to Intel move … yes, there was a technical limitation of the PPC architecture that meant continued growth in the portable market was next to impossible; on the other hand, one of Apple’s huge selling points before the Intel migration was that the hardware was higher quality. Now, after the Intel change, you’re getting the same or similar hardware that you could buy from XYZ Computers on the corner … for the same quality Apple price. Why would I pay Apple’s price for PC hardware when their OS will run just as well on equivalent market-priced hardware? Support? I can get a decent warranty on just about any hardware out there. The pretty case, I guess?

    Then there was iPhone. Shiny! Easy! Full of shit. iPhone is the hardware equivalent of Windows Vista. That is, it’s lacking in every area — except the shiny — and just as locked down as anything Microsoft ever thought about building. I won’t even discuss the price. Thinking about getting an iPhone? Think a little more.

    Before I go any further, let me just say one positive thing about Apple: Mac OS X is a quality desktop OS. In my opinion, it is the only thing Apple has going for them right now. Its interface is clean, snappy, beautiful, and its core is solid. Operating systems can do better than OS X, but not in the usability department.

    The MacBook line is already tainted by the fact that the ‘books contain what is essentially commodity hardware at a higher price, as I already mentioned. But, Apple has to have a laptop line, and MacBook fills that need. I have yet to meet a MacBook owner who is dissatisfied with the product (I frequent a particularly “hip” coffee shop, so I have met a lot of MacBook users). The OS apparently more than compensates for any perceived ripoff in the hardware department. So far, so okayish.

    The announcement of the MacBook Air makes no fucking sense. Is your MacBook not small and light enough for you? Here, spend eight hundred dollars more for something underpowered and featureless.

    • It’s got MULTI-TOUCH! This is going to be truly useful when it is on a touch screen, and not before.
    • It’s got a SOLID-STATE DRIVE! Yawn. Call me when you’re at 120GB, less than $1000, and better than five hours’ battery life …
    • Oh, wait! It’s small! So it must be “ultra-portable,” whatever the hell that means. Seriously, if the MacBook isn’t portable enough for you (MacBook Air is actually wider and deeper; absolutely the only improvements are in thickness and weight), you’re doing it wrong.
    • Targeted at new Mac users? Really? Those people who are used to having optical drives? Those people who are used to spending $1000 on equivalent laptops?
    • It’s targeted at Mac fanbois? Now that I can believe.

    IT’S A TRAP.