老熟女激烈的高潮_日韩一级黄色录像_亚洲1区2区3区视频_精品少妇一区二区三区在线播放_国产欧美日产久久_午夜福利精品导航凹凸

重慶分公司,新征程啟航

為企業(yè)提供網(wǎng)站建設(shè)、域名注冊、服務(wù)器等服務(wù)

checkpoint中用于控制刷盤頻率的函數(shù)是什么

這篇文章主要介紹“checkpoint中用于控制刷盤頻率的函數(shù)是什么”,在日常操作中,相信很多人在checkpoint中用于控制刷盤頻率的函數(shù)是什么問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”checkpoint中用于控制刷盤頻率的函數(shù)是什么”的疑惑有所幫助!接下來,請跟著小編一起來學(xué)習(xí)吧!

創(chuàng)新互聯(lián)于2013年創(chuàng)立,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項目網(wǎng)站建設(shè)、成都網(wǎng)站制作網(wǎng)站策劃,項目實施與項目整合能力。我們以讓每一個夢想脫穎而出為使命,1280元潮州做網(wǎng)站,已為上家服務(wù),為潮州各地企業(yè)和個人服務(wù),聯(lián)系電話:028-86922220

一、數(shù)據(jù)結(jié)構(gòu)

宏定義
checkpoints request flag bits
checkpoints request flag bits,檢查點請求標(biāo)記位定義.

/*
 * OR-able request flag bits for checkpoints.  The "cause" bits are used only
 * for logging purposes.  Note: the flags must be defined so that it's
 * sensible to OR together request flags arising from different requestors.
 */
/* These directly affect the behavior of CreateCheckPoint and subsidiaries */
#define CHECKPOINT_IS_SHUTDOWN  0x0001  /* Checkpoint is for shutdown */
#define CHECKPOINT_END_OF_RECOVERY  0x0002  /* Like shutdown checkpoint, but
                       * issued at end of WAL recovery */
#define CHECKPOINT_IMMEDIATE  0x0004  /* Do it without delays */
#define CHECKPOINT_FORCE    0x0008  /* Force even if no activity */
#define CHECKPOINT_FLUSH_ALL  0x0010  /* Flush all pages, including those
                     * belonging to unlogged tables */
/* These are important to RequestCheckpoint */
#define CHECKPOINT_WAIT     0x0020  /* Wait for completion */
#define CHECKPOINT_REQUESTED  0x0040  /* Checkpoint request has been made */
/* These indicate the cause of a checkpoint request */
#define CHECKPOINT_CAUSE_XLOG 0x0080  /* XLOG consumption */
#define CHECKPOINT_CAUSE_TIME 0x0100  /* Elapsed time */

WRITES_PER_ABSORB

/* interval for calling AbsorbSyncRequests in CheckpointWriteDelay */
//調(diào)用AbsorbSyncRequests的間隔,默認(rèn)值為1000
#define WRITES_PER_ABSORB   1000

二、源碼解讀

CheckpointWriteDelay
CheckpointWriteDelay,控制checkpoint的頻率,邏輯不復(fù)雜,判斷checkpoint flags非CHECKPOINT_IMMEDIATE/非shutdown_requested/非CHECKPOINT_IMMEDIATE并且checkpoint處于調(diào)度中,如滿足上述條件,則調(diào)用AbsorbSyncRequests處理sync,休眠100ms;不如滿足上述條件,則absorb_counter計數(shù)器減一,如計數(shù)器≤0,則調(diào)用AbsorbSyncRequests處理sync.

/*
 * CheckpointWriteDelay -- control rate of checkpoint
 * 控制checkpoint的頻率
 *
 * This function is called after each page write performed by BufferSync().
 * It is responsible for throttling BufferSync()'s write rate to hit
 * checkpoint_completion_target.
 *
 * The checkpoint request flags should be passed in; currently the only one
 * examined is CHECKPOINT_IMMEDIATE, which disables delays between writes.
 *
 * 'progress' is an estimate of how much of the work has been done, as a
 * fraction between 0.0 meaning none, and 1.0 meaning all done.
 */
