zoukankan      html  css  js  c++  java
  • Redis笔记 info命令

    命令具体实现在redis-3.0/src/redis.c:genRedisInfoString

    Memory

    • used_memory是redis通过在每次执行mallocfree等函数的时候维护定义在src/zmalloc.c中的used_memory变量实现的
    • used_memory_rss在linux中是通过读/proc/{pid}/stat这个文件的第24个字段rss得到number of pages the process in real memory然后再乘以sysconf(_SC_PAGESIZE)实现的。sysconf(_SC_PAGESIZE)表示Size of a page in bytes。
    • used_memory_peakRecord the max memory used since the server was started.
    • mem_fragmentation_ratioFragmentation = RSS / allocated-bytes,allocated-bytes即为used_memory

    CPU

    • used_cpu_user调用getrusage得到的ru_utime
    • used_cpu_sys调用getrusage得到的ru_stime
  • 相关阅读:
    defer与async的区别
    Promise 的含义
    SCSS 与 Sass 异同
    CSS总结2
    CSS总结1
    jQuery-插件,优化
    jQuery-表格以及表单
    jQuery-事件以及动画
    jQuery-ajax
    jQuery-DOM操作
  • 原文地址:https://www.cnblogs.com/ToRapture/p/12023274.html
Copyright © 2011-2022 走看看