<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Snooda]]></title> 
<link>http://www.snooda.com/index</link> 
<description><![CDATA[Snooda's Blog]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[Snooda]]></copyright>
<item>
<link>http://www.snooda.com/read/</link>
<title><![CDATA[MongoDB评测]]></title> 
<author>snooda &lt;admin@snooda.com&gt;</author>
<category><![CDATA[默认分类]]></category>
<pubDate>Fri, 08 Apr 2011 10:46:05 +0000</pubDate> 
<guid>http://www.snooda.com/read/</guid> 
<description>
<![CDATA[ 
	    最近对MongoDB做了个评测。<br />
<br />
    MongoDB是一种No-SQL数据库，存储数据采用BSON格式将数据序列化后存储。不过BSON对象最大有4m的限制，对于大于4m的，MongoDB会使用GridFs来将文件分块存储。<br />
<br />
    这里需要注意的是，在OpenVZ的VPS上需要用ulimit来限制程序最大可用的内存，否则程序会试图分配很大的内存导致OpenVZ内存配额耗尽。<br />
<br />
    测试数据：id字段：1000000-2000000的一个数字<br />
              Msg字段：32*30字节<br />
    测试脚本语言：PHP<br />
    自己搭建的虚拟机：Ubuntu 10.10，总内存：256M。<br />
    100w条插入：无索引用时70s，平均1.5w/s。插入后程序占用内存110M<br />
    100w条随机读取一条：无索引时30s，有索引12ms。<br />
<br />
<br />
    在一台Intel(R) Xeon(R) CPU E5620  @ 2.40GHz，内存2G的服务器上测试：<br />
<br />
    100w条插入：无索引用时43s。插入后程序占用内存1G。<br />
    100w条随机读取一条：无索引600ms，有索引0.18ms。<br />
<br />
<br />
    
]]>
</description>
</item><item>
<link>http://www.snooda.com/read/#blogcomment</link>
<title><![CDATA[[评论] MongoDB评测]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.snooda.com/read/#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>