Home

Advertisement

Customize
Mike Fedyk - May 15th, 2007

May 15th, 2007

May 15th, 2007
06:06 pm

[Link]

Linux Disk accounting with LVM Snapshots
I was reading a lot of data from one LVM logical volume and wanted to watch the disk statistics with iostat today. To my surprise, I was seeing the same activity on two logical volumes (LV) and the physical disk containing the two.

A little investigation showed that one LV was a snapshot of the other, and I was reading from one of the snapshots.

While I understand that the two LVs share some common Logical Extents (LE), I believe it is a bug that the disk statistics show activity on both logical volumes.

Should I report this in the centos bugzilla or on upstream's bts?

Thanks,

Mike Fedyk

http://lists.centos.org/pipermail/centos/2007-May/081227.html

Tags: , ,

(Leave a comment)

TimeEvent
06:22 pm

[Link]

Xen or VMware or OpenVZ?
Of course openVZ is not mutually exclusive with either Xen or VMware.  They can be used together, but that is not the purpose of this post...

I found an interesting link to a forum post on the centos mailing list talking about OpenVZ today.

It says that once the memory limits are reached in an OpenVZ Virtual Environment (VE) it kills the process that hit the limit. 

<speculation>I suspect (since I haven't researched and found the details yet) that after reaching the memory limit in a VE, OpenVZ simply refuses allocating memory when processes request more memory.  That can be bad because a lot of apps don't handle this very well and die.  You would see this also if you simply limited the memory allowed to a process group or user.</speculation>

What happens differently when a virtualized kernel (like in Xen or VMware) hits its physical memory limit is that it starts using swap and if swap is full or unavailable[1] it will discard as many memory pages as possible, disk cache, exeutables mmmap()ed, etc.  This can allow more memory to be allocated, though with a serious drop in performance.

But the kernel tries hard to satisfy the allocation before refusing.

If my speculation above is correct and OpenVZ hasn't made any modifications to the linux Virtual Memory Manager so it will simulate "memory pressure" in each VE independently, then OpenVZ (and presumably the generic Linux resource limits code) will simply reach the limit and refuse further allocations without trying hard to find space for allocations and have serious problems with applications that don't handle memory allocation failures properly (that would be most programs).

This needs to be looked into further...

1. Some people have gotten into the habbit of configuring systems without swap.  This mostly started because of the terrible VMM in the early 2.4.x kernel series.  If you're running a kernel from kernel.org after 2.4.16 or any distro kernel, you should configure swap space on your system(s).

Tags: , , , , ,

(Leave a comment)

Previous Day 2007/05/15
[Archive]
Next Day
Powered by LiveJournal.com

Advertisement

Customize