From owner-freebsd-net@freebsd.org Tue Jan 30 13:06:10 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D749EC9313 for ; Tue, 30 Jan 2018 13:06:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9A4F16BAB5 for ; Tue, 30 Jan 2018 13:06:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id DEA931CDC4 for ; Tue, 30 Jan 2018 13:06:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w0UD68xD004064 for ; Tue, 30 Jan 2018 13:06:08 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w0UD68Bm004063 for freebsd-net@FreeBSD.org; Tue, 30 Jan 2018 13:06:08 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 225535] Delays in TCP connection over Gigabit Ethernet connections; Regression from 6.3-RELEASE Date: Tue, 30 Jan 2018 13:06:08 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.3-RELEASE X-Bugzilla-Keywords: regression X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: aeder@list.ru X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jan 2018 13:06:10 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D225535 --- Comment #7 from Aleksander Derevianko --- I have now running tests on Moxa DA-820 with kern.eventtimer.periodic=3D1. One interesting thing: if you look on tests with 6.3-RELEASE, 98% of sample= s is 1115322 send_sync 0 0 0 0=20 =3D send(small data) recv(small data) send(40Kb) recv(40Kb) - so every send() and recv() call is executed in <1ms. 7% of samples have=20 73629 send_sync 0 1 0 0=20=20 - so first recv() have 1ms execution time, but it's OK because it is first recv() after nanosleep(~200ms) - and we can't expect that nanosleep() will = act exactly the same on different computers. Moreover, nanosleep() period is evaluated from two local calls to clock_gettime( CLOCK_MONOTONIC, ...) and subtraction operation. But, for 10.3-RELEASE we have approximatelly even division between: 155042 send_sync 0 0 0 0 122890 send_sync 0 0 0 1 case with delay on first recv() - less then 0.02% 147 send_sync 0 1 0 0 This last 1 is for second recv() - and in this case, we have already syncronised computers over first small recv(). P.S. Test with kern.eventtimer.periodic=3D1 produce the following results f= or short test time: root@fspa2:~/clock/new_res # grep times periodic.txt | awk '{print $3 " " $= 4 " " $6 " " $8 " " $10 ;}' | sort | uniq -c 1484 send_sync 0 0 0 0 1314 send_sync 0 0 0 1 1 send_sync 0 0 0 230 4 send_sync 0 1 0 0 root@fspa1:~/clock/new_res # grep times periodic.txt | awk '{print $3 " " $= 4 " " $6 " " $8 " " $10;}' | sort | uniq -c 1698 send_sync 0 0 0 0 1134 send_sync 0 0 0 1 1 send_sync 0 0 0 229 11 send_sync 0 1 0 0 Very quick very huge delay. One moment: fspa1: times 2550: send_sync 0 recv_sync 0 send_data 0 recv_data 1 eval 52 sleep 2= 47 times 2551: send_sync 0 recv_sync 0 send_data 0 recv_data 0 eval 52 sleep 2= 48 times 2552: send_sync 0 recv_sync 0 send_data 0 recv_data 1 eval 52 sleep 2= 47 times 2553: send_sync 0 recv_sync 0 send_data 0 recv_data 0 eval 52 sleep 2= 47 times 2554: send_sync 0 recv_sync 0 send_data 0 recv_data 229 eval 52 sleep= 19 times 2555: send_sync 0 recv_sync 0 send_data 0 recv_data 0 eval 52 sleep 2= 48 times 2556: send_sync 0 recv_sync 0 send_data 0 recv_data 0 eval 52 sleep 2= 47 times 2557: send_sync 0 recv_sync 0 send_data 0 recv_data 0 eval 52 sleep 2= 47 times 2558: send_sync 0 recv_sync 0 send_data 0 recv_data 0 eval 52 sleep 2= 48 times 2559: send_sync 0 recv_sync 0 send_data 0 recv_data 0 eval 52 sleep 2= 47 fspb: times 2550: send_sync 0 recv_sync 0 send_data 0 recv_data 0 eval 52 sleep 2= 48 times 2551: send_sync 0 recv_sync 0 send_data 0 recv_data 1 eval 52 sleep 2= 47 times 2552: send_sync 0 recv_sync 0 send_data 0 recv_data 0 eval 52 sleep 2= 48 times 2553: send_sync 0 recv_sync 0 send_data 0 recv_data 1 eval 52 sleep 2= 47 times 2554: send_sync 0 recv_sync 0 send_data 0 recv_data 230 eval 52 sleep= 18 times 2555: send_sync 0 recv_sync 0 send_data 0 recv_data 1 eval 52 sleep 2= 47 times 2556: send_sync 0 recv_sync 0 send_data 0 recv_data 0 eval 52 sleep 2= 47 times 2557: send_sync 0 recv_sync 0 send_data 0 recv_data 0 eval 52 sleep 2= 48 times 2558: send_sync 0 recv_sync 0 send_data 0 recv_data 1 eval 52 sleep 2= 47 times 2559: send_sync 0 recv_sync 0 send_data 0 recv_data 0 eval 52 sleep 2= 47 The problem arise on the SAME cycle in both computers! How it is possible? Seems like in one of computers both send and receive was blocked (buffered) on some level. --=20 You are receiving this mail because: You are the assignee for the bug.=