void
CheckpointWriteDelay(int flags, double progress)
{
  static int  absorb_counter = WRITES_PER_ABSORB;
  /* Do nothing if checkpoint is being executed by non-checkpointer process */
  if (!AmCheckpointerProcess())
    return;
  /*
   * Perform the usual duties and take a nap, unless we're behind schedule,
   * in which case we just try to catch up as quickly as possible.
   */
  if (!(flags & CHECKPOINT_IMMEDIATE) &&//非CHECKPOINT_IMMEDIATE
    !shutdown_requested &&//非關(guān)閉請求
    !ImmediateCheckpointRequested() &&//非CHECKPOINT_IMMEDIATE
    IsCheckpointOnSchedule(progress))//處于checkpoint調(diào)度中
  {
    if (got_SIGHUP)
    {
      got_SIGHUP = false;
      ProcessConfigFile(PGC_SIGHUP);
      /* update shmem copies of config variables */
      UpdateSharedMemoryConfig();
    }
    //Absorb吸收(處理)同步請求
    AbsorbSyncRequests();
    //重置為WRITES_PER_ABSORB(1000)
    absorb_counter = WRITES_PER_ABSORB;
    //檢查歸檔是否超時
    CheckArchiveTimeout();
    /*
     * Report interim activity statistics to the stats collector.
     */
    //統(tǒng)計信息
    pgstat_send_bgwriter();
    /*
     * This sleep used to be connected to bgwriter_delay, typically 200ms.
     * That resulted in more frequent wakeups if not much work to do.
     * Checkpointer and bgwriter are no longer related so take the Big
     * Sleep.
     */
    //休眠100ms
    pg_usleep(100000L);
  }
  else if (--absorb_counter <= 0)//Absorb計數(shù)器減一
  {
    //如計數(shù)器小于等于0
    /*
     * Absorb pending fsync requests after each WRITES_PER_ABSORB write
     * operations even when we don't sleep, to prevent overflow of the
     * fsync request queue.
     */
    //Absorb同步請求
    AbsorbSyncRequests();
    //重置計數(shù)器
    absorb_counter = WRITES_PER_ABSORB;
  }
}

到此,關(guān)于“checkpoint中用于控制刷盤頻率的函數(shù)是什么”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識,請繼續(xù)關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編會繼續(xù)努力為大家?guī)砀鄬嵱玫奈恼拢?/p>
當(dāng)前文章:checkpoint中用于控制刷盤頻率的函數(shù)是什么
網(wǎng)頁路徑:http://www.xueling.net.cn/article/jdicji.html

其他資訊

在線咨詢
服務(wù)熱線
服務(wù)熱線:028-86922220
TOP
主站蜘蛛池模板: 谍战剧《惊弦》在线观看免费高清 | 天天干夜夜 | 国产精品成人观看视频免费 | 久久国产精品亚洲人一区二区三区 | 国产色欲色欲社www 被主人带到调教室调教 | 国产精品久久嫩一区二区免费 | 色偷偷久久一区二区三区 | 羞辱尤娜3中文版 | 亚洲精品无码mⅴ在线观看 日韩一级 | 无码免费人妻A片AAA毛片西瓜 | 青青小草AV一区二区三区 | 欧美亚一区 | 人与善性猛交xxxx视频 | 国产高清在线观看AV片 | 中国人妻被黑人巨大征服 | 性欧美1819sex性高播放 | 久久久久国产成人免费精品免费 | 91精品国产91久久久久久密臀 | 久久精品成人一区二区三区 | 欧美日一区二区 | 久久一区精品 | 狠狠躁日日躁夜夜躁老司机 | 亚洲综合成人婷婷五月在线观看 | 5566日本婷婷色中文字幕 | 中文字幕被公侵犯的漂亮人妻 | 日本少妇三级HD激情在线观看 | 美国三级影院 | free国产粉嫩熟妇xxxhd | 亚洲欧美在线视频观看 | 91草逼视频 | 中文字幕免费视频观看 | 国产精品a一 | 国产精品乱码高清在线看 | 好男人在在线社区WWW在线影院 | 久久国产成人精品国产成人亚洲 | 夜夜高潮夜夜爽精品欧美做爰 | 国产无限资源在线观看 | 成人欧美在线视频 | 欧美亚洲国产日韩一区二区 | 最近免费韩国日本HD中文字幕 | 69式视频免费观看 |