The AIM 7 Benchmark

AIM7 is a multiuser job-throughput benchmark, which attempts to model a development environment; multiple users doing lots of things (viewing files, running troff, cc, editors etc). We are using the ReAIM implementation. Some further details can be found in the IA64 Wiki.

Running on K42

NB: until this patch is merged into K42, you will also need to apply it to your tree before beginning.

  1. Download reaim from http://re-aim-7.sourceforge.net/re-aim-7.tar.gz and unpack it

  2. Apply the following patch to src/pipe_test.c. This patch stops reaim from using UNIX-domain datagram sockets (currently unimplemented), and fixes a couple of other things that caused it to break on K42. Obviously this means that you can't directly compare results from this modified benchmark to other reaim output.

    --- re-aim-7.orig/src/pipe_test.c       2003-11-06 08:50:31.000000000 +1100
    +++ re-aim-7/src/pipe_test.c    2006-03-29 12:36:11.775366920 +1100
    @@ -24,6 +24,8 @@
     ****************************************************************/
     /* increased sizes in shared memory - re-aim */
     #define _INCLUDE_HPUX_SOURCE   /* does not compile & link on HP w/o this */
    +#define NO_SOCKETPAIR /* AB hack for K42 */
    +
     #include <stdio.h>
     #include <signal.h>
     #include <errno.h>
    @@ -152,7 +154,7 @@
     #else
            register_test("stream_pipe", 1, "100", stream_pipe, 100,
                          "Stream Pipe Messages");
    -       register_test("dgram_pipe", 1, "100", dgram_pipe, 100,
    +       register_test("dgram_pipe", 1, "100", udp_test, 100,
                          "DataGram Pipe Messages");
     #endif
            register_test("pipe_cpy", 1, "100", pipe_cpy, 100,
    @@ -378,7 +380,7 @@
            status = rd = open(fn1, O_RDONLY | O_NDELAY);   /* open the fifo to read */
            if (status < 0)
                    FATAL("Cannot open fifo readonly");     /* if error, stop */
    -       status = wr = open(fn1, O_RDWR | O_NDELAY);     /* open it again to write */
    +       status = wr = open(fn1, O_WRONLY | O_NDELAY);   /* open it again to write */
            if (status < 0)
                    FATAL("Cannot open fifo writeonly");    /* if error, stop */
            status = read_write_close(i64, "Named Pipe", rd, wr);   /* do the test */
    @@ -495,7 +497,7 @@
                    errno = 0;      /* clear errors */
                    result = read(fd, buf, total);  /* read some */
                    if (result < 0) {
    -                       if (errno == EINTR)
    +                       if (errno == EINTR || errno == EAGAIN)
                                    continue;       /* try again if interrupted */
                            return result;  /* return errors here */
                    }
    @@ -521,7 +523,7 @@
                    errno = 0;      /* clear error number */
                    result = write(fd, buf, total); /* write some */
                    if (result < 0) {       /* handle unusual case */
    -                       if (errno == EINTR)
    +                       if (errno == EINTR || errno == EAGAIN)
                                    continue;       /* if interrupted, loop */
                            return result;  /* return errors here */
                    }
    @@ -609,8 +611,8 @@
            }
            if (shmid != -1) {      /* only clear if set */
                    if (shmctl(shmid, IPC_RMID, 0) < 0)     /* free the shared memory */
    -                       fprintf(stderr,
    -                               "clear_ipc(): can't remove shared memory\n");
    +                       (void)0; /*fprintf(stderr,
    +                               "clear_ipc(): can't remove shared memory\n");*/
                    shmid = -1;
            }
            if (sem != -1) {        /* only clear if set */
    
  3. Run ./configure --host=powerpc64-linux, and then make, to cross-compile the benchmark

  4. Install the final result somewhere. You'll also have to manually copy the reaim.config file and the entire scripts subdirectory to $prefix/share/reaim/. At the end of it, you should have a directory tree that looks like this:

    bin/reaim
    share/reaim/fakeh.tgz
    share/reaim/reaim.config
    share/reaim/workfile.aim9
    share/reaim/workfile.all_utime
    share/reaim/workfile.alltests
    share/reaim/workfile.compute
    share/reaim/workfile.custom
    share/reaim/workfile.dbase
    share/reaim/workfile.disk
    share/reaim/workfile.five_sec
    share/reaim/workfile.fserver
    share/reaim/workfile.high_systime
    share/reaim/workfile.long
    share/reaim/workfile.new_dbase
    share/reaim/workfile.new_fserver
    share/reaim/workfile.shared
    share/reaim/workfile.short
    share/reaim/scripts/aim9-compare.pl
    share/reaim/scripts/aim_1.sh
    share/reaim/scripts/aim_2.sh
    share/reaim/scripts/aim_3.sh
    share/reaim/scripts/example_load.sh
    share/reaim/scripts/instruct.sh
    share/reaim/scripts/run.10.users.sh
    share/reaim/scripts/runall.sh
    share/reaim/scripts/setup.sh
    share/reaim/scripts/true
    share/reaim/scripts/xover_load.sh
    
  5. Define REAIM_PKG to the location of your installed reaim tree (eg. in Make.paths or MakePaths.proto for your site).

  6. Rebuild and boot K42, then login and run /home/reaim/runReAIM. Use runReAIM -h to see the available options.

No doubt something will break. Feel free to ask AndrewBaumann or JeremyKerr for advice.

Results

NB: these are all old data, and it's not clear what workfile was in use (it probably wasn't workfile.alltests, which the current script defaults to). Poor K42 results in comparison to Linux are expected, because of the high cost of fork in K42.

Running on an xserve at UNSW

For a noDeb build of the current (2005-10-18) HEAD on a 2-CPU G5 xserve, I'm getting around 39500 jobs per minute.

Running on k1 at watson

Linux

2.6.12-rc2

Max Jobs per Minute 33381.82

K42 (noDeb)

CVS HEAD at 2005-10-27

Max Jobs per Minute 13830.51

Issues

AIM7Benchmark (last edited 2006-04-10 03:49:34 by AndrewBaumann)