Server Upheaval

Be careful what you ask for, thats the moral here.

Months spent asking after a new server with more drivespace.  What happens?  There is no server, make do.  Can we have additional storage here? Well. … we could put you on the NAS.  GREAT!  Except we don’t know how to hook that up to anything, and that seems so tedious to figure out.  And then we wouldn’t have all these pristine unused drives!!!   OK, fine, USB?  Oh ,no, you don’t want USB.  It would be too slow!

How is NOT HAVING MY SYSTEM an improvement over “it’s too slow”???

So, we find things we can cut and trim, seriously months of this, trying to get it to fit within the specifications we were given as already available to us.  It’s not pretty, huge chunks of functionality are marked off with “there’s no space to store the data this requires, come back later”

Well, two weeks before launch, someone got a bee in their bonnet that “OMGZ!  the data isn’t on the system!  POMG!!!!” and lit a fire under people.

This led to, a week before launch, we get told that they’re giving us a new server.  Somehow they FOUND one, and it has 1.5T instead of 700G of drives.  IT’s got more memory, more HDD, everything.  It’s like two generations ahead of what we got the first time.  GREAT!  A little late, can we … NOT move the system?  Since you need time to set it up still?

Oh, no no no!  That’s not acceptable!  We need to move to the new system so all the data can be available immediately!  Oh, and since it’s so big, we’re switchign to 64bit architecture.  And recompiling all our stuff for 64bit is silly, so we’re going to upgrade everything to latest and greatest.

And it should be up by the day before launch.  We’ll move you over then.  No, there’s nothing in the dev environment.

So, seriously, we’re looking at a brand new server, with all new software versions, on a new architecture, no more than a few days before we launch.

I’m so sorry we asked for more drive space, because this is going to turn into a COMPLETE CLUSTER!

AWS issues

So, apparently your IP is static as long as your instance is running.

BUT! The instance hung/crashed a week or so ago, and when I restarted apparently it got a new IP!  oops.

So I finally hooked up the “Elastic IP” settings, and we’ll see if that’s static or not.

If this works for another week or two I might look into offloading more stuff.  Because honestly, the home business line is costing way more than it’s worth.  I can cut the price by half and raise the speeds by 10x …

Amazon AWS/EC2

So I’ve been looking at Amazon’s AWS tools, specifically EC2, and they look really neat.  It’s tempting to move some of my home based sites (specifically the ones I host for other people that get enough traffic to slow down my access) off onto an amazon site.

I started with experimenting with some of my blogs, and didn’t find any significant issue with the process.

I want to look at all the docs, find out the benefits of using amazon’s RDB system, elasticache (memory caching) etc.

Charges are based on having the system, then network traffic, disk space and disk access, for the simplest construct.  So the question arises — if I hooked up a cache, could I keep everything in cache and have less disk access?  would it be more efficient costwise?  at a guess, no, I doubt all my sites combined could combine to anything noticeable on the scales those are probably structured at.

OTOH, running a business, it seems a sight simpler than the old business line concept, and then you can just hook it into their CDN and even distribute the site amongst their data centers so processing is done in local spaces (which I presume is when cache and their DB system come in really handy)

Clearly … failing

So, I haven’t posted in nearly two months.  I’ve missed 3 of my intended post-times.

See, here’s the problem I’m having.  When I get home, I play computer games with my son, then frequently spend the rest of the evening trying not to move too rapidly a my daughter sleeps on my back.  I haven’t been having the time to play with fun things lately at home.  Heck, I only manage to do the dishes a couple times a week (and we really have enough to do it every day and a half)

At the same time, I decided early this year that I wasn’t going to post about the stuff I’m doing at work.  First, there’s all the various clauses about what we can or can’t say and how we can or can’t represent our selves, our companies, clients, allies, and bitter enemies.  And a lot of what I’m doing right now is very specialized bits of stuff.  It’s also quite cool.

But, if someone went looking, it would be trivial to link my work to this blog.  Not that I work that hard to hide my name, but if I start talking about all the widgets and sprockets and cogs, it becomes a blog about work.  And that’s where the problem comes in :o

