mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: "Jeff V. Merkey" <jmerkey@vger.timpanogas.org>
Cc: Andi Kleen <ak@suse.de>, linux-kernel@vger.kernel.org
Subject: Re: 2.2.18Pre Lan Performance Rocks!
Date: Mon, 30 Oct 2000 08:38:27 +0100	[thread overview]
Message-ID: <20001030083827.B32389@gruyere.muc.suse.de> (raw)
In-Reply-To: <39FCB09E.93B657EC@timpanogas.org> <E13q2R7-0006S7-00@the-village.bc.nu> <20001029183531.A7155@vger.timpanogas.org> <20001030074700.A31783@gruyere.muc.suse.de> <20001029235821.A19076@vger.timpanogas.org> <20001030080858.A32204@gruyere.muc.suse.de> <20001030001646.A19136@vger.timpanogas.org>
In-Reply-To: <20001030001646.A19136@vger.timpanogas.org>; from jmerkey@vger.timpanogas.org on Mon, Oct 30, 2000 at 12:16:46AM -0700

On Mon, Oct 30, 2000 at 12:16:46AM -0700, Jeff V. Merkey wrote:
> On Mon, Oct 30, 2000 at 08:08:58AM +0100, Andi Kleen wrote:
> > On Sun, Oct 29, 2000 at 11:58:21PM -0700, Jeff V. Merkey wrote:
> > > On Mon, Oct 30, 2000 at 07:47:00AM +0100, Andi Kleen wrote:
> > > > On Sun, Oct 29, 2000 at 06:35:31PM -0700, Jeff V. Merkey wrote:
> > > > > On Mon, Oct 30, 2000 at 12:04:23AM +0000, Alan Cox wrote:
> > > > > > > It's still got some problems with NFS (I am seeing a few RPC timeout
> > > > > > > errors) so I am backreving to 2.2.17 for the Ute-NWFS release next week,
> > > > > > > but it's most impressive.
> > > > > > 
> > > > > > Can you send a summary of the NFS reports to nfs-devel@linux.kernel.org
> > > > > 
> > > > > Yes.  I just went home, so I am emailing from my house.  I'll post late 
> > > > > tonight or in the morning.  Performance on 100Mbit with NFS going 
> > > > > Linux->Linux is getting better throughput than IPX NetWare Client -> 
> > > > > NetWare 5.x on the same network by @ 3%.  When you start loading up a 
> > > > > Linux server, it drops off sharply and NetWare keeps scaling, however, 
> > > > > this does indicate that the LAN code paths are equivalent relative to 
> > > > > latency vs. MSM/TSM/HSM in NetWare.  NetWare does better caching 
> > > > > (but we'll fix this in Linux next).  I think the ring transitions to 
> > > > > user space daemons are what are causing the scaling problems 
> > > > > Linux vs. NetWare.
> > > > 
> > > > There are no user space daemons involved in the knfsd fast path, only in slow paths
> > > > like mounting.
> > > 
> > > So why is it spawning off nfsd servers in user space?  I did notice that all
> > 
> > They just provide a process context, the actual work is only done in kernel mode.
> > 
> > > the connect logic is down in the kernel with the RPC stuff in xprt.c, and this
> > > looks to be pretty fast.  I know about the checksumming problem with TCPIP.
> > > But cycles are cheap on todays processors, so even with this overhead, it 
> > > could still get faster.  IPX uses small packets that are less wire efficient 
> > > since the ratio of header size to payload is larger than what NFS in Linux
> > > is doing, plus there's more of them for an equivalent data transfer, even
> > > with packet burst.   IPX would tend to be faster if there were multiple 
> > > routers involved, since the latency of smaller packets would be less and
> > > IPX never has to deal with the problem of fragmentation.
> > > 
> > > Is there any CR3 reloading or tasking switching going on for each interrupt
> > > that comes in you know of, BTW?  EMON stats show the server's bus utilization
> > 
> > No, interrupts do not change CR3.
> > 
> > One problem in Linux 2.2 is that kernel threads reload their VM on context switch
> > (that would include the nfsd thread), this should be fixed in 2.4 with lazy mm.
> 
> When you say it reloads it's VM, you mean it reloads the CR3 register?  

Yes.

> This will cost you about 15 clocks up front, and about 150 clocks over
> time as each TLB is reloaded (plus is will do LOCK# assertions invisibly
> underneath for PTE fetches) One major difference is that in NetWare, 
> CR3 does not ever get changed in any network I/O fast paths, and none of 
> the TCP or IPX processes exist in user space, so there's never this 
> background overhead with page tables being loaded in and out.  CR3 only 
> gets mucked with when someone allocates memory and pages in an address 
> frame (when memory is alloced and freed).
> 
> The user space activity is what's causing this, plus the copying.  Is there
> an easy way to completely disable multiple PTE/PDE address spaces and just
> map the entire address space linear (like NetWare) with a compile option 
> so I could do a true apples to apples comparison?

No. In 2.4 you could probably use the on demand lazy vm mechanism ingo described for
the nfsd processes. In 2.2 it is a bit more tricky, if I remember right lazy mm needed
quite a few changes.

But before doing too many changes i would first verify if that is really the problem.


> > Hmm actually it should be only fixed for true kernel threads that have been started 
> > with kernel_thread(), the "pseudo kernel threads" like nfsd uses probably do not 
> > get that optimization because they don't set their MM to init_mm. 
> > 
> > > to get disproportiantely higher in Linux than NetWare 5.x and when it hits
> > > 60% of total clock cycles, Linux starts dropping off.  NetWare 5.x is 1/8 
> > 
> > I think that can be explained by the copying.
> 
> It's more.  I am seeing tons of segment register reloads, which are very 
> heavy, and atomic reads of PTE entries.

PTEs are read for aging on memory pressure in vmscan.

segment register reload happen on interrupt entry, to load the kernel cs/ds (are they that
costly?). If it was really costly you could probably check in interrupt entry if you're
already running in kernel space and skip it.

> 
> > > the bus utilitization, which would suggest clocks are being used for something
> > > other than pushing packets in and out of the box (the checksumming is done 
> > > in the tcp code when it copies the fragments, which is very low overhead).
> > 
> > No, unfortunately not. NFS uses UDP and the UDP defragmenting doesn't do copy-checksum
> 
> Correct.  You're right -- it's in the tcp code, however, I remember going over
> this when I was reviewing Alan's code -- that's what I was think of.

2.2 does not use checksum-copy-to-user in TCP RX, csum is either done separate or in hardware.
It does csum-copy-fragment for TX, as well as UDP.

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

  reply	other threads:[~2000-10-30  7:38 UTC|newest]

Thread overview: 152+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-29 23:19 Jeff V. Merkey
     [not found] ` <E13q2R7-0006S7-00@the-village.bc.nu>
2000-10-30  1:35   ` Jeff V. Merkey
2000-10-30  6:47     ` Andi Kleen
2000-10-30  6:58       ` Jeff V. Merkey
2000-10-30  7:08         ` Andi Kleen
2000-10-30  7:16           ` Jeff V. Merkey
2000-10-30  7:38             ` Andi Kleen [this message]
2000-10-30  8:04               ` Jeff V. Merkey
2000-10-30  8:16                 ` Andi Kleen
2000-10-30 12:47                 ` Alan Cox
2000-10-30 12:50                   ` Andi Kleen
2000-10-30  8:26           ` Ingo Molnar
2000-10-30  7:20             ` Jeff V. Merkey
2000-10-30  8:39               ` Ingo Molnar
2000-10-30  8:08                 ` Jeff V. Merkey
2000-10-30  9:52                   ` Ingo Molnar
2000-10-30  8:55                     ` Jeff V. Merkey
2000-10-30 10:13                       ` Ingo Molnar
2000-10-30  9:11                         ` Jeff V. Merkey
2000-10-30 10:41                           ` Ingo Molnar
2000-10-30  9:33                             ` Jeff V. Merkey
2000-10-30 10:56                               ` Ingo Molnar
2000-10-30  9:45                                 ` Jeff V. Merkey
2000-10-30 11:04                               ` Ingo Molnar
2000-10-30  9:56                                 ` Jeff V. Merkey
2000-10-30 11:13                                   ` Ingo Molnar
2000-10-30 10:08                                     ` Jeff V. Merkey
2000-10-30 17:41                                     ` Andrea Arcangeli
2000-10-30 17:58                                       ` Chris Evans
2000-10-30 18:01                                         ` Jeff V. Merkey
2000-10-30 18:21                                           ` Andrea Arcangeli
2000-10-30 17:59                                       ` Jeff V. Merkey
2000-10-31  8:08                                         ` Ingo Molnar
2000-10-31 20:04                                           ` Jeff V. Merkey
2000-10-30 19:11                                       ` Dan Hollis
2000-10-31 18:59                                         ` Pavel Machek
2000-10-30 10:27                       ` Ingo Molnar
2000-10-30  9:20                         ` Jeff V. Merkey
2000-10-30 10:44                           ` Ingo Molnar
2000-10-30  9:38                             ` Jeff V. Merkey
2000-10-30 11:01                               ` Ingo Molnar
2000-10-30  9:54                                 ` Jeff V. Merkey
2000-10-30 11:12                                   ` Ingo Molnar
2000-10-30 10:06                                     ` Jeff V. Merkey
2000-10-30 10:56                                       ` john slee
2000-10-30 18:04                                         ` Jeff V. Merkey
2000-10-30 11:31                                       ` Ingo Molnar
2000-10-30 12:57                                   ` Alan Cox
2000-10-30 17:55                                     ` Jeff V. Merkey
2000-10-30 18:34                                       ` Alan Cox
2000-10-30 21:17                                         ` Jeff V. Merkey
2000-10-31  9:25                                         ` Erik Andersen
2000-10-31 18:50                               ` Pavel Machek
2000-10-31 20:06                                 ` Jeff V. Merkey
2000-10-31 20:13                                   ` Jeff V. Merkey
2000-10-31 21:31                                     ` Ingo Molnar
2000-10-31 21:56                                       ` Ingo Molnar
2000-10-31 21:57                                       ` Jeff V. Merkey
2000-11-01  0:27                                   ` Ingo Molnar
2000-10-31 23:18                                     ` Jeff V. Merkey
2000-11-01  0:47                                       ` Ingo Molnar
2000-11-01  0:56                                       ` Davide Libenzi
     [not found]                                       ` <20001102031546.B10806@cerebro.laendle>
     [not found]                                         ` <20001101212835.A2425@vger.timpanogas.org>
     [not found]                                           ` <20001102043332.A27126@fuji.laendle>
     [not found]                                             ` <3A0195DA.DDEBAC51@timpanogas.org>
     [not found]                                               ` <20001102194323.D2790@cerebro.laendle>
     [not found]                                                 ` <3A01CBB5.48C3094A@timpanogas.org>
     [not found]                                                   ` <20001102214903.F2790@cerebro.laendle>
     [not found]                                                     ` <3A01E71A.778BD898@timpanogas.org>
     [not found]                                                       ` <20001102232210.H2790@cerebro.laendle>
     [not found]                                                         ` <3A01ECD2.76DE10FF@timpanogas.org>
2000-11-02 22:46                                                           ` Jeff V. Merkey
2000-11-03  0:12                                                             ` Davide Libenzi
2000-11-02 23:00                                                               ` Jeff V. Merkey
2000-10-31 21:34                                 ` Ingo Molnar
2000-10-31 21:52                                   ` Jeff V. Merkey
2000-10-31 22:05                                     ` Andi Kleen
2000-10-31 22:23                                       ` Jeff V. Merkey
2000-10-31 22:45                                         ` Jeff V. Merkey
2000-10-31 22:44                                           ` David Lang
2000-10-31 22:57                                             ` Jeff V. Merkey
2000-10-31 22:52                                               ` David Lang
2000-10-31 23:02                                           ` Alan Cox
2000-10-31 23:03                                             ` Jeff V. Merkey
2000-11-01  0:08                                           ` Ingo Molnar
2000-10-31 22:59                                             ` Jeff V. Merkey
2000-11-01  2:30                                           ` Horst von Brand
2000-10-31 23:05                                         ` Richard B. Johnson
2000-10-31 23:14                                           ` Jeff V. Merkey
2000-11-01  0:32                                             ` Ingo Molnar
2000-10-31 23:23                                               ` Jeff V. Merkey
2000-11-01  0:55                                           ` Ingo Molnar
2000-10-31 23:54                                         ` Ingo Molnar
2000-10-31 22:47                                           ` Jeff V. Merkey
2000-10-31 22:56                                             ` Larry McVoy
2000-10-31 22:55                                               ` Jeff V. Merkey
2000-11-01  0:10                                             ` Ingo Molnar
2000-11-01  5:38                                         ` Daniel Phillips
2000-11-03  6:42                                         ` Daniel Phillips
2000-10-31 22:59                                     ` Michael H. Warfield
2000-10-31 23:12                                     ` Ingo Molnar
2000-10-31 22:28                                       ` Jeff V. Merkey
2000-11-01  5:01                                         ` Peter Samuelson
2000-11-01  5:09                                           ` Larry McVoy
2000-11-01  5:20                                             ` Peter Samuelson
2000-10-30 10:50                           ` Ingo Molnar
2000-10-30  9:40                             ` Jeff V. Merkey
2000-10-30 23:26                 ` David Woodhouse
2000-10-30 23:49                   ` Jeff V. Merkey
2000-10-31 23:34                     ` Roger Larsson
2000-10-31 15:18 ` Reto Baettig
2000-10-31 20:26   ` Alan Cox
2000-10-31 15:30     ` Reto Baettig
2000-10-31 20:37       ` Alan Cox
2000-10-31 20:48         ` Jesse Pollard
2000-10-31 20:58           ` Alan Cox
2000-11-01  1:33           ` Horst von Brand
2000-11-01  3:42             ` Jesse Pollard
2000-11-01 13:26               ` Horst von Brand
2000-10-31 21:43     ` Jeff V. Merkey
2000-10-31 21:50       ` Jeff V. Merkey
2000-10-31 20:36   ` Rik van Riel
2000-10-31 15:47     ` Reto Baettig
2000-10-31 21:05       ` Rik van Riel
2000-10-31 21:33     ` Jeff V. Merkey
2000-10-31 21:48       ` Rik van Riel
2000-10-31 16:54         ` Reto Baettig
2000-10-31 21:58           ` Rik van Riel
2000-10-31 21:53         ` Jeff V. Merkey
     [not found] <200010300823.BAA19834@vger.timpanogas.org>
2000-10-30  8:36 ` Jeff V. Merkey
2000-10-31 21:44 Jeff V. Merkey
2000-10-31 21:36 ` Paul Menage
2000-10-31 21:44   ` David S. Miller
2000-10-31 23:21   ` Matti Aarnio
2000-10-31 23:39     ` David Weinehall
2000-10-31 22:05 ` Larry McVoy
2000-10-31 22:15   ` Jeff V. Merkey
2000-10-31 22:27     ` Larry McVoy
2000-10-31 22:38       ` Jeff V. Merkey
2000-10-31 22:48         ` Rik van Riel
2000-10-31 22:50           ` Jeff V. Merkey
2000-10-31 22:49         ` Larry McVoy
2000-10-31 22:53           ` Jeff V. Merkey
2000-10-31 23:15         ` Nathan Paul Simons
2000-10-31 23:20           ` Jeff V. Merkey
2000-11-01  0:00             ` Michael H. Warfield
2000-11-01  0:07               ` Alan Cox
2000-11-01  0:13                 ` Michael H. Warfield
2000-11-01  1:30         ` Andrea Arcangeli
     [not found]           ` <20001031183809.C9733@.timpanogas.org>
2000-11-01 15:41             ` Andrea Arcangeli
2000-11-01 17:25               ` Jeff V. Merkey
2000-11-01 17:35                 ` Jeff V. Merkey
2000-11-01 18:07                   ` Andrea Arcangeli
2000-11-01 18:34                     ` Jeff V. Merkey
2000-11-01 21:13                       ` Daniel Phillips
2000-11-01 21:32                         ` Jeff V. Merkey
2000-11-01 11:13         ` David Woodhouse
2000-11-01 15:00           ` Andrea Arcangeli
2000-11-01  9:51       ` Anton Altaparmakov
2000-11-01 17:28         ` Jeff V. Merkey
2000-11-02 21:58         ` Anton Altaparmakov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20001030083827.B32389@gruyere.muc.suse.de \
    --to=ak@suse.de \
    --cc=jmerkey@vger.timpanogas.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®