Re: packet drop with intel gigabit / marwell gigabit



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...


#!/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

_______________________________________________
freebsd-performance@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "freebsd-performance-unsubscribe@xxxxxxxxxxx"

Relevant Pages

  • [UNIX] Denial of Service in Apache HTTP Server 2.x
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... The Apache Software Foundation's HTTP Server Project is an effort to ... A memory leak in Apache server, allows a remote user to exhaust system ... Remote exploitation of a memory leak in the Apache HTTP Server causes the ...
    (Securiteam)
  • Re: Strange Segmentation Fault
    ... Tim Evers wrote: ... but large parts of apache and suexec and perl require system-specific ... Depending on where the system's memory allocator ...
    (comp.lang.c)
  • Re: mod_php and Fast CGI
    ... even done any basic tuning of your apache. ... system could cope (memory wise) with a lot more then 300 concurrent ... I am thinking about using fastcgi as not all these 286 httpd process ... php, say 100 process, and let them share) ...
    (comp.lang.php)
  • Get mod_auth_oracle to work on Freebsd
    ... as we are moving from single server to multiple ... However, when I tried to restart apache with the new module, I've got the ... out of memory allocating callback ... error while loading shared libraries ...
    (freebsd-questions)
  • Why dont shell scripts get loaded into memory at startup? (Was: Re: Unix scripts)
    ... >> memory before their execution. ... This deficiency in DOS is the primary motivation behind the .BTM file ... shell script, then, while it is running, noticed something that should be ...
    (comp.unix.shell)