NetBSD Problem Report #10841
Received: (qmail 5896 invoked from network); 16 Aug 2000 00:59:22 -0000
Message-Id: <200008160559.e7G5xFC02585@zorkmid.mit.edu>
Date: Wed, 16 Aug 2000 01:59:16 -0400 (EDT)
From: John Hawkinson <jhawk@mit.edu>
Reply-To: jhawk@mit.edu
To: gnats-bugs@gnats.netbsd.org
Subject: spray delays are not sufficiently granular
X-Send-Pr-Version: 3.95
>Number: 10841
>Category: bin
>Synopsis: spray delays are not sufficiently granular
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Aug 16 01:00:00 +0000 2000
>Closed-Date:
>Last-Modified: Thu Mar 22 03:23:51 +0000 2001
>Originator: John Hawkinson
>Release: netbsd-1-5 20000713
>Organization:
MIT
>Environment:
System: NetBSD zorkmid.mit.edu 1.5E NetBSD 1.5E (ZORKMID-$Revision: 1.2 $) #38: Sun Aug 13 21:40:17 EDT 2000 jhawk@zorkmid.mit.edu:/usr/local/netbsd-current/src/sys/arch/i386/compile/ZORKMID i386
>Description:
spray(8) makes it extremely difficult to usefully specify enough
delay/slop to make spray operate safely while still measuring usefully.
>How-To-Repeat:
It seems that under some situations spray cannot work without
a delay:
zorkmid# spray 10.0.0.1
sending 1162 packets of lnth 86 to 10.0.0.1 ...spray: RPC: Unable to send; errno = No buffer space available
But adding hte minimum delay produces a result that seems
oddly suspicious to me:
zorkmid# spray -d 1 10.0.0.1
sending 1162 packets of lnth 86 to 10.0.0.1 ...
in 23.27 seconds elapsed time
no packets dropped
Sent: 50 packets/sec, 4.2K bytes/sec
Rcvd: 50 packets/sec, 4.2K bytes/sec
zorkmid# spray -d 2 10.0.0.1
sending 1162 packets of lnth 86 to 10.0.0.1 ...
in 23.18 seconds elapsed time
no packets dropped
Sent: 50 packets/sec, 4.2K bytes/sec
Rcvd: 50 packets/sec, 4.2K bytes/sec
So I suspect the delay is way too large. More delay samples:
zorkmid# spray -d 10 10.0.0.1
sending 1162 packets of lnth 86 to 10.0.0.1 ...
in 23.27 seconds elapsed time
1 packets (0.09%) dropped
Sent: 50 packets/sec, 4.2K bytes/sec
Rcvd: 50 packets/sec, 4.2K bytes/sec
zorkmid# spray -d 100 10.0.0.1
sending 1162 packets of lnth 86 to 10.0.0.1 ...
in 966387211.46 seconds elapsed time
259 packets (22.29%) dropped
Sent: 0 packets/sec, 0 bytes/sec
Rcvd: 0 packets/sec, 0 bytes/sec
Comparing this against localhost:
zorkmid# spray localhost
sending 1162 packets of lnth 86 to localhost ...
in 0.08 seconds elapsed time
no packets dropped
Sent: 13973 packets/sec, 1173.5K bytes/sec
Rcvd: 13973 packets/sec, 1173.5K bytes/sec
zorkmid# spray -d 1 localhost
sending 1162 packets of lnth 86 to localhost ...
in 23.24 seconds elapsed time
no packets dropped
Sent: 50 packets/sec, 4.2K bytes/sec
Rcvd: 50 packets/sec, 4.2K bytes/sec
zorkmid# spray -d 2 localhost
sending 1162 packets of lnth 86 to localhost ...
in 23.24 seconds elapsed time
no packets dropped
Sent: 50 packets/sec, 4.2K bytes/sec
Rcvd: 50 packets/sec, 4.2K bytes/sec
>Fix:
spray -d uses usleep(3). Perhaps it should also be able to nanosleep(2),
or it should probabilistically sleep on some packets, and not others, or
sleep at Possion intervals between packets.
--jhawk
>Release-Note:
>Audit-Trail:
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.