V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
showecho
V2EX  ›  程序员

不是说 PHP 和 Linux 更配吗?

  •  
  •   showecho · Oct 13, 2018 via iPhone · 4160 views
    This topic created in 2758 days ago, the information mentioned may be changed or developed.
    同样的 2 核 4G,windows 下放了 100 个 wordpress,内存 50-60%,linux 下(宝塔)放 60 个就 80%以上了,为啥?
    18 replies    2018-10-14 17:40:12 +08:00
    Nitroethane
        1
    Nitroethane  
       Oct 13, 2018 via Android
    你需要学习一下 Linux 的内存管理机制
    yjd
        2
    yjd  
       Oct 13, 2018 via Android
    楼上正解
    glouhao
        3
    glouhao  
       Oct 13, 2018 via Android
    宝塔稳定么,以前用 wdcp 两三个月死机一回
    wwthappy
        4
    wwthappy  
       Oct 13, 2018
    你是怎么算的内存使用率? linux 不是简单的算( total-free )/total
    tachikomachann
        5
    tachikomachann  
       Oct 13, 2018 via Android
    先 free 看一下内存,特别是 +-buffer cache 那一列
    nilrust
        6
    nilrust  
       Oct 13, 2018
    内存计算机制都不一样怎么比?
    bigmouthhaile
        7
    bigmouthhaile  
       Oct 13, 2018 via Android
    试试用 htop 看内存占用
    tadtung
        8
    tadtung  
       Oct 13, 2018 via Android
    这个和内存无关。。。
    xiaoz
        9
    xiaoz  
       Oct 13, 2018
    1.首先 win 和 linux 内存机制确实不一样
    2.其次您放了 100 个 wp 站点,才 4G 内存,占用和您的访问量、使用插件相关。
    3.100 个 wp 占用这么点内存我觉得完全正常
    hjc4869
        10
    hjc4869  
       Oct 13, 2018 via iPhone
    Windows 是不是开了 pf,然后 Linux 没开 swap 或者 swappiness 太低
    micookie
        11
    micookie  
       Oct 13, 2018
    放上 200 个发现还是 80%...
    dorothyREN
        12
    dorothyREN  
       Oct 13, 2018
    linux 上不能只看 free 部分的大小,因为还有 cache。
    lscho
        13
    lscho  
       Oct 13, 2018
    linux 的内存管理机制上面已经说了。。说个题外话,难道你不感觉到你买个内存,结果系统没给你用,感觉很傻吗?
    laolinn
        14
    laolinn  
       Oct 13, 2018 via iPhone
    不如看一下双方是不是都用 apache,不要 windows 那边用了 iis
    ericgui
        15
    ericgui  
       Oct 14, 2018
    我觉得可能是宝塔的问题
    zxq2233
        16
    zxq2233  
       Oct 14, 2018
    lamp 天下无敌
    NickyHaris
        17
    NickyHaris  
       Oct 14, 2018
    要看 available
    encro
        18
    encro  
       Oct 14, 2018
    windows 跑的不是 fpm,没有多开吧,linux 上默认应该是开了 fpm,还有扩展多少也有关系。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   808 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 68ms · UTC 20:10 · PVG 04:10 · LAX 13:10 · JFK 16:10
    ♥ Do have faith in what you're doing.