<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Performance on 潘忠显的技术博客</title>
    <link>https://panzhongxian.cn/tags/performance/</link>
    <description>Recent content in Performance on 潘忠显的技术博客</description>
    <generator>Hugo</generator>
    <language>zh-CN</language>
    <lastBuildDate>Tue, 31 Mar 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://panzhongxian.cn/tags/performance/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>从ES性能优化到防御性编程</title>
      <link>https://panzhongxian.cn/cn/2026/03/es-performance-optimization-and-defensive-programming/</link>
      <pubDate>Tue, 31 Mar 2026 00:00:00 +0000</pubDate>
      <guid>https://panzhongxian.cn/cn/2026/03/es-performance-optimization-and-defensive-programming/</guid>
      <description>&lt;p&gt;凌晨收到「&lt;strong&gt;线上一个推荐服务的，服务耗时明显增加&lt;/strong&gt;」的告警。&lt;/p&gt;&#xA;&lt;img src=&#34;https://panzhongxian.cn/images/es-performance-optimization-and-defensive-programming/warning.png&#34; alt=&#34;warning&#34; style=&#34;zoom: 50%;&#34;  title=&#34;warning&#34; /&gt;&#xA;&lt;p&gt;简单排查了一下，发现是&lt;strong&gt;存在 ES 慢查询&lt;/strong&gt;的问题。&lt;/p&gt;&#xA;&lt;p&gt;本小文简单聊聊针对性的优化，实际工程中该如何做防御性的开发。&lt;/p&gt;</description>
    </item>
    <item>
      <title>一个固定频率压测工具</title>
      <link>https://panzhongxian.cn/cn/2025/05/fixed-qps-wrk/</link>
      <pubDate>Fri, 16 May 2025 00:00:00 +0000</pubDate>
      <guid>https://panzhongxian.cn/cn/2025/05/fixed-qps-wrk/</guid>
      <description>&lt;p&gt;上周开发了一个简单压测工具的，类似于众所周知的 wrk。&lt;/p&gt;&#xA;&lt;p&gt;区别之处在于：&lt;strong&gt;支持固定QPS，支持按秒统计延迟&lt;/strong&gt;。仓库：&lt;a href=&#34;https://github.com/panzhongxian/wrkx&#34;&gt;https://github.com/panzhongxian/wrkx&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;开发这个工具，利用 Golang 和 Copilot 大概两三小时就开发出了初版。&lt;/p&gt;</description>
    </item>
    <item>
      <title>CPU架构对开发的影响</title>
      <link>https://panzhongxian.cn/cn/2025/03/impact-of-cpu-arch-on-dev/</link>
      <pubDate>Sat, 08 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://panzhongxian.cn/cn/2025/03/impact-of-cpu-arch-on-dev/</guid>
      <description>&lt;p&gt;今天聊聊CPU的架构，以及对开发的影响。&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;最近更换了新的笔记本 M4 Pro，之前是2019款的 MacBook，处理器是 Intel i7。&lt;/p&gt;&#xA;&lt;p&gt;在使用新电脑进行开发的过程中，遇到一个问题就是构建Docker镜像的时候，发现有个警告。意思是基础镜像是 linux/amd64 平台的，而当前预期使用 linux/arm64：&lt;/p&gt;</description>
    </item>
    <item>
      <title>如何获得10倍性能提升</title>
      <link>https://panzhongxian.cn/cn/2024/11/how-to-make-10x-improvement/</link>
      <pubDate>Sun, 17 Nov 2024 00:00:00 +0000</pubDate>
      <guid>https://panzhongxian.cn/cn/2024/11/how-to-make-10x-improvement/</guid>
      <description>&lt;h2 id=&#34;背景&#34;&gt;背景&lt;/h2&gt;&#xA;&lt;p&gt;上周五，我看之前我在 Redis 上提的一个 Pull Request 有对话更新。看到有两个同学在讨论我那个 PR 是否会真的有性能提升。&lt;/p&gt;&#xA;&lt;p&gt;讨论中有引用一个 &lt;a href=&#34;https://github.com/redis/redis/pull/13558&#34;&gt;PR #13558&lt;/a&gt;，该 PR 针对支持 AVX2 的 CPU 架构，做了优化，是的 &lt;code&gt;PFCOUNT&lt;/code&gt; 指令和 &lt;code&gt;PFMERGE&lt;/code&gt; 指令性能有&lt;strong&gt;12倍以上&lt;/strong&gt; 的提升：&lt;/p&gt;</description>
    </item>
    <item>
      <title>日志工具优化 - 从14秒到0.4秒</title>
      <link>https://panzhongxian.cn/cn/2022/08/log-tool-optimization/</link>
      <pubDate>Thu, 25 Aug 2022 00:00:00 +0000</pubDate>
      <guid>https://panzhongxian.cn/cn/2022/08/log-tool-optimization/</guid>
      <description>&lt;p&gt;本文介绍一个简单日志查询工具的优化过程，包括原有工具的耗时分析、优化方法和效果，以及通用化工具的思考。&lt;/p&gt;&#xA;&lt;p&gt;花小半天时间，用二分查找优化了一下，从原来耗时 14 秒降到了 0.4 秒。&lt;/p&gt;</description>
    </item>
    <item>
      <title>一个HTTP接口的压力测试</title>
      <link>https://panzhongxian.cn/cn/2020/11/entry-task-benchmark/</link>
      <pubDate>Wed, 25 Nov 2020 00:00:00 +0000</pubDate>
      <guid>https://panzhongxian.cn/cn/2020/11/entry-task-benchmark/</guid>
      <description>&lt;h2 id=&#34;测试目的&#34;&gt;测试目的：&lt;/h2&gt;&#xA;&lt;p&gt;在不同网络情况下（HTTP服务器本机压测、局域网压测、广域网压测）确定接口支持的最大并发用户数，分析其性能瓶颈。&lt;/p&gt;&#xA;&lt;h2 id=&#34;环境说明&#34;&gt;环境说明&lt;/h2&gt;&#xA;&lt;p&gt;Django版本 1.11.29&lt;/p&gt;&#xA;&lt;p&gt;Python版本  2.7.16&lt;/p&gt;</description>
    </item>
    <item>
      <title>性能问题排查步骤 (CPU)</title>
      <link>https://panzhongxian.cn/cn/2020/11/how-to-profile-cpu/</link>
      <pubDate>Tue, 03 Nov 2020 00:00:00 +0000</pubDate>
      <guid>https://panzhongxian.cn/cn/2020/11/how-to-profile-cpu/</guid>
      <description>&lt;p&gt;本文介绍了基本的&lt;strong&gt;CPU&lt;/strong&gt;性能分析工具、问题排查步骤，掺杂少量内存、IO、网络相关内容。&lt;/p&gt;&#xA;&lt;p&gt;CPU排查过程跟普通思考问题的方法是一致的：&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;哪项指标有异常&lt;/li&gt;&#xA;&lt;li&gt;哪个进程有异常&lt;/li&gt;&#xA;&lt;li&gt;进程高负载的原因&lt;/li&gt;&#xA;&lt;li&gt;进程高负载的影响 (TODO)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;《&lt;a href=&#34;http://panzhongxian.cn/cn/2020/09/cpu-strike-to-100-analysis/&#34;&gt;CPU毛刺问题排查&lt;/a&gt;》描述了一个按照该步骤排查的典型案例，文章已被腾讯技术工程转载。&lt;/p&gt;</description>
    </item>
    <item>
      <title>CPU毛刺问题排查</title>
      <link>https://panzhongxian.cn/cn/2020/09/cpu-strike-to-100-analysis/</link>
      <pubDate>Mon, 28 Sep 2020 00:00:00 +0000</pubDate>
      <guid>https://panzhongxian.cn/cn/2020/09/cpu-strike-to-100-analysis/</guid>
      <description>&lt;p&gt;本文排查一个&lt;strong&gt;Linux机器CPU毛刺&lt;/strong&gt;问题，排查过程中&lt;strong&gt;不变更进程状态、也不会影响线上服务&lt;/strong&gt;，最后还对CPU毛刺带来的&lt;strong&gt;风险&lt;/strong&gt;进行了分析和验证。&lt;/p&gt;&#xA;&lt;p&gt;本文中提到CPU统计和产生core文件的工具详见 &lt;a href=&#34;https://github.com/panzhongxian/simple-perf-tools/blob/master/cpu&#34;&gt;simple-perf-tools&lt;/a&gt; 仓库。&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