So, for now, I’m again going to put this blog in deep-freeze.  Add it to your google reader or feed subscriptions, and then when it comes back you’ll know about it.

Originally this blog started as a place to talk about the seriously geek stuff I wanted to discuss on my main blog, but that none of the people I knew would really be interested in.  It was more for me to have someplace to talk.  Then I decided I was interested in explaining and tracing crypto.  A kind of how-to primer.  B/c I can’t be the only kid who found that kind of thing interesting :)

But when I got to DES … well, that stalled the blog the first time.  And the second time.  So I broadened it out.  Time constraints mostly killed it that time.  And time again now.  I have a bunch of interesting stuff I’d like to post, but I don’t know when I could make it live anyway, so it hardly seems worthwhile.

And it’s not like I post on my personal blog either, so, maybe I’m just past the blogging phenomenon and i’m “old” now … So maybe deadbeef will come back in a new form.  Not sure what that would be, but since it still requires that I have time to do it … could be some time ;)

Regex is COOL

We started on a Tuesday this month didn’t we?  damnit!

Well, on an unrelated note, Regular expressions kick ass.  Here’s one I cribbed together to break things on :-separated pairs with optional preceding un-paired text

We started on a Tuesday this month didn’t we?  damnit!

Well, on an unrelated note, Regular expressions kick ass.  Here’s one I cribbed together to break things on :-separated pairs with optional preceding un-paired text

We started on a Tuesday this month didn’t we?  damnit!

Well, on an unrelated note, Regular expressions kick ass.  Here’s one I cribbed together to break things on :-separated pairs with optional preceding un-paired text

‘/(.*(?!s+w+:|$))(w+):(.+(?=s+w+:|$))/U’

Also, zero-length lookahead is sick and twisted and I liky!

KCacheGrind

Well, here’s the large KCacheGrind pics.  In order to get good pics, I installed WordPress and logged it!

So, here we go.

The first image is from the installation script.  I created the db & user, and unzipped the files.  This is what happened from the wp-admin/install.php script:

The top half has the display of “caller map”; it shows everything being called.  Each box is scaled to the quantity of time used by the function.

The second half shows the “caller graph”; at the top is “main” and then it trees to each call, which calls down.

The left-hand is the plain listing.  It shows a lot of the same data from the trace files.  Inclusive-time, is the first column.  This is the complete time spent in this function, including all subs.  The second is the amount of time spent actually in this function, followed by total number of calls.  The last one is the function name, the very beginning is a bar-graph representation of the total time.

The second image was from the admin login page.

This is a similiar picture to the first.  The top is the callermap again.  The bottom shows the functions called.   In this entry, we’re seeing the callees off of main.

The third image is from adding a new post the the blog.

This time I zoomed in on a function (WP_Object_Cache->get) , which is why the upper panel is so empty.  There are actually two sub-calls up there on the bottom edge, but they’re really small, hard to see.

The lower pane is the “caller map”, which is kindof the opposite of the upper panel.  In this case, everything that calls the Cache Get, which in this instance is a huge number of calls from “main.”

The fourth picture is from the homepage of the new installation.

I cropped it to just the upper pane.  This gives us a good view of exactly HOW MUCH goes into the homepage.  With only two posts (the default post and the one I created), it is just a huge listing.  The dark-blue speckled areas are where it ran out of things to fill into the field, because it couldn’t always slice the page in reasonable ways.

I never quite was able to configure the system to make thumbs for me, so the images above don’t link around to the full-size pics.  The gallery is inserted below, but I couldn’t figure out how to get the thumbs out of the gallery, so everything is listed twice.  Sorry.

Still Technical Issues

So apparently I’m still having technical problems. Can’t get any of the images auto-resizing.

I’ve got some huge pics for the kcachegrind post, but they’re 1277×995, which seems a bit LARGE to embed in the post …

Server blowout

Well, the server blewout … a bout a day after my last post, honestly.  Doesn’t that just suck.

So, I spent one day (well, morning, before work for a couple hours) trying to get it back up to limp through the day for the folks who host off my system.  Got it up, but it died again before I got to the office, so obviously THAT wasn’t working.

