Re: linux-kernel-digest V1 #892

From: Paul Barton-Davis (pbd@Op.Net)
Date: Thu Jun 01 2000 - 13:43:32 EST


>From: Rik van Riel <riel@conectiva.com.br>
>Date: Thu, 1 Jun 2000 08:26:07 -0300 (BRST)
>Subject: Re: Poor I/O Performance (10x slower than 2.2)
>
>On Wed, 31 May 2000, Michal Ostrowski wrote:
>
>> I've noticed some horrible I/O performance in recent 2.3
>> kernels. My first guess was that this was related to the
>> various VM problems that have been running rampant recently, but
>> now I'm not so sure. Even though I've been reading reports that
>> VM performance has been improving, I've seen no noticeable
>> impact on my test results.
>
>The fact that performance really deteriorates when you
>run more threads suggests that this may have something
>to do with the elevator code.

Have you (Michael) tried playing the elevator parameters? A
quick-n-dirty program is enclosed below (i couldn't find elvtune
online). I set them like this (after compiling the thing below and
calling it elvtune):

         elvtune /dev/sda 10000 10000 128

This has a dramatic positive effect on my streaming disk i/o
performance. However, it does not get them back to 2.2.10 levels, let
alone 2.3.51 levels.

Rik - I haven't had time to move up to the 2.4.0-test1 series yet, but
I will. Part of my resistance is, to be honest, feeling *really*
pissed off at what I see as Linus' stupidity in bringing out a 2.4.0
numbered kernel when there is still so much work to do.

--p

#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>

typedef struct blkelv_ioctl_arg_s {
        void * queue_ID;
        int read_latency;
        int write_latency;
        int max_bomb_segments;
} blkelv_ioctl_arg_t;

#define BLKELVGET _IO(0x12,106)
#define BLKELVSET _IO(0x12,107)

main (int argc, char *argv[])

{
        int fd;
        blkelv_ioctl_arg_t arg;

        if (argc < 2 || (argc != 2 && argc != 5)) {
                fprintf (stderr, "usage: elvtune device [ read write bomb ]\n");
                exit (1);
        }

        if ((fd = open (argv[1], O_RDWR)) < 0) {
                fprintf (stderr, "cannot open device (%s)\n",
                         strerror (errno));
                exit (1);
        }

        if (argc == 5) {
                arg.read_latency = atoi (argv[2]);
                arg.write_latency = atoi (argv[3]);
                arg.max_bomb_segments = atoi (argv[4]);

                if (ioctl (fd, BLKELVSET, &arg) < 0) {
                        fprintf (stderr, "cannot get elevator params (%s)\n",
                                 strerror (errno));
                }
        }

        if (ioctl (fd, BLKELVGET, &arg) < 0) {
                fprintf (stderr, "cannot get elevator params (%s)\n",
                         strerror (errno));
        }
        
        printf ("write: %d read: %d bomb: %d\n",
                arg.write_latency,
                arg.read_latency,
                arg.max_bomb_segments);

        close (fd);
        exit (0);
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jun 07 2000 - 21:00:13 EST