Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Feb 1999 09:24:45 -0600
From:      Dan Nelson <dnelson@emsphone.com>
To:        Dave Hayes <dave@jetcafe.org>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Quake2 and UDP recvspace
Message-ID:  <19990226092445.A37611@dan.emsphone.com>
In-Reply-To: <199902260437.UAA09666@hokkshideh.jetcafe.org>; from "Dave Hayes" on Thu Feb 25 20:37:30 GMT 1999
References:  <199902260437.UAA09666@hokkshideh.jetcafe.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Feb 25), Dave Hayes said:
> I'm runing Quake2 on FreeBSD 2.2.8-RELEASE as a dedicated server.
> Quake2 with many players basically slams the UDP layer of my
> machine, for those of you who don't already know. :)
>
> Netstat -s reports:
>
> udp:
>         110301027 datagrams received
>         0 with incomplete header
>         30 with bad data length field
>         1377 with bad checksum
>         29882 dropped due to no socket
>         651167 broadcast/multicast datagrams dropped due to no socket
> >>      15494 dropped due to full socket buffers
>         0 not for hashed pcb
>         109603077 delivered
>         36475854 datagrams output

Here's my netstat output (QuakeWorld server, 20 players, P200/MMX
machine, avg 15-20 players from 9am-3am)

 9:14AM  up 5 days, 15:49, 12 users, load averages: 0.76, 0.60, 0.48

udp:
        166078807 datagrams received
        0 with incomplete header
        134 with bad data length field
        1753 with bad checksum
        130043 dropped due to no socket
        36529 broadcast/multicast datagrams dropped due to no socket
>>      396138 dropped due to full socket buffers
        0 not for hashed pcb
        165514210 delivered
        124239423 datagrams output

So that's .2 % packet loss due to full buffers on my machine, which is
pegged at 100% cpu when all 20 players are on.  You lose more packets
just from lossage over the Net.

Hm. I notice that your #received is twice your #output.  QuakeWorld (at
least) does approximately the same traffic in and out for each player. 
Do you have any other UDP traffic on this box?

> Now I have my sysctl variables set up like so:
>
> net.inet.udp.checksum: 1
> net.inet.udp.maxdgram: 9216
> net.inet.udp.recvspace: 246723

I'm still using the default net.inet.udp.recvspace=41600.  What you
might want to do is log the "full socket buffers" count every 5 minutes
or so and verify whether the count increases slowly over the entire day
or in spurts.  Maybe something other than your server is causing it. 
I'm putting my money on /etc/periodic/daily/* :)

	-Dan Nelson
	dnelson@emsphone.com


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?19990226092445.A37611>