Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jun 1998 08:22:58 -0700
From:      "Justin C. Walker" <justin@lilith.apple.com>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: client-server problem
Message-ID:  <199806301522.IAA13568@lilith.apple.com>
In-Reply-To: Snob Art Genre's message of Tue, 30 Jun 1998 01:55:51 -0400 (EDT) <Pine.GSO.3.96.980630015211.7127A-100000@echonyc.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806301522.IAA13568>