rmt significantly slower under 2.0.32 than 2.0.27

Louis Mandelstam (lma@sacc.org.za)
Mon, 1 Dec 1997 13:30:07 +0200 (SAT)


Good day -

A site I manage uses two servers bound together rather closely, currently
still running Red Hat 4.1

After upgrading the machines from 2.0.27 to 2.0.32, I find that backups
from machine A to machine B (which houses an Exabyte 8505XL 8mm drive)
slowed down significantly - e.g. a 2 hour backup went up to about 5 hours
or so. The backups are done using bru on machine A, using rmt to access
the tape drive on machine B.

After doing several tests I've found that changing the kernel on machine B
between .27 and .32 definately affects the speed at which rmt runs. I've
now tested writing to machine B's /dev/null using rmt and it is still a
lot slower under 2.0.32, so the problem doesn't appear to be related to
the SCSI tape subsystem at all.

My tests also show that other networking services' speed do not change
between .27 and .32 - piping data through rsh for example runs at about
the same speed under both kernels. I've only found the problem when using
rmt so far.

Using bru to backup a single large file from machine A to machine B via
rmt, and stracing rmt on machine B when B is running 2.0.27 gives the main
loop with iterations such as:

0.004123 read(0, "W", 1) = 1
0.042521 read(0, "4", 1) = 1
0.003420 read(0, "0", 1) = 1
0.003048 read(0, "9", 1) = 1
0.005520 read(0, "6", 1) = 1
0.002977 read(0, "\n", 1) = 1
0.003341 read(0, "/tmp/random\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096
0.005460 write(3, "/tmp/random\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096
0.005591 write(1, "A4096\n", 6) = 6

Under 2.0.32, I get iterations running more slowly, such as:

0.004999 read(0, "W", 1) = 1
0.006147 read(0, "4", 1) = 1
0.004374 read(0, "0", 1) = 1
0.003036 read(0, "9", 1) = 1
0.003228 read(0, "6", 1) = 1
0.003048 read(0, "\n", 1) = 1
0.003218 read(0, "/tmp/random\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096
0.006667 write(3, "/tmp/random\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096
0.004465 write(1, "A4096\n", 6) = 6

Some iterations run as slowly as:

0.004969 read(0, "W", 1) = 1
0.003259 read(0, "4", 1) = 1
0.003188 read(0, "0", 1) = 1
0.003107 read(0, "9", 1) = 1
0.003017 read(0, "6", 1) = 1
0.003731 read(0, "\n", 1) = 1
0.003510 read(0, "/tmp/random\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 1454
0.198969 read(0, "/|\321l\271\261", 2642) = 6
0.003550 read(0, "q\21\232\0\260\364u\313=\21\"\367"..., 2636) = 1460
0.010840 read(0, "a\336C\255\211K\0\332\214\333qs@"..., 1176) = 1176
0.005371 write(3, "/tmp/random\0\0\0\0\0\0\0\0\0\0\0"..., 4096) =
4096
0.004446 write(1, "A4096\n", 6) = 6

I'm not experienced in Unix C programming, please be gentle. ;-)

Nothing apart from the kernels are different. The machine running rmt is
a 486DX4-100, 32M RAM. SCSI-only - aha2940. The .27 kernel used above is
the standard Red Hat one, the .32 one has been recompiled with aha2940 and
st support built-in rather than as modules. I found the same effect using
the standard RH .32 modular kernel as well however.

What other tests can I do to try find the cause?

Regards

-------------------------------------------------------------------------
Louis Mandelstam (Acting in my personal capacity for a change)
email: lman@bofh.org.za
"Problems breed. Kill the parents." - me
-------------------------------------------------------------------------