xbdsky
V2EX  ›  Redis

Linux 1g 内存 redis 优化

  •  
  •   xbdsky ·
    xbdsky · Mar 9, 2017 · 8384 views
    This topic created in 3537 days ago, the information mentioned may be changed or developed.

    QQ 截图 20170309140924.png
    网站主站用的 wordpress 跑的,加了 redis 内存跟 CPU 一路飙升,对 redis 这块不是很懂,希望大侠们指导下。
    redis.conf 就是默认的文件,没有配置 用的是这个插件, https://www.freehao123.com/redis-wordpress/

    26 replies  •  2017-03-10 16:13:14 +08:00
    xbdsky
    xbdsky
    OP
    Mar 9, 2017
    1
    已经 100%了,哎 ![QQ 截图 20170309140924.png]( https://ooo.0o0.ooo/2017/03/09/58c0f2069ec44.png)
    cevincheung
    cevincheung
    Mar 9, 2017
    2
    允许公网访问还没密码就好玩了
    knightdf
    knightdf
    Mar 9, 2017
    3
    1G 内存。。。把 redis 的内存上限限制一下把,然后 redis 中的 k-v 需要用 cache 清理策略
    sampeng
    sampeng
    Mar 9, 2017
    4
    wordpress?直接静态化+CDN ,不理解 redis 用来干什么。
    ivmm
    ivmm
    Mar 9, 2017
    5
    WP 的对象缓存不建议用 Redis ,还要走 tcp/tp

    推荐 APCu 搭配 Lcache , https://www.mf8.biz/wp-lcache/


    @sampeng 后台可以更流畅点
    numberwolf
    numberwolf
    Mar 9, 2017
    6
    @cevincheung lz 可能是被挖矿机器人占满的
    numberwolf
    numberwolf
    Mar 9, 2017
    7
    你 redis 允许公网访问吗? top 一下看看有没有奇怪的东西
    xbdsky
    xbdsky
    OP
    Mar 9, 2017
    8
    @numberwolf <img src="https://ooo.0o0.ooo/2017/03/09/58c1156b1c2ed.png" /> 好像没什么奇怪的东西。
    xbdsky
    xbdsky
    OP
    Mar 9, 2017
    9
    @ivmm 我试试
    feiyang21687
    feiyang21687
    Mar 9, 2017
    10
    1 核?
    lslqtz
    lslqtz
    Mar 9, 2017
    11
    @ivmm WP 我用静态缓存+OPCache+Memcache ,响应速度是非缓存 100ms ,缓存 20ms.
    numberwolf
    numberwolf
    Mar 9, 2017
    12
    @xbdsky 你可以持续观察,不过应该没大的问题,建议 redis 取消外网访问加密码。
    小规模博客用 memcached 就可以了
    ivmm
    ivmm
    Mar 9, 2017❤️1
    13
    @lslqtz Pantheon 的意思主要还是,当负载一高,访问量一高,走 TCP/IP 的话,就容易嗝屁,走 socket 肯定会好些
    xbdsky
    xbdsky
    OP
    Mar 9, 2017
    14
    @numberwolf 安装好了,不能用,还在调试 ing...
    xbdsky
    xbdsky
    OP
    Mar 9, 2017
    15
    @feiyang21687 是,自己的博客,为了省钱最低配置,以前内存 512M 的,后来升级到 1G 的,哈哈。
    RobertYang
    RobertYang
    Mar 9, 2017 via Android
    16
    @ivmm 战略性 mark
    zts1993
    zts1993
    Mar 9, 2017
    17
    内存啊。。。是不是没有设置 max memory 。。。。
    janxin
    janxin
    Mar 9, 2017
    18
    没什么问题其实 redis 也没必要一定上
    PeterD
    PeterD
    Mar 9, 2017
    19
    如果是 ssd 试试 ssdb.io
    CRVV
    CRVV
    Mar 9, 2017
    20
    @ivmm 请教一下, socket 是什么?
    xbdsky
    xbdsky
    OP
    Mar 9, 2017
    21
    @PeterD 好东西,谢谢分享。
    neoblackcap
    neoblackcap
    Mar 10, 2017
    22
    @CRVV 大概是想说 unix domain socket 吧
    ivmm
    ivmm
    Mar 10, 2017
    23
    @CRVV #22 楼的意思。
    CRVV
    CRVV
    Mar 10, 2017
    24
    @ivmm

    Redis 支持 Unix domain socket
    ivmm
    ivmm
    Mar 10, 2017
    25
    @CRVV 这样还得要支持 socket redis 的 WP 对象缓存软件支持。
    ivmm
    ivmm
    Mar 10, 2017
    26
    @ivmm 唔,看了一下,插件是支持的。 看来我自己得再重新搞研究了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2071 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 06:33 · PVG 14:33 · LAX 22:33 · JFK 01:33
    ♥ Do have faith in what you're doing.