From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 18 07:41:38 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A372116A4E2 for ; Fri, 18 Aug 2006 07:41:38 +0000 (UTC) (envelope-from martin.eugen@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 861F943D53 for ; Fri, 18 Aug 2006 07:41:37 +0000 (GMT) (envelope-from martin.eugen@gmail.com) Received: by ug-out-1314.google.com with SMTP id m2so842652uge for ; Fri, 18 Aug 2006 00:41:36 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=IuVGOfkcj9NRK5hWDWxis5KpbB7mvWVvqboLM1haaFJyFSo+VgPSPHC/peF3fbB5I2n+Lu/14jq3pnybcW7jYMOy0s+FtFSkUG9v7kcpbQonaRep2ZVwWJJXhLegRHYqPYQh80eyE5dcI0TVtYEMgHN32XvOcgwmCPa37oidNtA= Received: by 10.66.224.19 with SMTP id w19mr1537290ugg; Fri, 18 Aug 2006 00:41:36 -0700 (PDT) Received: by 10.66.251.17 with HTTP; Fri, 18 Aug 2006 00:41:36 -0700 (PDT) Message-ID: <966ba91e0608180041v3cfd9dcfh80ef89aab5404f48@mail.gmail.com> Date: Fri, 18 Aug 2006 10:41:36 +0300 From: "Martin Eugen" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 18 Aug 2006 11:32:03 +0000 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: SOCK_DGRAM optimization needed... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Aug 2006 07:41:38 -0000 Hello there, I have a simple application, that deals with lots of dgram sockets (UDP). Thousands of them. Basically, its purpose is to maintain pairs of sockets and when data is received on one of the sockets it peeks through it (doing some simple statistic calculations) and then forwards it to the other socket. Because of the hudge number of reads and writes (probably about a 10 packets per second per socket pair) it generates a significant load on the system, that I would like to minimize. I'm currently evaluating if it would be possible to add simple 'routing' functionality in the socket layer in the kernel, because frankly I'm not able to think of anything else. Any ideas? Martin P.S. I'm not subscribed to the list so please CC.