|
|
|||||||||||||||||||
|
Porting Webstone 2.5
By Jeffrey Howard
I'm going to stay out of the political discussion of Mindcraft and their web benchmarking software, WebStone, particularly with regard to Linux. Suffice to say that it had an attribute that made it much more useful to me than SPECWeb: WebStone's source code is available for download at no cost. I was working on a graduate networking class term project involving web cluster load balancing, and I needed to test the load balancing characteristics of my work. Of course, WebStone 2.5 wouldn't compile on my machine. These are instructions and a patch file for porting Mindcraft's WebStone 2.5 to Linux. (Or at least, the particular linux box I was running at the time -- I imagine it would work in other places, but I only tested it on mine.) PlatformI was running a reasonably vanilla RedHat 6.0 installation at the time, so all the kernal, library, compiler, and Apache version numbers should be consistent with that. SolutionDownload WebStone 2.5 Mindscape. When I grabbed it, it came in a tarball called ws25_src.tgz. Untar that file in any directory you want: tar -xvzpf /foo/bar/baz/whatever/ws25_src.tgz Download the patch that I created, and copy it to the top level directory of the untarred WebStone distribution: cp ws25.patch /foo/bar/baz/whatever/WebStone2.5 For some reason, the tar distribution comes with the source files set to read only. We fix that: cd /foo/bar/baz/whatever/WebStone2.5/src chmod a+w *.c *.h Makefile.in Now apply the patch: cd /foo/bar/baz/whatever/WebStone2.5 patch -p1 < ws25.patch You should see output that looks something like: patching file `src/Makefile.in' patching file `src/genrand.c' patching file `src/webclient.c' patching file `src/webmaster.c' From there, follow WebStone's instructions. I believe the next part is to execute: ./webstone -setup NotesIt's probably more the compiler than the operating system that's not meshing, since most of the errors that prevent compilation are quibbles with the way some of the declarations in the program are worded. I'm not going to redistribute a patched package. Mindcraft holds the copyright, so I'm distributing only the patch files with my changes. Also note that these patches are for WebStone version 2.5. I don't know what changes they'll make in future versions, but the patches may be invalidated. There is one other change I made to the program, though it isn't in the patch. I was working on load balancing techniques, so I needed to modify WebStone to follow redirections as instructed by the server. The way I did it is a vile hack, so I'm not really willing to distribute it. But if you wanted to make the same modification yourself, I can save you a little time by pointing out that WebStone2.5/src/get.c is the file to change to make the modification. It's a fairly simple change. But Wait... There's More...Michael Hicks downloaded the patch above ran into a second problem in trying to use Webstone. WebStone would hang after the completion of its tests. Ctrl-c would solve the problem, of course, but that prevented the package from cleaning up after itself. He changed the webmaster.c source file to fix the problem, adding a select call (to prevent a network read from blocking) and a test (to see if the parent process dies). Mike has given me permission to make a diff of the changes and distribute his patch here. Download the patch. Copy it to your /foo/bar/baz/whatever/WebStone2.5 directory. cp ws25hang.patch /foo/bar/baz/whatever/WebStone2.5 Now apply the patch: cd /foo/bar/baz/whatever/WebStone2.5 patch -p1 < ws25hang.patch The patch is made against pristine WebStone 2.5 sources. It was not diffed against sources that had the RedHat patches above applied. The patch program is pretty smart, however, and I had no problem applying the two of them in succession. You can probably ignore any warnings you see. Now, recompile WebStone and you should be ready to go. |
|||||||||||||||||||
|
This information is provided "as is," with no warranty or guaranty. The IAQ pages have not been maintained in some time; they're being kept up because, judging by the traffic and link-backs, people still find them useful. Copyright 1998-2004 by Jeffrey Howard and Heather Grove, except where stated otherwise. |
||||||||||||||||||||