All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Kernel Mailing List <linux-kernel@vger.kernel.org>,
	kvm-devel <kvm@vger.kernel.org>
Subject: KSM & hugepages
Date: Tue, 23 Mar 2010 14:32:42 +0300	[thread overview]
Message-ID: <4BA8A6DA.1000408@msgid.tls.msk.ru> (raw)

Hello.

I noticed an interesting thing here, with qemu-kvm, KSM and
hugepages.

When I initially enabled KSM, for my two windows guests I've
seen ~100 000 pages in /sys/kernel/mm/ksm/pages_shared .
That's quite good, and overall memory usage improved.

Now, I also enabled hugepages in kvm, which speed things
up quite significantly (the speedup is noticeable).

But now, when both KSM and hugepages are activated, I don't
see KSM in action anymore.  /sys/../mm/pages_shared shows
56 pages, which is nothing.

So I wonder what's up:
 o that's 56 _huge_ pages (which means the actual saving
   is 56*2M = 112Mb, which isn't really bad).  If that's
   the case, /sys/../mm/ interface lacks proper units
   reporting;
 o due to large pages there's much less chance to find
   two pages with identical contents, so very little can
   be shared;
 o KSM does not scan hugepages at all
 o something else.

What is the issue here?

Thanks!

/mjt

             reply	other threads:[~2010-03-23 11:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-23 11:32 Michael Tokarev [this message]
2010-03-23 13:07 ` KSM & hugepages Avi Kivity

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=4BA8A6DA.1000408@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.