FastNetMon

Showing posts with label vzfs. Show all posts
Showing posts with label vzfs. Show all posts

Friday, 23 April 2010

Описание vzfs от Кирилла Колышкина

ML: I've often heard that Virtuozzo scales even better and allows for even higher VPS/VE density than OpenVZ. Why is this true and what feature differences between OpenVZ and Virtuozzo account for this?

Kir: There is a VZFS filesystem in Virtuozzo but not in OpenVZ. It is similar to unionfs or aufs, the idea here is to make a single copy of files for applications, binaries, libraries and data. If there is a single copy of such files on disk for different VEs, there will be a single copy in memory holding the read-only code and data. It helps to save some memory and thus increase running VE density a bit -- but only the in cases where all (or most of) the VEs are identical (i.e. have the exactly same versions of programs installed).

So, VZFS is not a silver bullet and it comes with a price -- not conforming to POSIX by adding an ability to have additional permission and ownership attributes for symlinks. Because of that Virtuozzo ships with its own modified versions of tar, cpio, rpm, and deb which are patched to understand the added filesystem semantics. Besides, it complicates template tools. We do not want that sort of complexity in OpenVZ.


(с) http://www.montanalinux.org/openvz-kir-interview.html

Как работает vzfs в Virtuozzo?

http://forum.openvz.org/index.php?&t=msg&goto=89

I suppose I eat my words on this, it does seem to share the same inode.

Then I can only help that vm.swappiness can help my systems.

# ls -ali /vz/private/1/root/etc/inittab /vz/root/1/etc/inittab
451387465 -rw-r--r-- 1 root root 1456 Sep 2 16:31 /vz/private/1/root/etc/inittab
451387465 -rw-r--r-- 1 root root 1456 Sep 2 16:31 /vz/root/1/etc/inittab
Matt Ayres
TekTonic


Инфми словами, vzfs - это прослойка, позволяющая вариант "несколько файлов разделяют один inode". Формально, по тому же принципу работают hard links.

Нечто аналогичное можно провернуть вот так:

touch file1
ln file1 file1_alias
ln file1 file1_alias_two


И, вуаля:
ls -li
total 0
50801725 -rw-rw-r-- 3 rpmbuild rpmbuild 0 Apr 23 04:07 file1
50801725 -rw-rw-r-- 3 rpmbuild rpmbuild 0 Apr 23 04:07 file1_alias
50801725 -rw-rw-r-- 3 rpmbuild rpmbuild 0 Apr 23 04:07 file1_alias_two


Но до vzfs не хватает одной мелкой фичи :)