<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>网络杂谈 &#124; 020i.com &#187; 内存</title>
	<atom:link href="http://www.020i.com/tag/%e5%86%85%e5%ad%98/feed" rel="self" type="application/rss+xml" />
	<link>http://www.020i.com</link>
	<description>做人 做事</description>
	<lastBuildDate>Fri, 03 Feb 2012 15:01:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>如何调整OpenVZ中虚拟机的内存</title>
		<link>http://www.020i.com/2010/blog-post-494.html</link>
		<comments>http://www.020i.com/2010/blog-post-494.html#comments</comments>
		<pubDate>Fri, 26 Feb 2010 07:12:18 +0000</pubDate>
		<dc:creator>jac</dc:creator>
				<category><![CDATA[Daily]]></category>
		<category><![CDATA[My Work]]></category>
		<category><![CDATA[openvz]]></category>
		<category><![CDATA[内存]]></category>
		<category><![CDATA[虚拟机]]></category>

		<guid isPermaLink="false">http://www.020i.com/?p=494</guid>
		<description><![CDATA[今天又遇到这个问题，还好有位同志找到了方法。用OpenVZ创建的虚拟机默认只有 256MB 的内存，需要修改配置文件增加这个上限。 配置文件在 /etc/vz 这个目录下，需要调整的参数是 PRIVVMPAGES，它的值乘以4kb便是系统中实际可用的内存大小，比如默认值是 65536： 65536 × 4k  ＝ 262144 （即 256MB） 关于这几个参数的说明，官方文档在这里： privvmpages：private virtual memory 这个参数实际上显示的分配的 mem+swap 的大小，注意这里使用page做单位不是用byte，看上面的 privvmpages 是：61869 * 4KB / 1024byte = 241MB（1page = 4K，1K=1024B）这个参数只是显示分配的内存大小，但并不是实际使用内存的大小。实际大小由physpages 来显示。还有就是看完了后面的 vmguarpages 和 oomguarpages 会发现实际上：privvmpages barrier = vmguarpages barrier + oomguarpages barrier。 physpages：Physical pages 用来显示实际使用的内存大小。所有单独 VPS 虚拟机的使用内存加起来就是这台服务器整体的内存消耗。 vmguarpages：这个参数用来显示用多少内存分配给虚拟机，就是我们查看各种 VPS 产品时关心的Guaranteed/Dedicated RAM，计算方法是：58368 pages * <a href='http://www.020i.com/2010/blog-post-494.html'>[...]</a>]]></description>
		<wfw:commentRss>http://www.020i.com/2010/blog-post-494.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

