that last post was like, a total joke, and just me dicking around, and i assumed nobody on earth would read it everything is fine
costello bright light!

Just something I want to say

It's not anything really original or revolutionary, I think most people are thinking it, I just want to say it. Maybe someone will change their opinion.

So, that Terry Jones jackass (and I say jackass with every ounce of hatred I can muster, because he's in every possible way a pus-coated cuntrag shit-eating dicknugget) finally got around to burning a Koran in "commemoration" of September 11th, as if it was a direct attack by the entire concept of the muslim religion on him. Now, there's no excusing this kind of behavior - declaring September 11th "burn a Koran" day is absolutely appalling in every possible way, it's offensive not only to the millions of muslims who are decent, lovely people but also to the victims of September 11th by turning a day of what should be somber mourning and reflection into a day of hatred, anger and provocation. But the fact remains that he has that right. He bought (presumably) the copy of the Koran that he burned, and as an American citizen, that sort of protest is not encouraged, but allowed. That's the essence of free speech, and it's something that seems to be lost in today's politically correct world. Free speech doesn't exist to protect the things you like to hear, it exists to protect the things you DON'T want to hear. It exists to protect anyone's right to say anything (assuming it's at least partially truthful and not simply defamation) about anything and NOT experience repercussions. It's the most important right that any American has because freedom to speak your mind means freedom to think what you want - it's the most important human right of all.

In the event you don't know, in the aftermath of the burning of the Koran, protests broke out which have so far resulted in 9 deaths and many more injuries.

The problem I have with the reaction to this whole situation is how, in essence, news organizations are openly questioning whether or not ALL americans should be subject to muslim law. They're reacting as if somehow Terry Jones' actions are really the catalyst for the violence, when they're clearly not. Radical, dangerous, hive-mind, brainwashed idiots are responsible for the violence. This is not a proportional response. The problem does not exist in Terry Jones' burning of the Koran but in the RESPONSE from the extreme fringes of muslim society. This is not a time to be questioning free speech, but defending it more vigorously. This is a time to put your feet down and say "Terry Jones may be an asshole, but it's NOTHING in comparison to the behavior of these bad apples who seem to feel the entire world should be held accountable to their silly laws."

To question whether free speech is really worth the risks is, to use a cliche and somewhat stupid phrase, "letting the terrorists win." Terrorism isn't just flying a plane into a building or setting off a bomb, it's using FEAR to control the behavior of others. When we finally sigh, shrug our shoulders and say that as a country, muslim law takes priority over free speech, we HAVE let terrorism win. We HAVE set the precedent that shed enough blood and our entire culture will back down from the very core principles that define it.

When the mass media questions Terry Jones' actions as irresponsible, completely disregarding the fact that COMPLETELY UNRELATED INDIVIDUALS HAVE DIED BECAUSE HE BURNED A BOOK ON A COMPLETELY DIFFERENT CONTINENT, you are shifting the blame from where it really lies. Want to respond in a proportional manner? Burn a fucking bible, assholes. Burn 15,000 bibles. Burn a million goddamned bibles. Burn so many bibles you can see the fucking bible fire from SPACE for all I care, and you'll never been the wrong. The second you step beyond expression of your ideals and into physical enforcement, YOU have become the aggressor. YOU look bad.

I know that the majority of muslims are good, honest people - just like the majority of christians aren't right-wing birthers. There's bad apples in every group - please don't take this as an assault on the muslim faith as a whole because my personal issues with Islam are the same as my personal issues with ANY religion, give or take a few minor differences - but fuck everyone involved in those protests. Fuck everyone who responds to a peaceful (albeit offensive) demonstration with violence and fuck everyone who believes that their crazy religious laws should extend beyond their own mind.

And while we're at it, fuck Terry Jones, too. Terry Jones is a prick.

okay, lol.

I've started watching TNG again, because I really like TNG. Seriously. It's awesome. Anyway, Tanya's been watching with me and it's been really fun but I wanted to toss another important little memory down here cause it was awesome:

Very first episode of season one (that one with Q and farpoint station) Q pisses off Worf while on the viewer so Worf whips out his phaser and starts to look angry. Anyway, they're staring right at the camera and picard sorta nudges him and is like "hey, stop - are you gonna blow a hole through the viewer?" and Tanya turns, looks at me and says "...does he mean us?"

I don't think I've laughed that hard in a long time.

beat dat bleach up

10:27:16 PM Costello: tanya
10:27:19 PM Costello: i can't clean
10:27:23 PM Costello: i keep beating da beat up
10:27:29 PM Costello: i just start fistpumping
10:27:31 PM Costello: and punching the floor
10:27:33 PM Costello: what do i do
10:27:50 PM sterfdurf: put a rag in your hand and put it on something you need to clean
10:27:55 PM sterfdurf: and fist pump away


Okay, I'm sorta putting out a generic cry for help because I know a lot of people who follow me are super smart and hopefully someone can give me some insight or an avenue to explore that I haven't yet.

