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=-2.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT 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 BB5B9C4360F for ; Wed, 3 Apr 2019 12:34:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8901920882 for ; Wed, 3 Apr 2019 12:34:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fSV6wKPF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726372AbfDCMen (ORCPT ); Wed, 3 Apr 2019 08:34:43 -0400 Received: from mail-wm1-f44.google.com ([209.85.128.44]:33441 "EHLO mail-wm1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726078AbfDCMem (ORCPT ); Wed, 3 Apr 2019 08:34:42 -0400 Received: by mail-wm1-f44.google.com with SMTP id z6so4751882wmi.0 for ; Wed, 03 Apr 2019 05:34:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=279irSx7v3ZPmaaKzHSxz8hy0p2B/A3WW0tyTNjW/Xk=; b=fSV6wKPFBG2tiyl5FyJjre/3Cfm2fmX8dsGwAykNi/5CRF8a0qglfqbZo3KTKo169A i9Q3ydQk//FsQDH0n+7As2czwuwkOHk/Bm68TsKXgl7QjGpss2Rkycl21pyENMi7fu9z 5IzjYGXRsvhCnuZFCZ3X08FRQNfe6+GfVHTviuroTMmYlbG8b2cSvodAc+O+NmeGAM2O cIklLyJgr81Zq2eYVEJR7h0NzuVvjWESfEQI5FWUsLf3nNwJEKsADAJvET+pIXz8Kani gV9RYH/5dGLU25wmkPwcUJZh+wGZ11rzULN0f/TSb2lT24G0MQQbb0wfUNeH2zzd3OOK 5FRg== 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=279irSx7v3ZPmaaKzHSxz8hy0p2B/A3WW0tyTNjW/Xk=; b=DN4Vwyo3uk0Ka5bhxQATq77wdxiFxuM8XwTHBUlI/BlHCTSFl7eSsn8ElsY7KlrqpR fw+zTZJeBw6WVZqeLrxT7tacZW7traKG6h6OsY/QMo7VMZGy5nHN8UEOfd+soxId9IFH uhgYPogeDLjftvL5MNCayHG8PnYnSimGV9DoYx6iuEvQxEde/VIFfY6a6GwWEE68ml0s 9RWTL0dV5CsGAcOKxwNxFLroFkMhxEVp6yLXNK++dKaKeSo/M+vvT+QgxU7eq5MLB/M+ W/MhfRtAqqGi1oZBtwraoOr2+GcADWv3nDUv8MDMEs5q+F1LpX/S9fzFd0pD6HdlK5mq BrhQ== X-Gm-Message-State: APjAAAXIBtDVSqjNrkn3GZOTwHU2XXKvKHpWZXPe8+ihfmvB3Y7bm9sC I574LH46IidxV9N+BTeMUpw= X-Google-Smtp-Source: APXvYqyMRo+yYTzdxOCxCyjl0pLfgcX/pZ9e3+ds/+dsrWcT2tKOUzavorZG2r4u9rYwZbE0l97aJA== X-Received: by 2002:a1c:6341:: with SMTP id x62mr31159wmb.11.1554294880381; Wed, 03 Apr 2019 05:34:40 -0700 (PDT) Received: from localhost ([51.15.41.238]) by smtp.gmail.com with ESMTPSA id z1sm12987534wrs.52.2019.04.03.05.34.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 Apr 2019 05:34:39 -0700 (PDT) Date: Wed, 3 Apr 2019 13:34:38 +0100 From: Stefan Hajnoczi To: Stefano Garzarella Cc: alex.bennee@linaro.org, netdev@vger.kernel.org, qemu devel list Subject: Re: [Qemu-devel] VSOCK benchmark and optimizations Message-ID: <20190403123438.GE32425@stefanha-x1.localdomain> References: <20190401163240.xw24ezsloy5ds2hz@steredhat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ffoCPvUAPMgSXi6H" Content-Disposition: inline In-Reply-To: <20190401163240.xw24ezsloy5ds2hz@steredhat> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org --ffoCPvUAPMgSXi6H Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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-de= vel > and linux-netdev (maybe this info could be useful for others :)) >=20 > One of the VSOCK advantages is the simple configuration: you don't need t= o set > up IP addresses for guest/host, and it can be used with the standard POSIX > socket API. [1] >=20 > 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) >=20 > Optimizations: > + reducing the number of credit update packets > - RX side sent, on every packet received, an empty packet only to infor= m 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 >=20 > As benchmark tool I used iperf3 [2] modified with VSOCK support: >=20 > 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. > 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! Stefan --ffoCPvUAPMgSXi6H Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJcpKheAAoJEJykq7OBq3PIOhMH/jn0n/B4SJRqNcVaK9jkIf+F B62z06ZVBmtX1xBExOpb5uCCHv4SSy/lqBRSXWbbOAqnxHDLj8Tua+d4ps2naUEt PzfOaA4+QCmQYjyj4ZHSTgS695U0Q6/SEN64CWNcWF+gzUXVPdMnl3qfwkt5toEn 6kd3fG5Ovo5X+VPuZpQfz004pBizQb9NSKqRbKq0omYROhq+O/m8qr0uvbpivrcA nfJQB65W84BODa8mM4O9zVZFc6Btm7eF7OTIbf7AyaFU7mj00hh+Ls1GoWO0KA4l bCTOyLeOswCpqvxfvC6pr6tXE9KmQdEO7Hk2vyckw9orpyFWQqiLa0Qvp5iFXb0= =tXoU -----END PGP SIGNATURE----- --ffoCPvUAPMgSXi6H--