V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
hiboshi
V2EX  ›  PHP

分析 PHP 内存使用情况有什么扩展么

  •  
  •   hiboshi · 2017-05-12 16:48:36 +08:00 · 3094 次点击
    这是一个创建于 2539 天前的主题,其中的信息可能已经有所发展或是发生改变。

    xdebug,xhpof,xhpof 现在不更新了,线上 apache+php 每个 httpd 消耗 70M,压力一上来 内存全部吃掉了

    7 条回复    2017-05-13 10:15:50 +08:00
    jianzhiyao020
        1
    jianzhiyao020  
       2017-05-12 17:35:49 +08:00
    那是 apache 内存使用压力,用 nginx 吧
    hongcha
        2
    hongcha  
       2017-05-12 17:52:30 +08:00
    不更新也能用呀
    gouchaoer
        3
    gouchaoer  
       2017-05-12 17:54:37 +08:00 via Android
    apm 探针?换 nginx+php-fpm
    ryancao
        4
    ryancao  
       2017-05-12 23:33:05 +08:00
    可以用其他扩展无缝替代 xhprof,推荐 Tideways ( https://github.com/tideways/php-profiler-extension ),本地可以结合 xhgui ( https://github.com/tideways/php-profiler-extension )使用,支持抽样,同时建议 nginx 里面直接 append,不用改代码(比如: fastcgi_param PHP_VALUE "auto_prepend_file=/Users/markstory/Sites/xhgui/external/header.php";)

    生产环境建议推荐使用 APM 工具 ,国外可以用 new relic、app dynamics,国内有 oneapm、听云、云智慧等
    mingyun
        5
    mingyun  
       2017-05-13 00:19:02 +08:00
    @ryancao nice
    hiboshi
        6
    hiboshi  
    OP
       2017-05-13 08:34:09 +08:00
    @ryancao 很详细感谢
    kuochung
        7
    kuochung  
       2017-05-13 10:15:50 +08:00
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5374 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 08:45 · PVG 16:45 · LAX 01:45 · JFK 04:45
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.