首页 > 数据库 >mongodb分配内存

mongodb分配内存

时间:2023-11-09 15:13:27浏览次数:35  
标签:mongodb cache page eviction 分配内存 pages store history

环境:

Os:Centos 7

mongodb:4.4.22

 

配置文件设置的内存大小

[root@localhost conf]# more mongo.cnf 
net:
  bindIp: 192.168.1.108,127.0.0.1
  port: 28001

storage:
  journal:
    enabled: true
  dbPath: "/home/middle/mongodb/data"
  engine: wiredTiger
  wiredTiger:
    engineConfig:
      cacheSizeGB: 1

systemLog:
  destination: file
  path: "/home/middle/mongodb/log/mongodb.log"
  logAppend: true
  logRotate: reopen

processManagement:
  fork: true
  pidFilePath: "/home/middle/mongodb/run/28001.pid"

security:
  authorization: "enabled"

 

查看运行情况

> db.serverStatus().wiredTiger.cache
{
        "application threads page read from disk to cache count" : 8,
        "application threads page read from disk to cache time (usecs)" : 38,
        "application threads page write from cache to disk count" : 78,
        "application threads page write from cache to disk time (usecs)" : 3988,
        "bytes allocated for updates" : 19962,
        "bytes belonging to page images in the cache" : 33361,
        "bytes belonging to the history store table in the cache" : 571,
        "bytes currently in the cache" : 59384,
        "bytes dirty in the cache cumulative" : 1182376,
        "bytes not belonging to page images in the cache" : 26023,
        "bytes read into cache" : 30890,
        "bytes written from cache" : 813237,
        "cache overflow score" : 0,
        "checkpoint blocked page eviction" : 0,
        "checkpoint of history store file blocked non-history store page eviction" : 0,
        "eviction calls to get a page" : 0,
        "eviction calls to get a page found queue empty" : 0,
        "eviction calls to get a page found queue empty after locking" : 0,
        "eviction currently operating in aggressive mode" : 0,
        "eviction empty score" : 0,
        "eviction gave up due to detecting an out of order on disk value behind the last update on the chain" : 0,
        "eviction gave up due to detecting an out of order tombstone ahead of the selected on disk update" : 0,
        "eviction gave up due to detecting an out of order tombstone ahead of the selected on disk update after validating the update chain" : 0,
        "eviction gave up due to detecting out of order timestamps on the update chain after the selected on disk update" : 0,
        "eviction passes of a file" : 0,
        "eviction server candidate queue empty when topping up" : 0,
        "eviction server candidate queue not empty when topping up" : 0,
        "eviction server evicting pages" : 0,
        "eviction server slept, because we did not make progress with eviction" : 0,
        "eviction server unable to reach eviction goal" : 0,
        "eviction server waiting for a leaf page" : 1,
        "eviction state" : 64,
        "eviction walk most recent sleeps for checkpoint handle gathering" : 0,
        "eviction walk target pages histogram - 0-9" : 0,
        "eviction walk target pages histogram - 10-31" : 0,
        "eviction walk target pages histogram - 128 and higher" : 0,
        "eviction walk target pages histogram - 32-63" : 0,
        "eviction walk target pages histogram - 64-128" : 0,
        "eviction walk target pages reduced due to history store cache pressure" : 0,
        "eviction walk target strategy both clean and dirty pages" : 0,
        "eviction walk target strategy only clean pages" : 0,
        "eviction walk target strategy only dirty pages" : 0,
        "eviction walks abandoned" : 0,
        "eviction walks gave up because they restarted their walk twice" : 0,
        "eviction walks gave up because they saw too many pages and found no candidates" : 0,
        "eviction walks gave up because they saw too many pages and found too few candidates" : 0,
        "eviction walks reached end of tree" : 0,
        "eviction walks restarted" : 0,
        "eviction walks started from root of tree" : 0,
        "eviction walks started from saved location in tree" : 0,
        "eviction worker thread active" : 4,
        "eviction worker thread created" : 0,
        "eviction worker thread evicting pages" : 0,
        "eviction worker thread removed" : 0,
        "eviction worker thread stable number" : 0,
        "files with active eviction walks" : 0,
        "files with new eviction walks started" : 0,
        "force re-tuning of eviction workers once in a while" : 0,
        "forced eviction - history store pages failed to evict while session has history store cursor open" : 0,
        "forced eviction - history store pages selected while session has history store cursor open" : 0,
        "forced eviction - history store pages successfully evicted while session has history store cursor open" : 0,
        "forced eviction - pages evicted that were clean count" : 0,
        "forced eviction - pages evicted that were clean time (usecs)" : 0,
        "forced eviction - pages evicted that were dirty count" : 0,
        "forced eviction - pages evicted that were dirty time (usecs)" : 0,
        "forced eviction - pages selected because of a large number of updates to a single item" : 0,
        "forced eviction - pages selected because of too many deleted items count" : 0,
        "forced eviction - pages selected count" : 0,
        "forced eviction - pages selected unable to be evicted count" : 0,
        "forced eviction - pages selected unable to be evicted time" : 0,
        "hazard pointer blocked page eviction" : 0,
        "hazard pointer check calls" : 0,
        "hazard pointer check entries walked" : 0,
        "hazard pointer maximum array length" : 0,
        "history store score" : 0,
        "history store table insert calls" : 0,
        "history store table insert calls that returned restart" : 0,
        "history store table max on-disk size" : 0,
        "history store table on-disk size" : 4096,
        "history store table out-of-order resolved updates that lose their durable timestamp" : 0,
        "history store table out-of-order updates that were fixed up by reinserting with the fixed timestamp" : 0,
        "history store table reads" : 0,
        "history store table reads missed" : 0,
        "history store table reads requiring squashed modifies" : 0,
        "history store table truncation by rollback to stable to remove an unstable update" : 0,
        "history store table truncation by rollback to stable to remove an update" : 0,
        "history store table truncation to remove an update" : 0,
        "history store table truncation to remove range of updates due to key being removed from the data page during reconciliation" : 0,
        "history store table truncation to remove range of updates due to out-of-order timestamp update on data page" : 0,
        "history store table writes requiring squashed modifies" : 0,
        "in-memory page passed criteria to be split" : 0,
        "in-memory page splits" : 0,
        "internal pages evicted" : 0,
        "internal pages queued for eviction" : 0,
        "internal pages seen by eviction walk" : 0,
        "internal pages seen by eviction walk that are already queued" : 0,
        "internal pages split during eviction" : 0,
        "leaf pages split during eviction" : 0,
        "maximum bytes configured" : 1073741824,
        "maximum page size at eviction" : 0,
        "modified pages evicted" : 0,
        "modified pages evicted by application threads" : 0,
        "operations timed out waiting for space in cache" : 0,
        "overflow pages read into cache" : 0,
        "page split during eviction deepened the tree" : 0,
        "page written requiring history store records" : 0,
        "pages currently held in the cache" : 26,
        "pages evicted by application threads" : 0,
        "pages evicted in parallel with checkpoint" : 0,
        "pages queued for eviction" : 0,
        "pages queued for eviction post lru sorting" : 0,
        "pages queued for urgent eviction" : 0,
        "pages queued for urgent eviction during walk" : 0,
        "pages queued for urgent eviction from history store due to high dirty content" : 0,
        "pages read into cache" : 18,
        "pages read into cache after truncate" : 4,
        "pages read into cache after truncate in prepare state" : 0,
        "pages requested from the cache" : 1067,
        "pages seen by eviction walk" : 0,
        "pages seen by eviction walk that are already queued" : 0,
        "pages selected for eviction unable to be evicted" : 0,
        "pages selected for eviction unable to be evicted as the parent page has overflow items" : 0,
        "pages selected for eviction unable to be evicted because of active children on an internal page" : 0,
        "pages selected for eviction unable to be evicted because of failure in reconciliation" : 0,
        "pages selected for eviction unable to be evicted because of race between checkpoint and out of order timestamps handling" : 0,
        "pages walked for eviction" : 0,
        "pages written from cache" : 80,
        "pages written requiring in-memory restoration" : 0,
        "percentage overhead" : 8,
        "the number of times full update inserted to history store" : 0,
        "the number of times reverse modify inserted to history store" : 0,
        "tracked bytes belonging to internal pages in the cache" : 4848,
        "tracked bytes belonging to leaf pages in the cache" : 54536,
        "tracked dirty bytes in the cache" : 0,
        "tracked dirty pages in the cache" : 0,
        "unmodified pages evicted" : 0
}

 

