From owner-freebsd-hackers Tue Jun 30 08:31:38 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA08840 for freebsd-hackers-outgoing; Tue, 30 Jun 1998 08:31:38 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from mail-out2.apple.com (mail-out2.apple.com [17.254.0.51]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA08834 for ; Tue, 30 Jun 1998 08:31:32 -0700 (PDT) (envelope-from justin@lilith.apple.com) Received: from mailgate.apple.com (A17-128-100-225.apple.com [17.128.100.225]) by mail-out2.apple.com (8.8.5/8.8.5) with ESMTP id IAA24672 for ; Tue, 30 Jun 1998 08:22:24 -0700 Received: from scv3.apple.com (scv3.apple.com [17.128.100.121]) by mailgate.apple.com (mailgate.apple.com2.0.15) with ESMTP id for ; Tue, 30 Jun 1998 08:22:18 -0700 Received: from lilith.apple.com (lilith.apple.com [17.202.41.78]) by scv3.apple.com (8.8.5/8.8.5) with ESMTP id IAA31922 for ; Tue, 30 Jun 1998 08:22:16 -0700 Received: (justin@localhost) by lilith.apple.com (8.6.9/A/UX 3.1) id IAA13568; Tue, 30 Jun 1998 08:22:58 -0700 Date: Tue, 30 Jun 1998 08:22:58 -0700 From: "Justin C. Walker" Message-Id: <199806301522.IAA13568@lilith.apple.com> To: freebsd-hackers@FreeBSD.ORG In-Reply-To: Snob Art Genre's message of Tue, 30 Jun 1998 01:55:51 -0400 (EDT) Subject: Re: client-server problem Reply-To: justin@apple.com Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Snob Art Genre (benedict@echonyc.com) opines: /* * On Mon, 29 Jun 1998, Yee Man Chan wrote: * * > Here is how the program performs under FreeBSD 3.0-CURRENT with different * > n: * > 1-100 Very fast * > 101-207 Very Slow (This range is the strangest I've ever seen) * > 208-1024 Very fast (just like 1-100) * > >1024 strange errors like unknown host or connection timedout * > * > Any clue? * * I don't know about your >1024 problems, but the rest is explainable. It * has to do with the way memory is allocated in the kernel for network * i/o. I don't remember the exact details, but it's all put forth quite * clearly in W. Richard Stevens' _TCP/IP Illustrated Vol. 3_, with graphs * and everything. * * Are you using TCP or UDP? What kind of link are you going over? */ This could, as indicated, be related to kernel buffering of network data. The amount of data in an mbuf is ~100 bytes (100 for the first mbuf in a packet, 108 for subsequent ones, assuming 128-byte mbufs), and BSD stacks typically allow up to two mbufs to hold a single "write"s data before switching to clusters which, depending on the OS subspecies, could be from 1K up. The behavior you are seeing likely reflects the cost of going from one to two mbufs, and then from two mbufs to one or more clusters. Most standard BSD-based systems have wierd behavior in their use of clusters, and how the graphs look above the cluster point in the curve depends on that, and on how many times you've run the tests, and how much of the cluster pool has been carved up into mbufs, etc. etc. Most of the BSD-based systems I've looked at show similar performance curves (Rhapsody, AIX, FreeBSD, ...) Regards, Justin Justin C. Walker, Curmudgeon-At-Large * Institute for General Semantics | They sentenced me to 20 years Apple CoreOS Networking | of boredom Apple Computer, Inc. | For trying to change the system 2 Infinite Loop | from within Cupertino, CA 95014 | LC *---------------------------------------*------------------------------------* To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message