From owner-freebsd-performance@FreeBSD.ORG Sun Apr 9 04:16:33 2006 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7608B16A400 for ; Sun, 9 Apr 2006 04:16:33 +0000 (UTC) (envelope-from j_guojun@lbl.gov) Received: from smtp102.sbc.mail.mud.yahoo.com (smtp102.sbc.mail.mud.yahoo.com [68.142.198.201]) by mx1.FreeBSD.org (Postfix) with SMTP id 02BB143D45 for ; Sun, 9 Apr 2006 04:16:32 +0000 (GMT) (envelope-from j_guojun@lbl.gov) Received: (qmail 13737 invoked from network); 9 Apr 2006 04:16:32 -0000 Received: from unknown (HELO ?192.168.2.10?) (jinmtb@sbcglobal.net@68.127.175.93 with plain) by smtp102.sbc.mail.mud.yahoo.com with SMTP; 9 Apr 2006 04:16:32 -0000 Message-ID: <44388B0C.7020702@lbl.gov> Date: Sat, 08 Apr 2006 21:18:20 -0700 From: "Jin Guojun [VFFS]" User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050108 X-Accept-Language: zh, zh-CN, en MIME-Version: 1.0 To: OxY References: <20060322071023.70808.qmail@web30305.mail.mud.yahoo.com> <442187FE.3060300@lbl.gov> <003301c64f44$89fdcd40$0201a8c0@oxy> <820F5FD6-C31F-4C28-9E66-64643C03086B@foolishgames.com> <4424520D.9000504@lbl.gov> <008501c65030$96726710$0201a8c0@oxy> <44276151.1060302@lbl.gov> <000c01c65992$14e11370$0201a8c0@oxy> In-Reply-To: <000c01c65992$14e11370$0201a8c0@oxy> Content-Type: multipart/mixed; boundary="------------000504050601060704030207" X-Mailman-Approved-At: Sun, 09 Apr 2006 04:42:04 +0000 Cc: FreeBSD Mailing Lists Subject: Re: packet drop with intel gigabit / marwell gigabit X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2006 04:16:33 -0000 This is a multi-part message in MIME format. --------------000504050601060704030207 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit For this situation, you can run "netstat -m" to see if there is mbuf outage. Attached is a shell script to watch mbuf usage in 1 second interval. If you see the maximum-used (peak) count reach (or close) to the "max", and the cur count changes dramatically during your test, you then may have memory issue. If you do not see such memory problem, then you need to prepare to use following tools together to do the diagnose: tcpdump (tcpdpriv if you do not want to give out your IP info.) iperf or netest show-mbuf script Let me know what show-mbuf says. -Jin OxY wrote: > hi! > unfortunately i couldn't accept the situation, so i did further tests.. > i noticed a weird thing: > after reboot i have about 0,2-0,5% loss (with apache), but after > 20-30mins i got 3-4-6%, depending on the traffic of fxp0 and apache.. > when i stop apache it falls back to 0,1-0,2%, starting apache again > and got > 3-4-6% immediately.. > seems like a buffer or cache is full (maybe vm cache, or something > about memory?) > i think 700MB/s memory bandwith ought to be enough and it seems it is... > > answering you questions in order: > when apache runs (or any other process which needs resource) i got > loss on em0 even > with 100mbit test on udp test without any I/O... --------------000504050601060704030207 Content-Type: text/plain; name="show-mbuf" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="show-mbuf" #!/bin/sh RVer=`uname -r | awk -F. '{printf("%d%2d", $1, $2)}'` if [ $RVer -eq 501 ]; then # Probably for 5.1-R at 2004/03 ? DoNetstat="'/Total/ {print \$2; exit}' | awk -F/ '{print \$1}'" else case "$1" in -c) who="clusters in use" ;; *) who="mbufs in use" ;; esac DoStat="/$who/ {print \$1}" DeLiminator="-F/" fi last=0 maxm=0 netstat -m echo "last cur maximum-used (peak)" while [ 0 ]; do cur=`netstat -m | awk $DeLiminator "$DoStat"` [ $maxm -lt $cur ] && maxm=$cur echo $last $cur $maxm | awk '$1 != $2 {printf("\r%3d %5d %7d ", $1, $2, $3)}' last=$cur sleep 1 done --------------000504050601060704030207--