标签:mongodb,cache,page,eviction,分配内存,pages,store,history
From: https://www.cnblogs.com/hxlasky/p/17821703.html

相关文章

  • c#操作mongodb数据库工具类
    新建c#项目,在nuget中引入MongoDB.Driver驱动,然后新建一个MongoDBToolHelper类,将下面代码复制进去usingMongoDB.Bson;usingMongoDB.Bson.Serialization;usingMongoDB.Driver;usingMongoDB.Driver.Builders;usingSystem;usingSystem.Collections.Generic;usingSystem......
  • Spring 集成mongodb maven
    mongoDB介绍(特点、优点、原理)介绍:MongoDB是一个基于分布式文件存储的数据库。由C++语言编写。旨在为WEB应用提供可扩展的高性能数据存储解决方案。特点:高性能、易部署、易使用,存储数据非常方便。主要功能特性有:Ø面向集合存储,易存储对象类型的数据Ø模式自由Ø支持动态查询......
  • Linux下Mongodb安装和启动配置
    Mongodb的安装与启动下载链接: http://www.mongodb.org/downloads----------------------------------------------------------------------------Linux安装第一步:下载安装包下载版本:2.0.2-rc2下载链接: http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.0.4.tgz首先在......
  • Eolink Apikit 版本更新:数据字典功能上线、支持 MongoDB 数据库操作...
    ......
  • 一种Mysql和Mongodb数据同步到Elasticsearch的实现办法和系统
    本文分享自天翼云开发者社区《一种Mysql和Mongodb数据同步到Elasticsearch的实现办法和系统》,作者:l****n核心流程如下: 核心逻辑说明:MySQLBinlog解析:首先,从MySQL的二进制日志(Binlog)中解析出表名。这一步骤非常关键,因为我们只关注特定表的数据变更。进一步,我们检查Binlog中......
  • Eolink Apikit 版本更新:数据字典功能上线、支持 MongoDB 数据库操作...
    ......
  • 无涯教程-MongoDB - 上限集合
    上限集合是固定大小的循环集合,遵循插入顺序以支持高性能的创建,读取和删除操作。循环表示这意味着分配给集合的固定大小用尽时,它将开始删除集合中最旧的文档,而无需提供任何显式命令。创建上限集合要创建一个有上限的集合,无涯教程使用常规的createCollection命令,但将capped选项......
  • 无涯教程-MongoDB - GridFS
    GridFS是MongoDB规范,用于存储和检索大文件,例如图像,音频文件,视频文件等,它是一种文件系统,用于存储文件,但其数据存储在MongoDB集合中。GridFS能够存储甚至超过其文档大小限制16MB的文件。GridFS将文件分为多个块,并将每个数据块存储在单独的文档中,每个文件的最大大小为255k。默......
  • 无涯教程-MongoDB - 正则
    在所有语言中,经常使用正则表达式来搜索任何字符串中的模式或单词,MongoDB还提供了使用$regex运算符进行字符串模式匹配。与文本搜索不同,无涯教程不需要进行任何配置或命令即可使用正则表达式。考虑posts集合下的以下文档结构,其中包含帖子文本及其标签-{"post_text":"......
  • 无涯教程-MongoDB - 文本搜索
    从2.4版开始,MongoDB开始支持文本索引来搜索字符串内容,文本搜索使用词干搜索技术通过删除词干停止词(例如a,an,the,等)来在字符串字段中查找指定的词。目前,MongoDB支持大约15种语言。启用文本搜索最初,"TextSearch"是一项实验性函数,但从2.6版开始,默认情况下启用此配置。但是如果......