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

使用 xhprof 进行线上 PHP 性能追踪及分析

  •  1
     
  •   AlloVince · 2014-12-28 23:11:02 +08:00 · 4329 次点击
    这是一个创建于 3378 天前的主题,其中的信息可能已经有所发展或是发生改变。

    最近的一些经验总结,欢迎指正

    http://avnpc.com/pages/profiler-php-performance-online-by-xhprof

    11 条回复    2015-01-11 21:09:50 +08:00
    wwek
        1
    wwek  
       2014-12-28 23:48:49 +08:00
    看了这篇文,不错的实践。
    同时也推荐大家用xhprof 做php性能分析。
    anewg
        2
    anewg  
       2014-12-29 00:39:32 +08:00
    难得看到原创技术贴,支持
    dongbeta
        3
    dongbeta  
       2014-12-29 08:39:43 +08:00
    请问你们是对所有请求都分析,还是只分析一定比例?
    thankyourtender
        4
    thankyourtender  
       2014-12-29 09:23:18 +08:00
    你们不知道 blackfire?
    AlloVince
        5
    AlloVince  
    OP
       2014-12-29 10:24:52 +08:00
    @dongbeta 线上常规都是关闭的,如果发现负载问题,会针对消耗较大的URL单独开启。
    br00k
        6
    br00k  
       2014-12-29 10:27:06 +08:00
    一直想尝试,有空试试。
    AlloVince
        7
    AlloVince  
    OP
       2014-12-29 10:32:46 +08:00
    @thankyourtender 对于墙外的需要并且安装php扩展的监控程序我们都持保留态度。前一段时间尝试过线上使用newrelic,估计是因为墙的原因,造成了php-fpm进程阻塞,具体表现为netstat中php-fpm开启的端口始终不回收,墙内环境使用墙外服务器很难保证服务的稳定性
    bdnet
        8
    bdnet  
       2014-12-30 10:06:12 +08:00
    前段时间折腾了一下 xhprof ,感觉还不错,就 GUI 工具有点乱,也不尽人意。
    AlloVince
        9
    AlloVince  
    OP
       2014-12-30 14:44:45 +08:00
    AlloVince
        10
    AlloVince  
    OP
       2014-12-30 14:47:14 +08:00
    Preview

    mingyun
        11
    mingyun  
       2015-01-11 21:09:50 +08:00
    好赞
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1459 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 17:24 · PVG 01:24 · LAX 10:24 · JFK 13:24
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.