Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1402060rwd; Thu, 8 Jun 2023 18:01:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6+3MJ/ANbMXky7lJ6kn7vMtKRmx1LJZfvg23IJV3Hc2biOWqXKRZ7fhZRkOYpHsUzmBB10 X-Received: by 2002:a05:6a20:258b:b0:10b:dca5:74e5 with SMTP id k11-20020a056a20258b00b0010bdca574e5mr7177952pzd.0.1686272474879; Thu, 08 Jun 2023 18:01:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686272474; cv=none; d=google.com; s=arc-20160816; b=1JNR/xcB9gZ+sdlK5z9sv425SQcp2PLoUakfU2pOAs52eWmuioshDNAS+7Ca3jjO6z uVdnoyazMfjY39W2kGQbwbZx/BcOgPZN/YW/+f8VeDz47+RhTPatastKhgMmeF1tJAWk HHGjRNtPSDBBLKExrDEvr4zvZkDcSGLij5TC6fn80ppA635Gi5BFBBjc/npfmTFLIRpk ny9ZdA9plog072/Ab2kbFfD2igSuFvQ1LnSffQmtJgcITnpCCRUUSx1zXBRbJeq5clXT y6qrOjZX9AIsA/IS27uxMBdhGsuiBXy25Z7FZd+CSq/BmcTh+BH8XCF9DwqRvIRL/JRh H9rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=kfRq4neZrPjb9Lck7talXrCmxVTayuyWN8AeTYnUB40=; b=e8lbA1+I72oI62mok4T+e1yVCY/9Dk+mQ5OfE3Nj9S6ugMETFi8+E0bfJqXC4g24+Y fOSKslNYgRnX3+7OIx2xLkmeOm2768NHDulTUZiOZ2D8a8GygFkZTneEhWYs5tST3iTB aDvReEWyJJCiiaRuvvHXWT/3A6ElLC3/ISRLeE6QTuqStFndLBtGdwLKFqOSjr48dykd tHNVNiqRN8H7qo12rMpu5do/ND62KoP9D8FwOK9c7HhRsyiYcltqDNz9DvVx802vFmmJ wJRzG/fpYKsscWnca+YhUK3KVVkf9QMxA5Gl9W33jFodH0AcL0qykJAEw3bL6IfU3wlz 2KUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=FMN3dhDu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i15-20020a056a00004f00b0063d23b80e00si1537903pfk.392.2023.06.08.18.01.02; Thu, 08 Jun 2023 18:01:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=FMN3dhDu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234442AbjFIBAH (ORCPT + 99 others); Thu, 8 Jun 2023 21:00:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234096AbjFIA7r (ORCPT ); Thu, 8 Jun 2023 20:59:47 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0C6526B9 for ; Thu, 8 Jun 2023 17:59:43 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-bb3cb542875so1738273276.1 for ; Thu, 08 Jun 2023 17:59:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686272383; x=1688864383; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=kfRq4neZrPjb9Lck7talXrCmxVTayuyWN8AeTYnUB40=; b=FMN3dhDuy89W3YL34iGrOcxlPjg1bzMkLLXo1TdyO66RGSvbHlps7gdvHr44ss3LGk MR0VFD1DRCFTNC9tyqK5ReMEOiPx2JNiCbTUTyUv9FMGeK9nCNoAU6WnXWYbBC+Dw27V niwud/7XN7pCGjqFT4B3VS+EBw+uLus4pO0EQ6k6SszjrU1zFcD9yQh/qzHLrmZknfvX XuK4cXbAzi1gsEYKdbrLfMfylLB6JTl2vYXAwWR55yMmpFjT1Lojk1XODC7sstmSmHo4 uXWebCC18fjzj/uapeQiZlzXqVxfdSytOTcShko5dqCAeC6bbLhPv2RLA/d/FJo+pzzy govw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686272383; x=1688864383; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kfRq4neZrPjb9Lck7talXrCmxVTayuyWN8AeTYnUB40=; b=SYW5e2VgPnNsYM+jaG0euyEUTD5I2SiJnLCDw9hDLw7vtM6gwt/0NwFv4+Bz5/IpvI 6a/0GuvI0BfOZOORwyAUloWmAlzTNvlV3z2+W8/ySo4AhQqEokmYT033hNfR5Y52Rk57 TaOFdLPekaMG3NIBBtG1nFYs4JJJjnc0c6Qxzfmw4ArlmZ78hugm62jv1IC8w5px7JJK ot63v9K5nTSjTEONIv19r0gSoxKnhAxLRPWieNFVflf72gUNpwv/GPdIQtoEPoMJGba4 nXHpMzqLmKKiH1+oRweCKXZ3FW4IFGIZ+ORDYmoqRJybDEXVbboiVXdgkSgLYjviSvgJ 71RA== X-Gm-Message-State: AC+VfDy8Q/eXBhiGcr8uMyc0+iX38L6/YRYWjHZP2ZcFVo3W1qBeIYP/ LXVYhXWpWLBDEYmkoXBYVbMzM1hRswQ= X-Received: from yuzhao.bld.corp.google.com ([2620:15c:183:200:f582:c9e5:6c95:4461]) (user=yuzhao job=sendgmr) by 2002:a5b:784:0:b0:bad:99d:f087 with SMTP id b4-20020a5b0784000000b00bad099df087mr697256ybq.6.1686272382836; Thu, 08 Jun 2023 17:59:42 -0700 (PDT) Date: Thu, 8 Jun 2023 18:59:39 -0600 In-Reply-To: <20230526234435.662652-1-yuzhao@google.com> Message-Id: <20230609005940.42722-1-yuzhao@google.com> Mime-Version: 1.0 References: <20230526234435.662652-1-yuzhao@google.com> X-Mailer: git-send-email 2.41.0.162.gfafddb0af9-goog Subject: kvm/powerpc: memcached benchmark From: Yu Zhao To: Andrew Morton , Paolo Bonzini Cc: Alistair Popple , Anup Patel , Ben Gardon , Borislav Petkov , Catalin Marinas , Chao Peng , Christophe Leroy , Dave Hansen , Fabiano Rosas , Gaosheng Cui , Gavin Shan , "H. Peter Anvin" , Ingo Molnar , James Morse , "Jason A. Donenfeld" , Jason Gunthorpe , Jonathan Corbet , Marc Zyngier , Masami Hiramatsu , Michael Ellerman , Michael Larabel , Mike Rapoport , Nicholas Piggin , Oliver Upton , Paul Mackerras , Peter Xu , Sean Christopherson , Steven Rostedt , Suzuki K Poulose , Thomas Gleixner , Thomas Huth , Will Deacon , Zenghui Yu , kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, linux-trace-kernel@vger.kernel.org, x86@kernel.org, linux-mm@google.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org TLDR ==== Memcached achieved 10% more operations per second (in ~4 hours) after this patchset [1]. Hardware ======== HOST $ lscpu Architecture: ppc64le Byte Order: Little Endian CPU(s): 184 On-line CPU(s) list: 0-183 Model name: POWER9 (raw), altivec supported Model: 2.2 (pvr 004e 1202) Thread(s) per core: 4 Core(s) per socket: 23 Socket(s): 2 CPU max MHz: 3000.0000 CPU min MHz: 2300.0000 Caches (sum of all): L1d: 1.4 MiB (46 instances) L1i: 1.4 MiB (46 instances) L2: 12 MiB (24 instances) L3: 240 MiB (24 instances) NUMA: NUMA node(s): 2 NUMA node0 CPU(s): 0-91 NUMA node1 CPU(s): 92-183 Vulnerabilities: Itlb multihit: Not affected L1tf: Mitigation; RFI Flush, L1D private per thread Mds: Not affected Meltdown: Mitigation; RFI Flush, L1D private per thread Mmio stale data: Not affected Retbleed: Not affected Spec store bypass: Mitigation; Kernel entry/exit barrier (eieio) Spectre v1: Mitigation; __user pointer sanitization, ori31 speculation barrier enabled Spectre v2: Mitigation; Indirect branch serialisation (kernel only), Indirect branch cache disabled, Software link stack flush Srbds: Not affected Tsx async abort: Not affected HOST $ numactl -H available: 2 nodes (0-1) node 0 cpus: 0-91 node 0 size: 261659 MB node 0 free: 259152 MB node 1 cpus: 92-183 node 1 size: 261713 MB node 1 free: 261076 MB node distances: node 0 1 0: 10 40 1: 40 10 HOST $ cat /sys/class/nvme/nvme0/model INTEL SSDPF21Q800GB HOST $ cat /sys/class/nvme/nvme0/numa_node 0 Software ======== HOST $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22.04 LTS" HOST $ uname -a Linux ppc 6.3.0 #1 SMP Sun Jun 4 18:26:37 UTC 2023 ppc64le ppc64le ppc64le GNU/Linux HOST $ cat /proc/swaps Filename Type Size Used Priority /dev/nvme0n1p2 partition 466838272 0 -2 HOST $ cat /sys/kernel/mm/lru_gen/enabled 0x0009 HOST $ cat /sys/kernel/mm/transparent_hugepage/enabled always madvise [never] HOST $ cat /sys/kernel/mm/transparent_hugepage/defrag always defer defer+madvise madvise [never] HOST $ qemu-system-ppc64 --version QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-2ubuntu6.6) Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers GUEST $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS" GUEST $ cat /etc/memcached.conf ... -t 92 -m 262144 -B binary -s /var/run/memcached/memcached.sock -a 0766 GUEST $ memtier_benchmark -v memtier_benchmark 1.4.0 Copyright (C) 2011-2022 Redis Ltd. This is free software. You may redistribute copies of it under the terms of the GNU General Public License . There is NO WARRANTY, to the extent permitted by law. Procedure ========= HOST $ sudo numactl -N 0 -m 0 qemu-system-ppc64 \ -M pseries,accel=kvm,kvm-type=HV -cpu host -smp 92 -m 270g -nographic -nic user \ -drive if=virtio,format=raw,file=/dev/nvme0n1p1 GUEST $ memtier_benchmark -S /var/run/memcached/memcached.sock \ -P memcache_binary -c 1 -t 92 --pipeline 1 --ratio 1:0 \ --key-minimum=1 --key-maximum=120000000 --key-pattern=P:P \ -n allkeys -d 2000 GUEST $ memtier_benchmark -S /var/run/memcached/memcached.sock \ -P memcache_binary -c 1 -t 92 --pipeline 1 --ratio 0:1 \ --key-minimum=1 --key-maximum=120000000 --key-pattern=R:R \ -n allkeys --randomize --distinct-client-seed Results ======= Before [1] After Change ------------------------------------------------- Ops/sec 721586.10 800210.12 +10% Avg. Latency 0.12546 0.11260 -10% p50 Latency 0.08700 0.08700 N/C p99 Latency 0.28700 0.24700 -13% Notes ===== [1] "mm: rmap: Don't flush TLB after checking PTE young for page reference" was included so that the comparison is apples to Apples. https://lore.kernel.org/r/20220706112041.3831-1-21cnbao@gmail.com/