From owner-freebsd-current@FreeBSD.ORG Mon Jun 2 23:34:09 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21B12EE6 for ; Mon, 2 Jun 2014 23:34:09 +0000 (UTC) Received: from COL004-OMC2S7.hotmail.com (col004-omc2s7.hotmail.com [65.55.34.81]) (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (Client CN "*.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F0CAB20FB for ; Mon, 2 Jun 2014 23:34:08 +0000 (UTC) Received: from COL131-DS2 ([65.55.34.73]) by COL004-OMC2S7.hotmail.com with Microsoft SMTPSVC(7.5.7601.22701); Mon, 2 Jun 2014 16:34:08 -0700 X-TMN: [9yM1yDi/NipuGH3Ctg5IsitI8SitqZlU] X-Originating-Email: [fredhps10@hotmail.com] Message-ID: From: Fred Pedrisa To: "'Luigi Rizzo'" References: <042901cf7dc0$f1cdc160$d5694420$@iet.unipi.it> In-Reply-To: Subject: RES: Select() vs Netmap Date: Mon, 2 Jun 2014 20:34:09 -0300 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQEVS5nwCd6wgWjUB5XCxMef2bsPZAGABGnIAW9wi5Gcu2M/UA== Content-Language: pt-br X-OriginalArrivalTime: 02 Jun 2014 23:34:08.0028 (UTC) FILETIME=[261A5DC0:01CF7EBB] Cc: 'freebsd-current' X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2014 23:34:09 -0000 Hello, The code is built in the top of kipfw code, even if you remove the call to the 'ipfw packet parser' and leave only the loop there to forward the packets from one port to another, the problem also happens :) Sincerely, Fred Pedrisa -----Mensagem original----- De: Fred Pedrisa [mailto:fredhps10@hotmail.com] Enviada em: domingo, 1 de junho de 2014 15:16 Para: 'Luigi Rizzo' Cc: 'freebsd-current' Assunto: RES: Select() vs Netmap Hello, This is 1.4 Mpps (1.400.000 pps). There is a mix of src addresses, but one single dst address. Is there a way to disable rss maybe to check what happens ? -----Mensagem original----- De: owner-freebsd-current@freebsd.org [mailto:owner-freebsd-current@freebsd.org] Em nome de Luigi Rizzo Enviada em: domingo, 1 de junho de 2014 14:41 Para: Fred Pedrisa Cc: freebsd-current Assunto: Select() vs Netmap On Sunday, June 1, 2014, Fred Pedrisa > wrote: > Hey, guys. > > > > > > I'm currently experiencing a strange issue in my program (Using netmap). > > > > Sometimes, when I call select() in a FD, it gets like 4~8 packets per > event, however suddenly it drops to 1~2 packets per event, losing a > lot of performance and increasing the number of select calls necessary > to poll the NIC for new packets. > > > > Is there any type of tweak I can do, to make this behavior becomes > linear and sustain the performance in such case without these oscillations ? > > > > The behavior happens under the same stressing circumstances, around > 1.4 Mpps~ (64 byte packets). Is that one-point-four or fourteen? The firmer should be sustainable even with short batches. In any case apart from tweaking the interrupt moderation parameters in the device drivers, I'd check carefully the logic in your program and try to record a log of your activity. Average values rarely tell the full story of what is happening. see why you are srving small batches. One more thing, I think you use multuqueue, but no idea what kind of input traffic - whether it is all for the same destination or you have a mix of DST addresses. In the latter case, one thing to check is whether, on a restart of the program, the driver changes the hash key in the RSS filter. This might cause an imbalance in the traffic delivered to the queues. Cheers Luigi > > > > > Sincerely, > > > > Fred > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > -- -----------------------------------------+------------------------------ -----------------------------------------+- Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL +39-050-2211611 . via Diotisalvi 2 Mobile +39-338-6809875 . 56122 PISA (Italy) -----------------------------------------+------------------------------ -----------------------------------------+- _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"