I. Hate. SQL. Server. Performance. Tuning.

We're having a problem here. We have a file storage service in our system that consists of two tables, one that stores hierarchy information and file data, and one that stores metadata such as file properties, folder stats, etc. Most of our file data is less than a meg, but we have some edge cases of files that are REALLY large. Also, it only appears that the problem is occurring when we're accessing the file storage service through our SOAP service, but that doesn't make sense because in the end everything goes through the same stored procs and data layer.

Under load, SINGLE ROW delete performance in the table that stores file data is ABYSMAL on large files - I'm talking query timeout abysmal. I know that SQL server's deletion methods are a garbage collection process involving marking deleted rows as ghost rows, and I also know that dealing with files this large, the data pages that store the BLOB data are exclusive to the large BLOB, i.e. they're not shared with data from other rows. Delete speed should be the same regardless of data size, because copying that BLOB data into the transaction log is an asynchronous process - correct me if I'm wrong, PLEASE. During the scope of the transaction in which we're performing the delete, the deallocated pages and ghost rows act as the transaction log information and they're cleaned up and logged at the next checkpoint - again, correct me if I'm wrong.

The delete process is somewhat complex but basically consists of selecting from a view that contains a combination of the file data table and the metadata table and updating stats on parent folders (total file size, file count), then deleting children of the object, then deleting the object itself, then updating stats in the metadata table. While I can't confirm it (the data model doesn't seem to reflect it) I have to assume that there's some sort of constraint linking the data table and the metadata table with a cascading delete between the two - I think this may be a pain point?

When we do the child delete, we perform a delete on the data table, filtering by UserId first and then by the path of the object, using a like statement with the full path of the object being deleted. The data table has a non-clustered index on UserId and FullPath. The metadata table's primary key matches that of the primary key in the data table and has an index on that key as well.

We've done some serious optimization to ensure that all rows touched by the delete process are locked pre-emptively before the proc runs, so that following delete statements are queued rather than possibly deadlocking while trying to operate on rows shared between the two operations. The delete statements themselves seem to have fairly low read numbers. 

We created a test fixture that uploads 20 files of random size between .1mb and 50mb to the file storage of 10 users under the same parent user (but all their hierarchies are independent of eachother) and then cycles through the process of selecting all the files in the target folder, renaming them, then deleting them. Selecting touches the data table, as does renaming, and deletion touches both the metadata table and the data table. Concurrency is a requirement for encountering this issue, so each test user connects in a thread and performs this process simultaneously.

When this happens, it's almost instantaneous that timeouts start occuring, and it's never on renaming - always deletion. Occasionally select statements will run slow but I believe that those select statements are running slowly because of raw disk IO and CPU utilization and blocking/deadlocking are not a factor. Execution plans also show absolutely no abnormal activity - in general, I'm not aware of any table scans that are occuring or other dead ringers for poor performance.

There's only one other clue I have right now, and that's that when I run the following query:

----Find Row lock waits
declare @dbid int
select @dbid = db_id()
Select dbid=database_id, objectname=object_name(s.object_id)
,, i.index_id --, partition_number
, row_lock_count, row_lock_wait_count
, [block %]=cast (100.0 * row_lock_wait_count / (1 + row_lock_count) as numeric(15,2))
, row_lock_wait_in_ms
, [avg row lock waits in ms]=cast (1.0 * row_lock_wait_in_ms / (1 + row_lock_wait_count) as numeric(15,2))
from sys.dm_db_index_operational_stats (@dbid, NULL, NULL, NULL) s, sys.indexes i
where objectproperty(s.object_id,'IsUserTable') = 1
and i.object_id = s.object_id
and i.index_id = s.index_id
order by row_lock_wait_count desc
I see that our metadata table (and its index on the primary key) accounts for a disproportionate number of row locks and blocking operations compared to the rest of the database - i.e. total row lock wait time in ms is 256 times greater than that of the next guilty operation, and it is the source of 41 times more row locks than any other object in the database, even though its average row lock wait time is lower than the worst culprit (its average wait time is 44.3ms, the worst is our user table with an average wait time of 2191.5ms) but I really don't know what to do with this other information other than believe that the metadata table and not the file data itself is responsible for the delete performance. Still, I'm having a hard time reconciling this with the fact that file size APPEARS to be a direct factor in whether or not the issue is encountered at all.

I really hope this is at all useful to anyone who might have enough knowledge to make an intelligent suggestion, thanks.

How to drive kinda okay.

