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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id EAD9FCDB474 for ; Tue, 17 Oct 2023 15:28:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 588AA8000E; Tue, 17 Oct 2023 11:28:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5394F80009; Tue, 17 Oct 2023 11:28:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3D8F28000E; Tue, 17 Oct 2023 11:28:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 2EFC280009 for ; Tue, 17 Oct 2023 11:28:45 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id ECE86C0D5D for ; Tue, 17 Oct 2023 15:28:44 +0000 (UTC) X-FDA: 81355335768.27.6F9FC77 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf04.hostedemail.com (Postfix) with ESMTP id 9F1A740026 for ; Tue, 17 Oct 2023 15:28:41 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=W1bbhore; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf04.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1697556521; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=qlqZzEBQcDLAx/rtfamhIzSQPRrDgfFEkwqu0MvOCiE=; b=C5//GzdcGtfgsrpSYsDDJBhgmOhbuRCMIuNTit3dnFeiIeI15XxHq/g2gXzNXR65PT+56O K7f7AI1w3odENqB3/rztrbAYFYKO/52PMQBjsfk9fOUzYZ1zH3meFwf8IlJMlf6Ur1Pusy cP6ySHtamuyS/fTfiLsP74cSqlAqMz8= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=W1bbhore; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf04.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1697556521; a=rsa-sha256; cv=none; b=fT05Udm+uqUhvhXWA0PSx3UGFBE/hYr/qNj60Hi+AEeFoZPY9rKL0e4M1mkitoDfbafqVC u4v7K7Yg02f/ymc1ZHqAmsxds0gQdIM9sNXsG+iLdONFWJUVQjmOkkEV1SyZpS7b5+shE1 /EGGvwM9NB7BVm3k5+kXPePyr/1z7eY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697556520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=qlqZzEBQcDLAx/rtfamhIzSQPRrDgfFEkwqu0MvOCiE=; b=W1bbhore4f/IywY770Vh1yw2ZAtzClTAciS5rZrOTCBPIyKL/9aXnT6NydBpPHazmCXtQr SAdpTRQqfy96SSdpPnGm7XAwRlOmo1O99Eh9rhiHuqL8oN7In4FQ+QpWGmtk9+8zWMOQmd jGYm1kvKVEFyycagbkUQ11CxRj2+Mhw= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-616-3wKoJ0FvNXqndTZjbhr-xA-1; Tue, 17 Oct 2023 11:28:38 -0400 X-MC-Unique: 3wKoJ0FvNXqndTZjbhr-xA-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-32d33e3aea5so3908370f8f.0 for ; Tue, 17 Oct 2023 08:28:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697556517; x=1698161317; h=content-transfer-encoding:in-reply-to:organization:autocrypt:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=qlqZzEBQcDLAx/rtfamhIzSQPRrDgfFEkwqu0MvOCiE=; b=VMzDh8AzutwutqiNz+zvbDwqstMLYYpF7L/TyA0v6cjP7wIkMBBP1vzUuAmNK7nHmF Ji93o3vA2Zz06FsQ/PBZhYF5IeRkeUoG6KlRB0RnQKIq+GraEM8hH24neYY74RUEwlTe FiSJBbqOzVHvO0UOqcCDIm3uSF1twptkpetxGyIzXYFjJgu0z/sijuZR77ogMkZlEczE 30CBuVwhuQ01s9/Y1NMGca+dtDii8iRJSeUjPJfh15N7fPnJa/Dz7mS11ga0ekC0eGhO u2O0U9at5YITZ0vYpHDP6sy76UI5lX4MbYME0ct1bdOHtXiG8jR2T3nfpYvN6+rIp4yq KafA== X-Gm-Message-State: AOJu0Yw0JwX7j1XLviOghSgyBgRMrrTKAVy5GvOlaupJTYcoOex36MMj 2OLOscrbBSzzxRle7tZIyA2UXPfdNMLKKtwXu6yVXUooLqRSErCBGLW7nAFUX/iWt3rLckcpOEb rUNCgj3tV1W4= X-Received: by 2002:a5d:4e01:0:b0:32d:9a88:e36 with SMTP id p1-20020a5d4e01000000b0032d9a880e36mr2211324wrt.2.1697556517151; Tue, 17 Oct 2023 08:28:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHcNlz0Yxv/DaxmarSq6osIBb3CJ6KzZbsTbAg+Cqro781ION6NzFOhs3bNhGXAUlUxANIRvw== X-Received: by 2002:a5d:4e01:0:b0:32d:9a88:e36 with SMTP id p1-20020a5d4e01000000b0032d9a880e36mr2211306wrt.2.1697556516722; Tue, 17 Oct 2023 08:28:36 -0700 (PDT) Received: from ?IPV6:2003:cb:c743:5100:93b1:f654:ad11:cd81? (p200300cbc743510093b1f654ad11cd81.dip0.t-ipconnect.de. [2003:cb:c743:5100:93b1:f654:ad11:cd81]) by smtp.gmail.com with ESMTPSA id l11-20020adff48b000000b0032dbf32bd56sm16995wro.37.2023.10.17.08.28.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Oct 2023 08:28:36 -0700 (PDT) Message-ID: <60eb2c69-8644-45de-9499-a57dc6dbab61@redhat.com> Date: Tue, 17 Oct 2023 17:28:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 0/4] mm/ksm: Add ksm advisor To: Stefan Roesch Cc: kernel-team@fb.com, akpm@linux-foundation.org, hannes@cmpxchg.org, riel@surriel.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <20231004190249.829015-1-shr@devkernel.io> <4509a3b4-16a6-f63e-1dd5-e20c7eadf87d@redhat.com> <87fs2nhg14.fsf@devkernel.io> <87bkd61n12.fsf@devkernel.io> From: David Hildenbrand Autocrypt: addr=david@redhat.com; keydata= xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp XNeiN4QroO+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yVRxDcDHIlmguXjC1Q5tZTwNB boaBTPHSy/Nksu0eY7x6HfQJ3xajVH32Ms6t1trDQmPx2iP5+7iDsb7OKAb5eOS8h+BEBDeq 3ecsQDv0fFJOA9ag5O3LLNk+3x3q7e0uo06XMaY7UHS341ozXUUI7wC7iKfoUTv03iO9El5f XpNMx/YrIMduZ2+nd9Di7o5+KIwlb2mAB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6 3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8 kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt WNyWQQ== Organization: Red Hat In-Reply-To: <87bkd61n12.fsf@devkernel.io> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 9F1A740026 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: cm7ayfhzjk8txsznfta4c6iwaoqxqga3 X-HE-Tag: 1697556521-977013 X-HE-Meta: U2FsdGVkX19F3ItbJIYJlZ5/6Aake2M3snkVhJRvYwyDMKo/w99uDsG5lKpBmgGcQgGfj1bz1Cj/BN55bxgt4g5J9rydetxLc1UnDhvLRRnn2iYhyJt/qsqT7lk1U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EySU9sHKiuxnbKAB2qHqHaorM3cgtaEAvYjjHPZHRQreifaBuNsY/tR5bNYg4xvkfbkvKXKtd7cDMxReDtPlTX3kQTVT7OSoroWkFj0mx07IcbM7LmgW1Ti70iZTZ+Lk5fW20MVU5lBbEOaLt/aPd383n7SgUv3HuYDlks7G03ECZjPhnNfCHr6sbfDu0h2QMjadRatZTdkTzEEgoBnft6kuJ6iELdp0+zf X-Bogosity: Ham, tests=bogofilter, spamicity=0.000053, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 10.10.23 18:02, Stefan Roesch wrote: > > David Hildenbrand writes: > >> On 06.10.23 18:17, Stefan Roesch wrote: >>> David Hildenbrand writes: >>> >>>> On 04.10.23 21:02, Stefan Roesch wrote: >>>>> What is the KSM advisor? >>>>> ========================= >>>>> The ksm advisor automatically manages the pages_to_scan setting to >>>>> achieve a target scan time. The target scan time defines how many seconds >>>>> it should take to scan all the candidate KSM pages. In other words the >>>>> pages_to_scan rate is changed by the advisor to achieve the target scan >>>>> time. >>>>> Why do we need a KSM advisor? >>>>> ============================== >>>>> The number of candidate pages for KSM is dynamic. It can often be observed >>>>> that during the startup of an application more candidate pages need to be >>>>> processed. Without an advisor the pages_to_scan parameter needs to be >>>>> sized for the maximum number of candidate pages. With the scan time >>>>> advisor the pages_to_scan parameter based can be changed based on demand. >>>>> Algorithm >>>>> ========== >>>>> The algorithm calculates the change value based on the target scan time >>>>> and the previous scan time. To avoid pertubations an exponentially >>>>> weighted moving average is applied. >>>>> The algorithm has a max and min >>>>> value to: >>>>> - guarantee responsiveness to changes >>>>> - to avoid to spend too much CPU >>>>> Parameters to influence the KSM scan advisor >>>>> ============================================= >>>>> The respective parameters are: >>>>> - ksm_advisor_mode >>>>> 0: None (default), 1: scan time advisor >>>>> - ksm_advisor_target_scan_time >>>>> how many seconds a scan should of all candidate pages take >>>>> - ksm_advisor_min_pages >>>>> minimum value for pages_to_scan per batch >>>>> - ksm_advisor_max_pages >>>>> maximum value for pages_to_scan per batch >>>>> The parameters are exposed as knobs in /sys/kernel/mm/ksm. >>>>> By default the scan time advisor is disabled. >>>> >>>> What would be the main reason to not have this enabled as default? >>>> >>> There might be already exisiting users which directly set pages_to_scan >>> and tuned the KSM settings accordingly, as the default setting of 100 for >>> pages_to_scan is too low for typical workloads. >> >> Good point. >> >>> >>>> IIUC, it is kind-of an auto-tuning of pages_to_scan. Would "auto-tuning" >>>> describe it better than "advisor" ? >>>> >>>> [...] >>>> >>> I'm fine with auto-tune. I was also thinking about that name, but I >>> chose advisor, its a bit less strong and it needs input from the user. >>> >> >> I'm not a native speaker, but "adviser" to me implies that no action is taken, >> only advises are given :) But again, no native speaker. >> >>>>> How is defining a target scan time better? >>>>> =========================================== >>>>> For an administrator it is more logical to set a target scan time.. The >>>>> administrator can determine how many pages are scanned on each scan. >>>>> Therefore setting a target scan time makes more sense. >>>>> In addition the administrator might have a good idea about the >>>>> memory sizing of its respective workloads. >>>> >>>> Is there any way you could imagine where we could have this just do something >>>> reasonable without any user input? IOW, true auto-tuning? >>>> >>> True auto-tuning might be difficult as users might want to be able to >>> choose how aggressive KSM is. Some might want it to be as aggressive as >>> possible to get the maximum de-duplication rate. Others might want a >>> more balanced approach that takes CPU-consumption into consideration. >>> I guess it depends if you are memory-bound, cpu-bound or both. >> >> Agreed, more below. >> >>> >>>> I read above: >>>>> - guarantee responsiveness to changes >>>>> - to avoid to spend too much CPU >>>> >>>> whereby both things are accountable/measurable to use that as the input for >>>> auto-tuning? >>>> >>> I'm not sure a true auto-tuning can be achieved. I think we need >>> some input from the user >>> - How much resources to consume >>> - How fast memory changes or how stable memory is >>> (this we might be able to detect) >> >> Setting the pages_to_scan is a bit mystical. Setting upper/lower pages_to_scan >> bounds is similarly mystical, and highly workload dependent. >> >> So I agree that a better abstraction to automatically tune the scanning is >> reasonable. I wonder if we can let the user give better inputs that are less >> workload dependent. >> >> For example, do we need min/max values for pages_to_scan, or can we replace it >> by something better to the auto-tuning algorithm? >> >> IMHO "target scan time" goes into the right direction, but it can still be >> fairly workload dependent. Maybe a "max CPU consumption" or sth. like that would >> similarly help to limit CPU waste, and it could be fairly workload dependent. > > I can look into replacing min/max values for pages_to_scan with min/max > cpu utilization. This might be easier for users to decide on. However I > still think that we need a target value like scan time to optimize for. Agreed, it can't be completely automatic. -- Cheers, David / dhildenb