From: Tomasz Chmielewski <mangoo@wpkg.org>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] how much memory does LVM need? oom-killer comes
Date: Mon, 03 Sep 2007 11:34:15 +0200 [thread overview]
Message-ID: <46DBD517.80503@wpkg.org> (raw)
In-Reply-To: <46DA886E.3030301@wpkg.org>
Tomasz Chmielewski schrieb:
> Ouch - now it went so far that the machine only loops from a kernel
> panic to a kernel panic - that's really bad:
>
> (...)
> Out of memory: kill process 2220 (getty) score 24 or a child
> Killed process 2220 (getty)
> Kernel panic - not syncing: Out of memory and no killable processes...
>
> Rebooting in 20 seconds..
Again, replying to myself, as no one on this list seem to have a clue
about problems with LVM snapshots... I added RAM, and was able to boot
again.
Below is a quick try to estimate the memory usage of LVM snapshots; I'm
using 2.6.22.6.
The machine has 256 MB RAM.
With these volumes and snapshots, almost 200 MB of memory is used:
# lvs
LV VG Attr LSize Origin Snap% Move Log
Copy%
backup st owi-ao 1.20T
backup-snap st swi-a- 100.00G backup 31.22
backup-snap-resized st swi-a- 30.00G backup 72.73
backup1 st -wi-a- 3.00G
backup1-sync-test st -wi-a- 3.00G
src st -wi-a- 2.00G
swap st -wi-ao 3.00G
# free
total used free shared buffers cached
Mem: 512864 418380 94484 0 216036 5156
-/+ buffers/cache: 197188 315676
After removing a 100 GB snapshot that is over 30% full, we reclaim
almost 100 MB of memory:
# lvremove /dev/st/backup-snap
Do you really want to remove active logical volume "backup-snap"? [y/n]: y
Logical volume "backup-snap" successfully removed
# free
total used free shared buffers cached
Mem: 512864 328668 184196 0 220652 7480
-/+ buffers/cache: 100536 412328
Swap: 3145720 220 3145500
After removing yet another snapshot - 30 GB, over 70% full - we reclaim
70 MB:
# lvremove /dev/st/backup-snap-resized
Do you really want to remove active logical volume
"backup-snap-resized"? [y/n]: y
Logical volume "backup-snap-resized" successfully removed
# free
total used free shared buffers cached
Mem: 512864 335500 177364 0 296444 9436
-/+ buffers/cache: 29620 483244
Swap: 3145720 216 3145504
So, as a rule of thumb, we can say that for each *used* GB of snapshot,
~3 MB of RAM is needed.
--
Tomasz Chmielewski
http://wpkg.org
next prev parent reply other threads:[~2007-09-03 9:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-01 20:13 [linux-lvm] how much memory does LVM need? oom-killer comes Tomasz Chmielewski
2007-09-01 20:22 ` Tomasz Chmielewski
2007-09-02 9:54 ` Tomasz Chmielewski
2007-09-03 9:34 ` Tomasz Chmielewski [this message]
2007-09-03 14:21 ` Stuart D. Gathman
2007-09-03 16:17 ` Tomasz Chmielewski
2007-09-03 16:09 ` Stuart D. Gathman
2007-09-04 9:32 ` Tomasz Chmielewski
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=46DBD517.80503@wpkg.org \
--to=mangoo@wpkg.org \
--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 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.