Archive for January, 2006

Plugin Posted

Monday, January 30th, 2006

My music engine plugin was just posted on yahoo. I talked about how easy it was to build this plugin in a previous post. As you can see I’m not much of a visual designer :)

Music Engine is turning into a great product. They have been very busy adding new music. When I first got the service some of my favorites like atmosphere and sevendust were not available. They have since been added. It’s seriously changed how I listen to music. I’m not too sure this service isn’t a bit ahead of it’s time. Supporting technology hasn’t really caught up yet. There are things I want to do that I just can’t. I want to be able to play music from music engine in my truck without having to update it or take something with me. I could do this by building a small computer into my truck with wi-fi but that isn’t really cost effective. I don’t realy want to plug an mp3 player in every time I go somewhere either. I would buy a stereo that supports playforsure (the DRM technology behind music engine) but I haven’t found a company that makes one yet.

I spend most of my life in front of a computer capable of playing music engine so it works great for me.

Heavy Mouse

Thursday, January 26th, 2006

Sometimes when I select a large block of text I feel like my mouse is loaded. It seems a little harder to move it over to where ever that text is supposed to go. I can’t be the only one this crazy. Try it and see.

I/O Scheduling

Thursday, January 26th, 2006

An elevator picks people up and moves them to different floors based on where they have requested. If an elevator picked up exactly one person on the ground floor of a building, dropped them off, and went down to get another person it wouldn’t be very efficient. Modern elevators pick up people and move them between floors in an optimal pattern. Disk access is pretty much the same idea if you think of the disk head as an elevator and the disk as a building. It takes time to move an elevator just as it takes time to move a disk head. Modern operating systems can change the order of disk accesses into a more optimal pattern.

There are many different algorithms for scheduling I/O. I’m going to cover the ones I know from linux and how they can help you make the best use of your servers disks.


CFQ (Completely Fair Queue)

CFQ maintains an i/o queue per process. Processes can post multiple reads but the CFQ scheduler will process exactly one read per process in a round robin fashion. This makes it very fair for large systems that have a lot of processing doing i/o and have multiple storage devices.

Anticipatory Scheduler (as)

This scheduler tries to read the mind of your processes. Along with scheduling i/o it watches access patterns. When it detects a process sending sequential reads to a file it will hold off on sending other requests so the next read request your process sends will return quicker. It does this without trying to be too unfair to other processes. This is great for webservers and workstations which tend to read files from top to bottom. It’s not so good for databases which tend to seek randomly in files and really on want the blocks they asked for. This is why it’s usually a good idea to turn off read-ahead.

Deadline Scheduler

The deadline scheduler is similar to anticipatory except that it tends to be better under heavy load. When multiple requests are coming in the deadline scheduler will place an expire time on each read then try to execute then in an optimal order without exceeding that time limit. If the time limit it hit for a request the deadline scheduler will force that request to be next in the queue so it can be serviced. This is good for heavy file servers but has been somewhat out dated by the anticipatory scheduler.

Noop
As it’s name implies this scheduler isn’t really a scheduler at all. It simple keeps a FIFO queue of i/o requests executing them in the same order they arrived. At first glance it seems kind of pointless but like everything else it has it’s place. Modern raid controllers can schedule their i/o more acurately than the operating systems running them because the operating system has no idea what the head is on the disk. Only the raid controller knows that. Using the noop scheduler with a raid controller can result in a nice performance boost because the raid controller will get more information with which to choose the optimal order to satisfy requests.

Basically my recomendation is.
* Desktop or webserver use anticipatory
* MySQL on ide or a raid controller not smart enough do it’s own scheduling use deadline
* MySQL on a good raid controller use noop.

This recomendation isn’t based on any hard data. I’ve never benchmarked mysql with different schedulers. If you have, please let me know :) If I get a chance to I will run some numbers.

[Update: 2006-2-1 redhat.com has a i/o scheduling article. ]

MySQL Online Manual Search

Monday, January 23rd, 2006

Previously I wrote about the manual search and how it had been fixed. Now I think it’s time for polish. Most of the basic keyword searches work but not all of them. The syntax keyword searches should always be spot on.

mysql.com/select syntax

Works great but the less common syntax searches fail

mysql.com/grant syntax

There really is no excuse for the syntax searches failing. These are the sections that people need the most on quick reference. I noticed tha recently the keyword searches that do work put me into the correct page and not just the search results with that page at the top. I love this! I just needs to work for every syntax search.

While I’m on the subject of manual search I would like to request a few features. Migration to newer versions isn’t as simple as just upgrading the package and starting mysql. Full systems have to be tested against the new version. This can take weeks or even months to complete. So people don’t like to upgrade unless there is a feature they really want or the previous version is not being supported as well (internall or externally). As a result most of us are stuck back in time chipping our data into stone. I understand the manual defaulting to the current GA release of mysql but a significant portion of the population hasn’t upgraded yet. Please please please add in a feature for the url searches to listen to a version. If something like

mysql.com/4.1 grant syntax

Put me right into the grant syntax page for 4.1 it would be such a great time saver. If this isn’t possible I suppose I can create my own page that will bounce me into the manual with some handy options parsing. I would rather see it in the manual because so many people search it and because I’m so used to typing mysql.com/something
The most important part of making progress on a project (such as manual search ;) ) is showing that you actually made progress on it. This alone can have more positive impact than the progress you actually made. If there is someone out there from the mysql web/docs team that has been slaving to improve the manual search please shout out.

$2.98 Beer

Monday, January 16th, 2006



Photo_060305_001

Originally uploaded by Eric Bergen.

The Tied House in Mountain View has a very strange price structure. Apparently they want their bar tenders to get a lot of two cent tips because he charged me $2.98 for this beer. Very strange but still good beer.

Moving Rock

Monday, January 16th, 2006

Being new to california I still don’t know about all of the local natural wonders that this area has to offer (except the wonder of high real estate :) ) Jeremy is planning a camping trip to death valley. He assures me that the tempuratures will be mild enough so we won’t die. One of the wonders of death valley is the moving rocks. No one knows excatly how these rocks move but it’s fun to think about. Here is an interesting article and some pictures to entertain you.