On Tue, Feb 19, 2002 at 07:24:09PM +0100, Marcel de Vries wrote: > After 4 hours of pinging and listening to a shoutcast stream natd rised to > his state of eating 34% proctime (top) > Connection timed out, did a restart of mpd and everything is running normal > agian.
somewhat unrelated, but... why are you using both mpd and natd ? wouldn't mpd do the address translation same as ppp does ? Anyways the performance problem could be easily explained by a poor implementation of the session lookup in libalias -- e.g. resulting in heavy scanning of long lists for each received packet, or things like that. >From the (almost non-existent) comments in the libalias code it is not immediate to understand what is the underlying data structure -- maybe a hash table followed by lists -- nor if there are variables that one could monitor to see how the lookup strategy works (e.g. number of entries, average depth of the lists, etc. > > - i'm not an expert but truss, strace and grof show that most of the time > >is spent in sendto() ... This is probably related to a problem in natd which was fixed by Ruslan not long ago in current, and did not make it in RELENG_4_5 (it is in -stable though). The bug was that natd looped around a select which would always return the socket as writable, and it would keep retrying a sendto() until successful. The fix is to drop the packet when sendto fails, and rely on retransmissions instead. cheers luigi To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-net" in the body of the message