So over the weekend I divided my time between taking my son around (my wife was out of town and it’s the first time he was away from her by more than a car trip), and migrating everything to the new server I had that I had been slowly working on.  Actually, one of the last things I was waiting for was the 10.04 update, so I was ready to do the migration, at least.  I had just been planning to do it on my own terms :o

So, I couldn’t copy over the mysql files directly as they’d been corrupted.  My dumps from day of had a bunch of blank tables (oops, guess that’s what happens when you dump AFTER catastrophic failure).  But!  luckily I had a dump from the previous weekend.  And since I had binary logging running, I had a full log of everything that had happened in between.

So after a full restore from the dump, the following command gave me the commands that had been issued in the meantime:

mysqlbinlog -r ~/fullout –start-position 5938222 psychotomy-bin.000056 psychotomy-bin.00006[23]
The “-r filename” is the output file.  heckofalot nicer than having to redirect output, IMO.
“–start-position ###” tells it where to start the log dumping.  This let me get the logs from after my full dump, to eliminate duplicate key errors by inserting things that were already there (as it turned out I had the wrong number and had to do it again)
“-d db” (not pictured above) tells it which database to show the results for.
Then the filenames of the binlogs that you want the replay out of.  In this case I had a bunch of files that were just restarts without content, so I skipped them.
This didn’t show the -d flag because what I did was two steps:
1) I replayed the logs for my primary users, being where we noticed the corrupted data first when I tried restoring the day-of dump.  Got them back up
2) I dumped everything and then extracted that system out of the dump so I could replay all the other databases.
But mysqlbinlog SERIOUSLY nice.
On an unrelated note, I think I’m going to set up a weekly process to dump the db and then archive the binlogs with the dump from the previous week.  Then keep the last, say, month.  Basically “logrotate” for my database :o

Ubuntu 10.04 Update

So Ubuntu 10.04 (LTS) released on 30 April, late (EST anyway) … that’s cutting the hair rather thin :o

Anyway, I followed the directions found at the Lucid Upgrades page, which seemed to be how it was set up already.

Then it removed 6 packages, installed 30 new ones, and upgraded 400 I think it said.    That has so completely scrolled off the screen however.

I said Yes, and it went about it’s merry business.  It’s been about 30 minutes so far, although a couple times it’s stopped for input and I didn’t catch it for a while.  First it wanted to know what used PAM modules so it could reset them with the new modules.  The second time it wanted to verify what I wanted to do about the MySQL confs; the diff showed minor changes, and I liked my version better.  Default is to retain, I thought that was a nice touch.

… continued later …

A couple other bits went by then it wanted to reboot to finalize and switch to the new kernel.  Everything went swimmingly.

Then overnight, my laptop ended up in a pool of water, sorry this post is late :o

Missing 3rd Tuesday of April

So, you’ve probably noticed that last week’s post never appeared …

Partially that’s because I lost track of the date, and partially that’s because I was going to do an update from ubuntu 9.10 to 10.04 on my secondary server, so I figured I’d review the process.

The idea being that I ran Slackware for like 8 years, and loved it, but quit having time for the hand-compiling management that I wanted with that system.  But there wasn’t (AFAICR) any good base system version upgrading.  There might have been, but by the time the first update would have gone, i had so many customized compiles that it would have caused more problems than help.  And my system was more up to date with latest versions, because I didn’t have to go through package testing.

Then I went to gentoo, to keep that compiled “for your use”, and it was good, except some of the things I wanted to do I had to customize too much for, and so I couldn’t do upgrades again.

So now I’m moving to ubuntu.  Most of the things I’ve looked for i can find prebuilt packages for; and the VM management seems a little cleaner than the last try through gentoo, in that I don’t need to install X-Windows on my server to install the VM servers; it’s partially because ubuntu has good docs on Xen and KVM; I think gentoo had these options too now, but not positive.

Except 10.04 is still only in RC, not yet released.  I’m figuring on sometime this week, maybe, but figured I’d post since I was already a full week off.

I’ll probably write up that post when it happens and queue it up.  Trying to get some of these queued up, but I never get a chance to take all the screenshots I want for a few of them :o