Archive for August, 2004

MySQL Benchmarking

Friday, August 27th, 2004

I’ve spent a little time recently doing some simple benchmarking on our MySQL servers. MySQL comes with a nice little benchmarking suite in the sql-bench directory. When I started I was expecting to get a general idea of how our servers were performing under their current configuration. I didn’t expect to discover configuration errors, but discover them I did. I learned our “open files” limit was set too high. I checked the operating system kernel variable and it indicated the operating system would handle 4096 open files / process. However, as soon mysql would exceed 1024 open files it would fail. I set the mysql file limit to 1024 and the benchmark tests completed without any trouble.

So what did I learn from the benchmarking? It’s time to buy some new servers. When I started this job I assumed our servers wer top of the line, in terms of performance. What the benchmarking indicated was the mysql server I have running on this little dual processor pentium 3 machine, in my basement, was outperforming our UNIX servers by quite a bit. I checked into our server specs and discovered they’re only dual 400mhz processor machines (NOTE the benchmarking suite does not utilize dual processors, since the process is serialized). That explains a lot. We’ve started to run into some serious performance issues recently and it appears our processor load is getting to be too much to handle. Fortunately I was able to spread the load across both servers (originally one of them was entirely a test server), which has alleviated our load problems temporarily. That should keep us going until I can replace the servers.

Anyway, if you have some time, play around with the benchmarking suite. It was interesting to see how things changed by modifying a few variables here and there. It was particularly interesting to see the effect on performance by simply changing the tables from myisam to innodb. The sql-bench suite will give you a good idea of general performance but if you want to get serious about optimization I hear the MySQL super-smack program is the way to go. It’s completely flexible and allows you to create custom bechmark tests that will simulate requests and loads your production server will likely be handling.

Back to Work

Thursday, August 26th, 2004

I’m back from Vegas. The trip was much too short. I had a good time. Mike and I stopped by the Bellagio one night and I saw the gardens and fountain show. I have to admit the fountains were more impressive than I expected. It really was an amazing thing to see. If you’re in Vegas, you should really check it out (at night of course).

School starts on Monday which means it’ll be back to work as usual. The traffic around Provo is already getting crazy. I forget how much nicer this place is over the summer when it’s not so crowded. My development team was able to accomplish most of the things we wanted to over the summer. There’s a still a few things I would’ve liked to complete before school started but isn’t that how it should be? All the developers I work with will be cutting back to 20 hours per week which means it will be less to manage but projects will now take twice as long to complete (basically).

I’ve always liked this time of year (I like it MUCH better now that I’m not in school though). It still feels like a good time to take a new look at things and start over. I still have the urge to go buy new “school clothes” (probably left over from my elementary school days). Anyway, hopefully this year will be a good one.

Slacker

Tuesday, August 17th, 2004

I was looking over the web site and realized that once again, I’ve become a weblog slacker. I really don’t have any excuse. Work has been busy as usual but it’s not like I’ve been working late. I’m all moved in the house and won’t be doing much more with it until I come across some more $$. Nate moved in last week and our other roommate should be moving in in a week or two. It’s nice to have someone around. I’m taking a little trip this weekend, down to Vegas, to see some friends. I’m sure we’ll pick up a few “double double’s” at the In-N-Out. So that’s all that’s going on. I should be back from Vegas next Sunday and hopefully I’ll have some good pictures to post (no, not those kind of pictures!).

DBD::Mysql and HPUX (continued)

Thursday, August 5th, 2004

I was finally able to get DBD::mysql working on one of our HP-UX servers. I removed g++ and binutils using swremove and then downloaded the latest versions from the HP software library and installed them using swinstall.

Once I had the new compiler installed I followed these instructions, from the mysql lists, and everything worked. I had to change one thing from the instructions to get it working. When I executed perl Makefile.PL I noticed my gcc-lib was in a different location. Actually it was basically the same location but since it was a newer version I had to modify the version number in the “-L/usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.2.3″ parameter.

The Unwanted Visitor (in the middle of the night!)

Thursday, August 5th, 2004

It’s the middle of the night. There I am asleep
when all of the sudden the smoke alarm 10 feet from my bed starts
going off. The thing is so blasted loud that it scares me half to
death. It only goes off for a second and then shuts off. When it stops
I’m not even sure it actually went off (cause I was still half
asleep). So I’m thinking maybe I just had a nightmare and that’s what
woke me up and I just thought it was the smoke alarm. There was
definitely no smoke in the room. Anyway, my heart is pounding and the
adrenalin is pumping so I realize I’m not going back to sleep anytime
soon. I decide to flip on the tv. About 10 minutes later the alarm
goes off again (2 beeps). So I’m staring at the thing thinking “WHAT
IS WRONG WITH THIS STUPID THING!?” Well about 5
minutes later the thing goes off again and stops (3 beeps this time).

Ok, I’ve had it…so I get up to check the whole house to make sure
there’s no smoke anywhere. There wasn’t. So I sit on the couch
downstairs, turn on the tv and pull out my laptop to look for an
owners manual for my smoke detector. About 10 minutes later I hear it
go off in my bedroom (2 beeps). I finally find an owners manual and it
says when the alarm goes off it does it in 3 beeps PAUSES 3 beeps,
etc. After the alarm shuts off it will reset after 10 minutes and
sound 2 beeps. So I figure something keeps setting the thing off…but
only for a second. The owners manual said sometimes they get dust inside or an insect crawls inside and need to be cleaned. I’m
thinking I’ll just go buy a new one tomorrow.

I finally decide to just unplug the thing, take out the battery and go
back to bed. Well…try to go back to bed since my nerves are still
frazzled cause it woke me up and was so blasted LOUD! Ok, so I’m
removing it from the ceiling when I notice this little tiny spider
crawling around the edge of the detector. I’m betting ANYTHING that
little pest decided to keep crawling inside the ionization chamber and was
setting the thing off. Just to be safe I still unplugged it and went
back to bed (took me about an hour to get back to sleep). I plugged it
back in when I woke up and haven’t had any problems with it. STUPID
SPIDERS!!!