From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw0-f174.google.com (mail-yw0-f174.google.com [209.85.161.174]) by dpdk.org (Postfix) with ESMTP id 544DF1075 for ; Thu, 16 Mar 2017 14:33:09 +0100 (CET) Received: by mail-yw0-f174.google.com with SMTP id v198so31368881ywc.2 for ; Thu, 16 Mar 2017 06:33:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:from:date:message-id:subject:to; bh=xJACShvqhiVA7siDMVgSjtSr40HkY6J7E2B/At5NJIA=; b=BkexDZp1OdyxPUMLDrdqNOU8WDgxe+qVTHVe00V2zNOdMRFO87JRh8zdlgP62Vv5FJ fsjKQxE3WK1U7hnueqnr9zjVJXfQiLU2wv54759TFUpDO2vwEuMhSXYGYes9LvbZFj/t Qyi1FMR/lp9qxwSI3tPMgYrPzfCQA+lVe7m5GFBW1GHGMAsVI7qoLbkMelKjFn9BC749 SHYhGI26Qvy8lOygLmE5fqMnO9OIv8RhwCX8HqpG2aA6+BnXMNl4DeON1SvqM5XQAmfN rhvDqryssyRnUVzlAdquHI1A9VE6EvISmOIEWJH2301nvbh43mI4ZwpQMJ+uMiTN0hML R6bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=xJACShvqhiVA7siDMVgSjtSr40HkY6J7E2B/At5NJIA=; b=tefVTiQWgAW0uaDnGMTl6vBRZBVBivX0JAPcN4X7FAuNtsk6MhXxEBJN0jMYOgjWnh EhVt9CC+oEV4Et0CyN0jTRQ4nrM289kLLV/rOrNrDIwHdixp2WIA7qiFkfslNkpSm9Ws AYChPC1HJ/fczmUOmfncsxHf9FzY3k8732oGCqlZ7c4iKSIqW27UHjwXuC6KTgcIgi3Z FDGUMjmw43KSUeXp95gloW68GBN+cI2cpyk6fhCYoqoz8CvhsMajd/HfF8Wlpbk/UPaH idfiDUCn4n1aExYdXJp0mcRHQ87+s534DNqj6eNnLIDohJcmEx9xsyfb1kZcClUazm4U D12Q== X-Gm-Message-State: AFeK/H2koUAk4xo01/Zs1Bejg3c5AH/Qa196Jip0F3etNpqEFDPhEEj36UgCg4HV1Jo0/2SqGqZ5hGSq0lWUaA== X-Received: by 10.37.122.70 with SMTP id v67mr1715998ybc.2.1489671187916; Thu, 16 Mar 2017 06:33:07 -0700 (PDT) MIME-Version: 1.0 Sender: castet.j@gmail.com Received: by 10.129.172.91 with HTTP; Thu, 16 Mar 2017 06:33:07 -0700 (PDT) From: Julien Castets Date: Thu, 16 Mar 2017 14:33:07 +0100 X-Google-Sender-Auth: -vqgdYn8HVeONI3UOJ0IeYzVbgc Message-ID: To: users@dpdk.org Content-Type: text/plain; charset=UTF-8 Subject: [dpdk-users] Behavior of pktgen's "rate" option X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 13:33:09 -0000 I'm benchmarking my DPDK application with pktgen and I don't understand how the "rate" parameter works. Let's run pktgen: $> pktgen -l '0-11' --master-lcore=0 -w 03:00.0 -- -f /home/jcastets/test.lua -m '[1].0' (for information, my test.lua is at the bottom of this email) Here, pktgen generates traffic with one core. If I set the pktgen "rate" to "20" and the packet size to "64", I would expect to generate 20% of my NIC's max speed of traffic. In my case with my 40Gbps NIC, I'd expect to generate 8Gbps of traffic. And guess what, my expectations are good since with such configuration, pktgen generates traffic as expected: 8Gbps. However: * If I run pktgen with 2 cores (-m '[1-2].0' instead of -m '[1].0'), pktgen generates 28Gbps. * If I run pktgen with 1 core, keep the "rate" at "20" but set the pktsize at "128", pktgen generates 14Gbps (where I'd expect it to still generate 8Gbps). Can please anyone clarify how the rate/pktsize/cores relation works? ### test.lua pktgen.stop("all"); pktgen.reset("all"); pktgen.clear("all"); pktgen.src_mac("all", "start", "3c:fd:fe:a2:2c:88"); pktgen.dst_mac("all", "start", "3c:fd:fe:a2:2b:b0"); pktgen.src_ip("all", "start", "192.168.1.1"); pktgen.src_ip("all", "min", "0.0.0.0"); pktgen.src_ip("all", "inc", "0.0.0.0"); pktgen.src_ip("all", "max", "0.0.0.0"); pktgen.src_port("all", "start", 1234); pktgen.src_port("all", "min", 1234); pktgen.src_port("all", "inc", 1); pktgen.src_port("all", "max", 4096); pktgen.ip_proto("all", "udp"); pktgen.dst_ip("all", "start", "192.168.100.1"); pktgen.dst_ip("all", "min", "192.168.100.1"); pktgen.dst_ip("all", "inc", "0.0.0.1"); pktgen.dst_ip("all", "max", "192.168.100.99"); pktgen.dst_port("all", "start", 1234); pktgen.dst_port("all", "min", 0); pktgen.dst_port("all", "inc", 0); pktgen.dst_port("all", "max", 0); pktgen.vlan("all", "off"); pktgen.vlan_id("all", "start", 1024); pktgen.vlan_id("all", "min", 1); pktgen.vlan_id("all", "inc", 5); pktgen.vlan_id("all", "max", 3100); pktgen.pkt_size("all", "start", 128); -- this is the parameter I'm trying to adjust pktgen.pkt_size("all", "min", 0); pktgen.pkt_size("all", "inc", 0); pktgen.pkt_size("all", "max", 0); pktgen.set_range("all", "on"); pktgen.set("all", "count", 0); -- count 0 is forever pktgen.set("all", "rate", 20); -- this is the parameter I'm trying to adjust pktgen.start("all"); -- Julien Castets