From: Daniel Stodden <daniel.stodden@citrix.com>
To: Linux LVM <linux-lvm@redhat.com>
Subject: [linux-lvm] vgchange -a memory consumption
Date: Fri, 11 Jul 2008 22:57:31 -0700 [thread overview]
Message-ID: <1215842251.3751.53.camel@desktop> (raw)
Hi.
I'm running, lvm2-2.02.26.
Found that vgchange -a y/n generates remarkable memory consumption on
volumes with larger numbers of small volumes.
Tried on a VG with 1024 LVs of 8MB each. Interestingly, the type of
operation does not seem to matter much. Notably, deactivating an already
unavailable volume group generates similarly high pressure than actually
activating it.
Looking at the code, I've got only gained a partial understanding where
the memory is exactly spent -- and for what. So much I believe I do
understand, maybe someone can enlighten me:
Iterating through all the volumes pushes the data segment up by about
750k -- per iteration. That memory allocated per volume never seems to
get freed.
So, together with the memory locking performed in lock_vol, it's only a
matter of installed RAM and volume numbers when the OOM killer will kick
in.
_vg_read() seems to play a role. Apparently replayed twice for each LV
(once for lock, then for unlock).
To a rather outside observer like me, the path taken to get there seems
rather strange. The LV is handed over as a UUID string to lock_vol().
In the '-an' case, this is handed over to lv_deactivate, which will
(re-)load both the VG and LV metadata in order to get the respective
lvinfo struct.
So what I don't really get is:
Why is that data reread? Especially the VG metadata. Or am I missing
something. Second: why isn't that memory freed after returning from
activate_lv?
But most importantly: Could this be fixed?
Best,
Daniel
next reply other threads:[~2008-07-12 5:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-12 5:57 Daniel Stodden [this message]
2008-07-12 16:51 ` [linux-lvm] vgchange -a memory consumption Alasdair G Kergon
2008-07-15 6:19 ` Daniel Stodden
2008-07-16 16:48 ` [PATCH] " Daniel Stodden
[not found] ` <20080716165243.GM7155@agk.fab.redhat.com>
[not found] ` <1216228176.1130.13.camel@desktop>
[not found] ` <20080716174240.GN7155@agk.fab.redhat.com>
[not found] ` <1216231344.16876.25.camel@desktop>
2008-07-16 18:08 ` Daniel Stodden
2008-07-16 20:39 ` [PATCH2] " Daniel Stodden
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=1215842251.3751.53.camel@desktop \
--to=daniel.stodden@citrix.com \
--cc=linux-lvm@redhat.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