Instagram的服务器性能优化-视频笔记 Detecting Regressions

1,用 CPU instruction(指标)来衡量程序使用CPU的情况,

CPU instrcution

Stable regardless of runtime enviroment

Measure via hardware conters on Linux

 

Why do we define effciency regression (恶化)

Use more CPU insr to serve one request

 

可能由于new release code or config change

dynostats Instgram自己开发的检测工具 只能提供request-level metrics

Cprofile 提供 Function-levle perf measurment

 

Python built-in profiling tool

 

INSTALAB prevent regression

 

CPytho不能跑多线程 muti-processes

CPython是用C语言实现的Python解释器。作为官方实现,它是最广泛使用的Python解释器。除了CPython以外,还有用Java实现的Jython,用.NET实现的IronPython,使Python方便地和Java程序、.NET程序集成。另外还有一些实验性的Python解释器比如PyPy[1]

 

优化python的 master-worker model

使用uWSGI的 shared memory 把worker的配置信息都放在master的内存中,然后映射。

 

用CYTHON来做代码优化

快速部署Python应用:Nginx+uWSGI配置详解

参考

https://python.freelycode.com/contribution/detail/509

转载于:https://www.cnblogs.com/akirajay/p/7801132.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值