VimIy微民网,让世界倾听微民的声音! 设为首页 | 加入收藏 | 网站地图
当前位置:主页 > 恶搞 >

BerkeleyDB的最大缓存设置问题。资深码农快帮忙

整理时间:2013-01-25 18:44 来源:www.vimiy.com 作者:编辑 点击:

【楼主】(18464942)2013-01-23 19:18

» BerkeleyDB的最大缓存设置问题。资深码农快帮忙
    有使用过的大牛来帮忙呀。
    
    其官网的介绍如下:
    
    
    Set the size of the shared memory buffer pool, that is, the size of the cache.
    
    The cache should be the size of the normal working data set of the application, with some small amount of additional memory for unusual situations. (Note: the working set is not the same as the number of pages accessed simultaneously, and is usually much larger.)
    
    The default cache size is 256KB, and may not be specified as less than 20KB. Any cache size less than 500MB is automatically increased by 25% to account for buffer pool overhead; cache sizes larger than 500MB are used as specified. The current maximum size of a single cache is 4GB. (All sizes are in powers-of-two, that is, 256KB is 2^18 not 256,000.)
    
    The database environment's cache size may also be set using the environment's DB_CONFIG file. The syntax of the entry in that file is a single line with the string "set_cachesize", one or more whitespace characters, and the cache size specified in three parts: the gigabytes of cache, the additional bytes of cache, and the number of caches, also separated by whitespace characters. For example, "set_cachesize 2 524288000 3" would create a 2.5GB logical cache, split between three physical caches. Because the DB_CONFIG file is read when the database environment is opened, it will silently overrule configuration done before that time.
    
    This method configures a database environment, including all threads of control accessing the database environment, not only the operations performed using a specified Environment handle.
    
    This method may not be called after the environment has been opened. If joining an existing database environment, any information specified to this method will be ignored.
    
    This method may be called at any time during the life of the application.
    
    
    Parameters:
    cacheSize The size of the shared memory buffer pool, that is, the size of the cache.
    
    
    
    
    这里大概说的是什么意思?
     cache最大开到4G?或者说,我可以设置多个内存块。每个内存卡最大开到4G
    
网友评论(18464942)2013-01-23 19:20


    自挽.exe
    
网友评论(18464942)2013-01-23 19:46


    again.exe
    
网友评论(18464942)2013-01-23 20:36


    再挽.exe
    
网友评论(18464942)2013-01-24 09:58


    再挽.exe
    

    
    
    

关于网站 | 网站声明 | 用户反馈 | 合作伙伴 | 联系我们
Copyright © 2012年2月8日