• redis分析大key(memory usage具体查看key)


    使用如下命令获取大key
    /usr/local/services/redis/bin/redis-cli -h 192.168.1.136 -a 123456 -p 7001 --bigkeys

    -------- summary -------

    Sampled 5123146 keys in the keyspace!
    Total key length in bytes is 207210827 (avg len 40.45)

    Biggest string found 'hxl-activity:admin:orders_dataD1CL1540721976058' has 6294556 bytes
    Biggest list found 'bbsboast:core:content:hxl-1-2022-08-31' has 292 items
    Biggest set found 'hxl:num:20220830' has 5450 members
    Biggest hash found 'hxl-api-core:hxl-remind-core:JINAN_CHILD' has 249284 fields
    Biggest zset found 'hxl:core:CHILD:hxl_22763' has 16692 members

    5072477 strings with 2830008288 bytes (99.01% of keys, avg size 557.91)
    97 lists with 1852 items (00.00% of keys, avg size 19.09)
    8 sets with 10399 members (00.00% of keys, avg size 1299.88)
    26658 hashs with 330125 fields (00.52% of keys, avg size 12.38)
    23906 zsets with 2570629 members (00.47% of keys, avg size 107.53)
    0 streams with 0 entries (00.00% of keys, avg size 0.00)

    使用memory usage key,查看具体某个key占用内存大小
    memory usage hxl-activity:admin:orders_dataD1CL1540721976058

    memory usage key就可以用来查看某个key对应value占用内存的大小,单位是bytes.

  • 相关阅读:
    Rstudio代码的快捷键
    sqlhelper帮助类
    图片上传
    反射获取 obj类 的属性 与对应值
    jquery 操作 动态创建的 元素
    Path类使用
    jquery 小数计算保持精度
    js字符串转成数字
    DateTime.Now.ToString()的各种字符串
    Linq语句 动态组建
  • 原文地址:https://www.cnblogs.com/hxlasky/p/16639002.html
Copyright © 2020-2023  润新知