linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Oleksandr Natalenko <oleksandr@natalenko.name>
To: timofey.titovets@synesis.ru
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, nefelim4ag@gmail.com, willy@infradead.org
Subject: Re: [PATCH V3] KSM: allow dedup all tasks memory
Date: Tue, 13 Nov 2018 12:06:03 +0100	[thread overview]
Message-ID: <b4c41073d763dc5798562233de8eaa6d@natalenko.name> (raw)
In-Reply-To: <<20181112231344.7161-1-timofey.titovets@synesis.ru>>

Hi.

> ksm by default working only on memory that added by
> madvise().
> 
> And only way get that work on other applications:
>   * Use LD_PRELOAD and libraries
>   * Patch kernel
> 
> Lets use kernel task list and add logic to import VMAs from tasks.
> 
> That behaviour controlled by new attributes:
>   * mode:
>     I try mimic hugepages attribute, so mode have two states:
>       * madvise      - old default behaviour
>       * always [new] - allow ksm to get tasks vma and
>                        try working on that.
>   * seeker_sleep_millisecs:
>     Add pauses between imports tasks VMA
> 
> For rate limiting proporses and tasklist locking time,
> ksm seeker thread only import VMAs from one task per loop.
> 
> Some numbers from different not madvised workloads.
> Formulas:
>   Percentage ratio = (pages_sharing - pages_shared)/pages_unshared
>   Memory saved = (pages_sharing - pages_shared)*4/1024 MiB
>   Memory used = free -h
> 
>   * Name: My working laptop
>     Description: Many different chrome/electron apps + KDE
>     Ratio: 5%
>     Saved: ~100  MiB
>     Used:  ~2000 MiB
> 
>   * Name: K8s test VM
>     Description: Some small random running docker images
>     Ratio: 40%
>     Saved: ~160 MiB
>     Used:  ~920 MiB
> 
>   * Name: Ceph test VM
>     Description: Ceph Mon/OSD, some containers
>     Ratio: 20%
>     Saved: ~60 MiB
>     Used:  ~600 MiB
> 
>   * Name: BareMetal K8s backend server
>     Description: Different server apps in containers C, Java, GO & etc
>     Ratio: 72%
>     Saved: ~5800 MiB
>     Used:  ~35.7 GiB
> 
>   * Name: BareMetal K8s processing server
>     Description: Many instance of one CPU intensive application
>     Ratio: 55%
>     Saved: ~2600 MiB
>     Used:  ~28.0 GiB
> 
>   * Name: BareMetal Ceph node
>     Description: Only OSD storage daemons running
>     Raio: 2%
>     Saved: ~190 MiB
>     Used:  ~11.7 GiB

Out of curiosity, have you compared these results with UKSM [1]?

Thanks.

-- 
   Oleksandr Natalenko (post-factum)

[1] https://github.com/dolohow/uksm

       reply	other threads:[~2018-11-13 11:06 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<20181112231344.7161-1-timofey.titovets@synesis.ru>
2018-11-13 11:06 ` Oleksandr Natalenko [this message]
2018-11-13 11:56   ` [PATCH V3] KSM: allow dedup all tasks memory Timofey Titovets
2018-11-13 16:33 ` Oleksandr Natalenko
2018-11-13 17:10   ` Timofey Titovets
2018-11-13 17:27     ` Oleksandr Natalenko
2018-11-13 17:44       ` Timofey Titovets
2018-11-13 18:20 Timofey Titovets
     [not found] <<CAG48ez0ZprqUYGZFxcrY6U3Dnwt77q1NJXzzpsn1XNkRuXVppw@mail.gmail.com>
2018-11-13 14:23 ` Oleksandr Natalenko
2018-11-13 17:59   ` Pavel Tatashin
2018-11-13 18:17     ` Timofey Titovets
2018-11-13 18:35       ` Pavel Tatashin
2018-11-13 18:54         ` Timofey Titovets
2018-11-13 19:16           ` Pavel Tatashin
2018-11-13 22:40             ` Timofey Titovets
2018-11-13 22:53               ` Pavel Tatashin
2018-11-13 23:07                 ` Timofey Titovets
2018-11-13 20:26     ` Jann Horn
2018-11-13 22:35       ` Pavel Tatashin
  -- strict thread matches above, loose matches on Subject: below --
2018-11-12 23:13 Timofey Titovets
2018-11-13  1:49 ` Matthew Wilcox
2018-11-13 11:25   ` Timofey Titovets
2018-11-13  2:25 ` Pavel Tatashin
2018-11-13 11:40   ` Timofey Titovets
2018-11-13 18:42     ` Pavel Tatashin
2018-11-13 22:55       ` Timofey Titovets
2018-11-13 11:57 ` Jann Horn
2018-11-13 12:58   ` Timofey Titovets
2018-11-13 13:25     ` Jann Horn

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=b4c41073d763dc5798562233de8eaa6d@natalenko.name \
    --to=oleksandr@natalenko.name \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nefelim4ag@gmail.com \
    --cc=timofey.titovets@synesis.ru \
    --cc=willy@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).