From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_NEOMUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4ABB2C4360F for ; Wed, 3 Apr 2019 15:10:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 23F232075E for ; Wed, 3 Apr 2019 15:10:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726600AbfDCPKU (ORCPT ); Wed, 3 Apr 2019 11:10:20 -0400 Received: from mail-wr1-f46.google.com ([209.85.221.46]:33401 "EHLO mail-wr1-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725990AbfDCPKT (ORCPT ); Wed, 3 Apr 2019 11:10:19 -0400 Received: by mail-wr1-f46.google.com with SMTP id q1so21885742wrp.0 for ; Wed, 03 Apr 2019 08:10:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=wWl862a9N+V46fpGkmT/KUgkI42puC+0PCr77n1iT0Q=; b=dyMNakSW61MYuRlcqx6U3IJzNL2GZ4T4vqxuglX9PQwpmly0NfGWW7+JtsK6hmF3Fp Md6O6mRfdezMA7uVEOEcwVYyKklNNiaRmuth4ksqpi2KQbx948pautyrhl8upLtIFETy sh+hfWerXkk57CbzJrh4/NKiTdZdSi3j18sxoH+DEK8GIw3EavoSz/YfLZX0AqHHXe4k XRG43XS/kBViI6sdSdjS+vy/p39f8Vgh/m/bABFDjZk7Iy1zDu+S29y3vDER3jMY0s4M lJY1pLEorguUQZtdx1rk3N/ypHK+GSKG+1Vaia2ZFOcKRxPczIbeRvBU7kc8MTHQ78Ea Y7BQ== X-Gm-Message-State: APjAAAV19QiRHsv+X0vbjN9G2lY4xHCywr810edZReQLzudgzNDVBRRq m1bgY3Ak6YchXLOhPj+3pYQHww== X-Google-Smtp-Source: APXvYqylRCj7NvDoVSpkYHEBauEMv3gtomdlUv/Ud4Hp4ccmLWgimZGxWwVBoiTst8eStkaVBqHGAQ== X-Received: by 2002:a5d:4646:: with SMTP id j6mr67262wrs.56.1554304218062; Wed, 03 Apr 2019 08:10:18 -0700 (PDT) Received: from steredhat (host40-210-static.34-79-b.business.telecomitalia.it. [79.34.210.40]) by smtp.gmail.com with ESMTPSA id o4sm33891586wmo.20.2019.04.03.08.10.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 Apr 2019 08:10:17 -0700 (PDT) Date: Wed, 3 Apr 2019 17:10:09 +0200 From: Stefano Garzarella To: Stefan Hajnoczi Cc: alex.bennee@linaro.org, netdev@vger.kernel.org, qemu devel list Subject: Re: [Qemu-devel] VSOCK benchmark and optimizations Message-ID: <20190403151009.vuh34k24ti3wy4rx@steredhat> References: <20190401163240.xw24ezsloy5ds2hz@steredhat> <20190403123438.GE32425@stefanha-x1.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190403123438.GE32425@stefanha-x1.localdomain> User-Agent: NeoMutt/20180716 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Apr 03, 2019 at 01:34:38PM +0100, Stefan Hajnoczi wrote: > On Mon, Apr 01, 2019 at 06:32:40PM +0200, Stefano Garzarella wrote: > > Hi Alex, > > I'm sending you some benchmarks and information about VSOCK CCing qemu-devel > > and linux-netdev (maybe this info could be useful for others :)) > > > > One of the VSOCK advantages is the simple configuration: you don't need to set > > up IP addresses for guest/host, and it can be used with the standard POSIX > > socket API. [1] > > > > I'm currently working on it, so the "optimized" values are still work in > > progress and I'll send the patches upstream (Linux) as soon as possible. > > (I hope in 1 or 2 weeks) > > > > Optimizations: > > + reducing the number of credit update packets > > - RX side sent, on every packet received, an empty packet only to inform the > > TX side about the space in the RX buffer. > > + increase RX buffers size to 64 KB (from 4 KB) > > + merge packets to fill RX buffers > > > > As benchmark tool I used iperf3 [2] modified with VSOCK support: > > > > host -> guest [Gbps] guest -> host [Gbps] > > pkt_size before opt. optimized before opt. optimized > > 1K 0.5 1.6 1.4 1.4 > > This is a "large" small package size. I think 64 bytes is a common > "small" packet size and is worth benchmarking too. > Okay, I'll add more small packet sizes for the benchmark. > > 2K 1.1 3.1 2.3 2.5 > > 4K 2.0 5.6 4.2 4.4 > > 8K 3.2 10.2 7.2 7.5 > > 16K 6.4 14.2 9.4 11.3 > > 32K 9.8 18.9 9.2 17.8 > > 64K 13.8 22.9 8.8 25.0 > > 128K 17.6 24.5 7.7 25.7 > > 256K 19.0 24.8 8.1 25.6 > > 512K 20.8 25.1 8.1 25.4 > > Nice improvements! Thanks :) I'm cleaning the patches, doing step by step benchmarks and I hope I'll send the series upstream in these days. Stefano