public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Lendl <s.lendl@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
	Roland <devzero@web.de>,
	Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH ksm-control-daemon] ksmtuned: fix large number processing
Date: Mon, 08 Apr 2024 14:04:40 +0200	[thread overview]
Message-ID: <878r1o2h7r.fsf@gmail.com> (raw)
In-Reply-To: <a96fab26-8358-41ce-a142-740ba575b7a5@proxmox.com>

Thomas Lamprecht <t.lamprecht@proxmox.com> writes:

> Hi,
>
> Am 28/02/2024 um 23:47 schrieb Roland:
>> any reason why this did not get a response ?  (i do not see rejection of
>> this  ,nor did it appear in
>> https://git.proxmox.com/?p=ksm-control-daemon.git;a=summary )
>
> No reason, but even if this looks pretty straight forward, positive
> feedback would still help to speed this up – did you test this
> successfully? Then I could apply it with a Tested-by: name <email>
> trailer.
>
>> 
>> and, while we are at ksmtuned, i think it's is broken, especially when
>> run on ZFS based installations, as it's totally mis-calculating ram
>> ressources.
>> 
>> https://forum.proxmox.com/threads/ksm-is-needlessly-burning-cpu-because-of-using-vzs-and-ignoring-arcsize.142397/
>
> Yeah KSM could definitively do with some more love, lets see if we can
> allocate some dev time for this.
>
> The RSS (which rsz is an alias for) vs. VSS (vsz aliased) looks
> interesting, and VSS really seems to be the wrong thing to look at to me
> (albeit without deeper inspection of the matter).
>
> FWIW, depending on how the sum is used it might actually make even more
> sense to use PSS, i.e., the proportional set size which better accounts
> for shared memory by dividing that part between all its users, as if
> e.g. 10 QEMU processes have 100 MB of shared code and what not in their
> RSS, using RSS one would sum up 900 MB to much compared using PSS, but
> what's the correct one here is then depending on how they result is
> used.
>
> @Stefan, as you checked this out, would you care checking out the VSS
> vs. RSS vs. PSS matter too? I.e. checking what should make more sense to
> use and actually testing that out in a somewhat defined workload.
>
> The ZFS ARC thing is something else and might be a bit more complicated,
> so I'd focus first one above at that seems to provide better
> improvements for less work, or at least with less potential to build an
> unstable control system.
>
> thanks,
>  Thomas

I agree summing up processes it would make sense to use PSS.
Unfortunately, ps does not report the PSS.

Using VSZ was introduced in cd5cf20 without further explanations.
Upstream is using RSS as well so I though it would be save to use RSS as
well, as it gives a more accurate sum than VSZ.

I will send a new version that includes reverting to RSS.
From the awk printf perspective, I think this should work as is.
We applied the patch on an enterprise customer and no problems where
reported since.

Best regards,
Stefan





  reply	other threads:[~2024-04-08 12:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-25 10:56 Stefan Lendl
     [not found] ` <c3d7bba9-73b0-46b0-ad72-94139afc0559@web.de>
2024-02-29  7:52   ` Thomas Lamprecht
2024-04-08 12:04     ` Stefan Lendl [this message]
2024-04-08 12:22       ` Thomas Lamprecht
2024-04-08 13:02         ` Stefan Lendl
     [not found] ` <6104c230-7e2e-43ae-8598-6c458b979ae1@web.de>
2024-02-29 15:12   ` Stefan Lendl
2024-02-29 15:16   ` Stefan Lendl
     [not found] ` <813667cc-81b6-46db-b144-54ee4cc578f6@web.de>
2024-02-29 15:23   ` Stefan Lendl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878r1o2h7r.fsf@gmail.com \
    --to=s.lendl@proxmox.com \
    --cc=devzero@web.de \
    --cc=pve-devel@lists.proxmox.com \
    --cc=t.lamprecht@proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal