amazing but true (2.4.0-test5)

From: Tigran Aivazian (tigran@veritas.com)
Date: Sun Jul 30 2000 - 18:20:56 EST


Hi guys,

I remember a long time ago I found a rather interesting situation, whereby
running a COBOL (microfocus) application while having a key pressed makes
the processing go faster by about 100% or more. As it turned out it was
due to the fact that some analogue of PC getch() was provided on top of
select(2) (in order to check on each loop iteration if user pressed ESC
key) and so if you don't press a key it will just keep timing out and so
most of the work by application consists of timing out select, whilst if
you do press a key, select(2) will return very quickly and application
gets a lot more chance to do some work.

Now, why do I tell you this? Because this very day I discovered a very
similar (yet completely different and for a completely different reason,
currently unknown) effect.

I have an old Pentium 120MHz 32M RAM running 2.4.0-test5 and 100Mbit
ATX-2500 card driven by 8139too driver. Now, when this card is used
between fast machines (PII/375MHz talking to dual PIII/550MHz) everything
is fine and I get 7M/second (Mbyte not Mbit!) ftp rates and 9Mbyte/sec
bonnie over NFS which is close to theoretical limit (I wouldn't expect
from Linux anything other than being perfect).

But when used on a slow P120MHz I only get 600Kbyte/second ftp transfer
speeds. Moreover, I noticed that kswapd actually uses some CPU, as much as
20-30% thereof! And both the disk and network blinking was in bursts, on
average resulting in about 600K/seconds.

Then, I accidentally left my finger on a key in a bash session running
over rlogin to the slow box and, behold, the lights became solid (network
and hard disk) and the ftp rate jumped up to 1500Kbyte/second. I
experimented about 5 times on and off to make sure it is not a dream :)

It is reproducible - holding a key pressed makes my ftp sessions 2.5 times
faster... It is too late now to tcpdump the situation or put some printks
in 8139too driver to see if delays are due to network or is it some local
effect (memory/io subsystem on slow machine) - maybe tomorrow.

Regards,
Tigran

-
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 : Mon Jul 31 2000 - 21:00:32 EST