Okay, sorry to not post for weeks and then come back and post screaming FUCK EVERYTHING, but seriously, FUCK EVERYTHING. In particular, fuck EVERYTHING on 476 north. Philly commuters, I'm sick of your shit. I came up with a handy guide entitled 'how not to piss me off and make me imagine how lovely it would be to run you off the road' that really should be simple to follow.
  • I called the state police and they assured me that despite the fact that people who drive BMWs are VERY IMPORTANT with IMPORTANT PEOPLE places to go, they still must abide by all posted traffic laws, so keep this in mind, first and foremost.
  • When you're in a merge situation where both lanes merging have a constant stream of traffic, how come nobody ever thinks that the most reasonable way to handle this is alternating lanes? This would keep both moving smoothy and eliminate tons of other douchebaggery, like people who hop from lane to lane. When six cars go from one lane, the other stops moving completely, then a bunch of shitstains in that lane all switch lanes further down the line which just cocks things up more. If everyone at the front alternated, both lanes would move and that dude in the land rover would not be changing lanes every 10 seconds without looking.
  • Similar to the above, when there is a long line of cars in the far right lane leading to an exit, why is your first instinct to go all the way to the end of the line, at the last second before the lane exits, and merge in there? Merge towards the back, that way the people who are all waiting in line like decent human beings don't get screwed. Trust me, your telemarketing job can wait the extra five minutes for you.
  • When a large number of people are trapped behind an obstruction, i.e. a slow moving truck, and there's also an obstruction in the passing lane, and they're all signaling their intent to merge left, why on earth does the last person in line feel the need to switch lanes the second he gets the chance, then pass everyone who's lined up? They hold everyone else in line while they are now blocking the left lane. If people were decent, everyone would wait for the first person in line to have a clear shot to change lanes, then all go at once. That way you're not trapping the people at the front for an unreasonable period of time.
  • Similarly, when you're merging onto a busy highway from an on-ramp, how come people think it's okay to cross the striped white line that separates the on-ramp from the road and pull in front of the car in front of them on the on-ramp, forcing them to stop at the end of the ramp while more cars whip around from behind them? Seriously, to anyone who's ever done that: fuck you.
  • The shoulder is not a lane. Die in a fire.
  • Signs are posted above toll lanes for a reason. First and foremost, if the sign says "EZ-Pass: No Tickets" there's a pretty reasonable explanation for why when you pull in, you don't receive a ticket. Secondly, how on earth is it that you expect that there might be a five minute delay between you arriving in the booth and receiving a ticket? Shouldn't you realize something is wrong within moments? Finally, there's a sign right there that says what to do if you've accidentally entered an EZ-pass booth - keep moving, and call the EZ-pass number. But no, you sit there in the booth for 25 minutes vainly hoping that a ticket might magically appear for you. Unfortunately, I am right behind you with concrete dividers on either side of me and a man on his phone in a BMW SUV with the license plate 'HOT STUD' right behind me, so I am now trapped due to your stupidity. Luckily, I have reading material.
  • I am not the best at not being distracted while driving, I understand that. If you're on your phone, whatever. That's kind of uncool but I'll deal. When you're on your phone and reading a piece of paper on your steering wheel, though - that's a bit much. Please, don't hold stockholder meetings while driving south on 476. Or north. Or anywhere.
  • Turn signals. They're not just there to look like eyebrows for your headlights, they serve a useful and important purpose. You should both use and pay attention to them. Of course, I guess I know you -are- paying attention to them, because when I try and change lanes, invariably someone in the lane I'd like to move to drifts forward far enough to completely block my lane change and stays there. I must assume this is some sort of intentional game you play, and since I seem to be losing, please give me your home address so I can deliver your prize for winning: P.S., it's me smashing your headlights with a tire iron.
  • There is never a time where you have right of way when turning left into oncoming traffic that has a green light. I know this is a common misconception.
  • If everyone is stopped, and there is an intersection in front of you, don't pull out and block the intersection. Stay on the other side of it until there is enough room for you. Seriously, how do you not feel like a douche the whole time that guy who has a green light is staring at you through your passenger's side window and wishing he could rip your face off?
Seriously. Nobody should need to feel compelled to explain these things, they're common sense if you have a shred of respect for other people in you. Goddamnit.

Writer's Block: The winning ticket

What would be your first purchase if you won the lottery?

I would buy the state of Rhode Island. I figure it's like ten square feet, and nobody lives there anyway, so it'd be pretty reasonably priced. Once I had fully assumed command of Rhode Island, I'd spend the rest of my money building a small army and capture the entire northeastern united states, just the New England area.

With New England firmly under my control, I'd then start enacting pointless laws for my own amusement. 
  • Everyone must speak like Boomhower from King of the Hill on Wednesdays
  • Each house must have no more than four mailboxes but no less than five
  • Everyone under the age of 12 must be dressed in a tutu at all times
  • Taxes are determined based on the number of characters in your last name
  • When stopped waiting for a school bus, drivers must throw tennis balls at the blinking stop sign. This will be hooked up, much like a dunk tank, to a release under the seats of all the children that launches them out the open roof of the bus.
Of course, my real goal would be to make it very easy to find someone in violation of the law, at which point they'd be forced to compete in an MXC-style game show for my amusement. Losers would have their names, legal addresses and phone number changed at random as a punishment, whereas winners will be rewarded with a large, signed cinderblock that they must carry with them at all times or face further disciplinary action.

I really should enter the lottery soon.